aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_solaris.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/libxc/xc_solaris.c')
-rw-r--r--tools/libxc/xc_solaris.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/tools/libxc/xc_solaris.c b/tools/libxc/xc_solaris.c
index d9af863c6e..3867e8960a 100644
--- a/tools/libxc/xc_solaris.c
+++ b/tools/libxc/xc_solaris.c
@@ -130,15 +130,17 @@ static void *xc_map_foreign_range(xc_interface *xch, xc_osdep_handle h,
return addr;
}
-void *xc_map_foreign_ranges(xc_interface *xch, uint32_t dom,
- size_t size, int prot, size_t chunksize,
- privcmd_mmap_entry_t entries[], int nentries)
+static void *solaric_privcmd_map_foreign_ranges(xc_interface *xch, xc_osdep_handle h,
+ uint32_t dom,
+ size_t size, int prot, size_t chunksize,
+ privcmd_mmap_entry_t entries[], int nentries)
{
+ int fd = (int)fd;
privcmd_mmap_t ioctlx;
int i, rc;
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)
goto mmap_failed;
@@ -151,7 +153,7 @@ void *xc_map_foreign_ranges(xc_interface *xch, uint32_t dom,
ioctlx.dom = dom;
ioctlx.entry = entries;
- rc = ioctl(xch->fd, IOCTL_PRIVCMD_MMAP, &ioctlx);
+ rc = ioctl(fd, IOCTL_PRIVCMD_MMAP, &ioctlx);
if (rc)
goto ioctl_failed;
@@ -176,6 +178,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,
+ .map_foreign_ranges = &solaris_privcmd_map_foreign_ranges,
},
};