aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/include/xen-sys/NetBSD/privcmd.h1
-rw-r--r--tools/libxc/xc_netbsd.c6
2 files changed, 6 insertions, 1 deletions
diff --git a/tools/include/xen-sys/NetBSD/privcmd.h b/tools/include/xen-sys/NetBSD/privcmd.h
index d670b41475..1296b30e5f 100644
--- a/tools/include/xen-sys/NetBSD/privcmd.h
+++ b/tools/include/xen-sys/NetBSD/privcmd.h
@@ -36,6 +36,7 @@ typedef struct privcmd_hypercall
{
unsigned long op;
unsigned long arg[5];
+ long retval;
} privcmd_hypercall_t;
typedef struct privcmd_mmap_entry {
diff --git a/tools/libxc/xc_netbsd.c b/tools/libxc/xc_netbsd.c
index 81c86d1064..036f64879c 100644
--- a/tools/libxc/xc_netbsd.c
+++ b/tools/libxc/xc_netbsd.c
@@ -142,9 +142,13 @@ static int do_privcmd(int xc_handle, unsigned int cmd, unsigned long data)
int do_xen_hypercall(int xc_handle, privcmd_hypercall_t *hypercall)
{
- return do_privcmd(xc_handle,
+ int error = do_privcmd(xc_handle,
IOCTL_PRIVCMD_HYPERCALL,
(unsigned long)hypercall);
+ if (error)
+ return error;
+ else
+ return (hypercall->retval);
}
#define EVTCHN_DEV_NAME "/dev/xenevt"