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 | 3143748ef690c9c2206817a8a6b5f97e744b795d (patch) | |
tree | 180c09be929ff5a6be67897fa8c9b5c9200262b8 /tools/libxc/xc_solaris.c | |
parent | f32797d3310d8eb1851b07249f5270f1be1ae39a (diff) | |
download | xen-3143748ef690c9c2206817a8a6b5f97e744b795d.tar.gz xen-3143748ef690c9c2206817a8a6b5f97e744b795d.tar.bz2 xen-3143748ef690c9c2206817a8a6b5f97e744b795d.zip |
libxc: osdep: convert xc_map_foreign_range()
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, 8 insertions, 5 deletions
diff --git a/tools/libxc/xc_solaris.c b/tools/libxc/xc_solaris.c index 8152868e7c..d9af863c6e 100644 --- a/tools/libxc/xc_solaris.c +++ b/tools/libxc/xc_solaris.c @@ -101,14 +101,16 @@ static void *solaris_privcmd_map_foreign_batch(xc_interface *xch, xc_osdep_handl } -void *xc_map_foreign_range(xc_interface *xch, uint32_t dom, - int size, int prot, - unsigned long mfn) +static void *xc_map_foreign_range(xc_interface *xch, xc_osdep_handle h, + uint32_t dom, + int size, int prot, + unsigned long mfn) { + int fd = (int)fd; privcmd_mmap_t ioctlx; privcmd_mmap_entry_t entry; void *addr; - addr = mmap(NULL, size, prot, MAP_SHARED, xch->fd, 0); + addr = mmap(NULL, size, prot, MAP_SHARED, fd, 0); if ( addr == MAP_FAILED ) return NULL; @@ -118,7 +120,7 @@ void *xc_map_foreign_range(xc_interface *xch, uint32_t dom, entry.va=(unsigned long) addr; entry.mfn=mfn; entry.npages=(size+PAGE_SIZE-1)>>PAGE_SHIFT; - if ( ioctl(xch->fd, IOCTL_PRIVCMD_MMAP, &ioctlx) < 0 ) + if ( ioctl(fd, IOCTL_PRIVCMD_MMAP, &ioctlx) < 0 ) { int saved_errno = errno; (void)munmap(addr, size); @@ -173,6 +175,7 @@ static struct xc_osdep_ops solaris_privcmd_ops = { .map_foreign_batch = &solaris_privcmd_map_foreign_batch, .map_foreign_bulk = &xc_map_foreign_bulk_compat, + .map_foreign_range = &solaris_privcmd_map_foreign_range, }, }; |