aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_solaris.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_solaris.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_solaris.c')
-rw-r--r--tools/libxc/xc_solaris.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/tools/libxc/xc_solaris.c b/tools/libxc/xc_solaris.c
index 062b74249e..cdcc2222c4 100644
--- a/tools/libxc/xc_solaris.c
+++ b/tools/libxc/xc_solaris.c
@@ -68,6 +68,12 @@ static int solaris_privcmd_close(xc_interface *xch, xc_osdep_handle h)
return close(fd);
}
+static int solaris_privcmd_hypercall(xc_interface *xch, xc_osdep_handle h, privcmd_hypercall_t *hypercall)
+{
+ int fd = (int)h;
+ return ioctl(fd, IOCTL_PRIVCMD_HYPERCALL, hypercall);
+}
+
void *xc_map_foreign_batch(xc_interface *xch, uint32_t dom, int prot,
xen_pfn_t *arr, int num)
{
@@ -156,21 +162,13 @@ mmap_failed:
return NULL;
}
-static int do_privcmd(xc_interface *xch, unsigned 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 solaris_privcmd_ops = {
.open = &solaris_privcmd_open,
.close = &solaris_privcmd_close,
+
+ .u.privcmd = {
+ .hypercall = &solaris_privcmd_hypercall;
+ },
};
static xc_osdep_handle solaris_evtchn_open(xc_evtchn *xce)