diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2010-12-03 09:36:47 +0000 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2010-12-03 09:36:47 +0000 |
commit | f32797d3310d8eb1851b07249f5270f1be1ae39a (patch) | |
tree | e7ff4931b1e93f6bdf2a0771b0bc5a1cf319fba0 /tools/libxc/xc_solaris.c | |
parent | 2e04f9622fa58db6a5f4a1f8242877af25429db6 (diff) | |
download | xen-f32797d3310d8eb1851b07249f5270f1be1ae39a.tar.gz xen-f32797d3310d8eb1851b07249f5270f1be1ae39a.tar.bz2 xen-f32797d3310d8eb1851b07249f5270f1be1ae39a.zip |
libxc: osdep: convert xc_map_foreign_{batch,bulk}
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.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tools/libxc/xc_solaris.c b/tools/libxc/xc_solaris.c index cdcc2222c4..8152868e7c 100644 --- a/tools/libxc/xc_solaris.c +++ b/tools/libxc/xc_solaris.c @@ -74,12 +74,14 @@ static int solaris_privcmd_hypercall(xc_interface *xch, xc_osdep_handle h, privc 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) +static void *solaris_privcmd_map_foreign_batch(xc_interface *xch, xc_osdep_handle h, + uint32_t dom, int prot, + xen_pfn_t *arr, int num) { + int fd = (int)h; privcmd_mmapbatch_t ioctlx; void *addr; - addr = mmap(NULL, num*PAGE_SIZE, prot, MAP_SHARED, xch->fd, 0); + addr = mmap(NULL, num*PAGE_SIZE, prot, MAP_SHARED, fd, 0); if ( addr == MAP_FAILED ) return NULL; @@ -87,7 +89,7 @@ void *xc_map_foreign_batch(xc_interface *xch, uint32_t dom, int prot, ioctlx.dom=dom; ioctlx.addr=(unsigned long)addr; ioctlx.arr=arr; - if ( ioctl(xch->fd, IOCTL_PRIVCMD_MMAPBATCH, &ioctlx) < 0 ) + if ( ioctl(fd, IOCTL_PRIVCMD_MMAPBATCH, &ioctlx) < 0 ) { int saved_errno = errno; PERROR("XXXXXXXX"); @@ -168,6 +170,9 @@ static struct xc_osdep_ops solaris_privcmd_ops = { .u.privcmd = { .hypercall = &solaris_privcmd_hypercall; + + .map_foreign_batch = &solaris_privcmd_map_foreign_batch, + .map_foreign_bulk = &xc_map_foreign_bulk_compat, }, }; |