aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_linux.c
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2010-12-03 09:36:46 +0000
committerIan Campbell <ian.campbell@citrix.com>2010-12-03 09:36:46 +0000
commit2e04f9622fa58db6a5f4a1f8242877af25429db6 (patch)
treeb01ae067276a38086508d1e1ef647ed430879478 /tools/libxc/xc_linux.c
parent02e4f47747e6198c834017e5038fa6bf98a0cfeb (diff)
downloadxen-2e04f9622fa58db6a5f4a1f8242877af25429db6.tar.gz
xen-2e04f9622fa58db6a5f4a1f8242877af25429db6.tar.bz2
xen-2e04f9622fa58db6a5f4a1f8242877af25429db6.zip
libxc: osdep: convert do_xen_hypercall()
do_privcmd() was only ever used by do_xen_hypercall() so remove it. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
Diffstat (limited to 'tools/libxc/xc_linux.c')
-rw-r--r--tools/libxc/xc_linux.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/tools/libxc/xc_linux.c b/tools/libxc/xc_linux.c
index 5c9e70c065..a0539cd0b5 100644
--- a/tools/libxc/xc_linux.c
+++ b/tools/libxc/xc_linux.c
@@ -75,6 +75,12 @@ static int linux_privcmd_close(xc_interface *xch, xc_osdep_handle h)
return close(fd);
}
+static int linux_privcmd_hypercall(xc_interface *xch, xc_osdep_handle h, privcmd_hypercall_t *hypercall)
+{
+ int fd = (int)h;
+ return ioctl(fd, IOCTL_PRIVCMD_HYPERCALL, hypercall);
+}
+
static int xc_map_foreign_batch_single(xc_interface *xch, uint32_t dom,
xen_pfn_t *mfn, unsigned long addr)
{
@@ -316,20 +322,13 @@ void *xc_map_foreign_ranges(xc_interface *xch, uint32_t dom, size_t size, int pr
return ret;
}
-static int do_privcmd(xc_interface *xch, int cmd, unsigned long data)
-{
- return ioctl(xch->fd, cmd, data);
-}
-
-int do_xen_hypercall(xc_interface *xch, privcmd_hypercall_t *hypercall)
-{
- return do_privcmd(xch, IOCTL_PRIVCMD_HYPERCALL,
- (unsigned long)hypercall);
-}
-
static struct xc_osdep_ops linux_privcmd_ops = {
.open = &linux_privcmd_open,
.close = &linux_privcmd_close,
+
+ .u.privcmd = {
+ .hypercall = &linux_privcmd_hypercall,
+ },
};
#define DEVXEN "/dev/xen/"