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_netbsd.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_netbsd.c')
-rw-r--r-- | tools/libxc/xc_netbsd.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/libxc/xc_netbsd.c b/tools/libxc/xc_netbsd.c index 3c3b90d178..671ae2c3a6 100644 --- a/tools/libxc/xc_netbsd.c +++ b/tools/libxc/xc_netbsd.c @@ -79,9 +79,11 @@ static int netbsd_privcmd_hypercall(xc_interface *xch, xc_osdep_handle h, privcm return hypercall->retval; } -void *xc_map_foreign_batch(xc_interface *xch, uint32_t dom, int prot, - xen_pfn_t *arr, int num) +static void *netbsd_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_ANON | MAP_SHARED, -1, 0); @@ -94,7 +96,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("xc_map_foreign_batch: ioctl failed"); @@ -178,6 +180,9 @@ static struct xc_osdep_ops netbsd_privcmd_ops = { .u.privcmd = { .hypercall = &netbsd_privcmd_hypercall; + + .map_foreign_batch = &netbsd_privcmd_map_foreign_batch, + .map_foreign_bulk = &xc_map_foreign_bulk_compat, }, }; |