aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-06-10 13:49:02 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-06-10 13:49:02 +0100
commitdeb36502454d30eff815e09a0ade1c732366ff4c (patch)
tree8f36f6b491b8e3f91e2fdb4a15a79bb0c086b1e6
parentc30c55b1bc1a586494b1dbd010ccad1ae43548a6 (diff)
downloadxen-deb36502454d30eff815e09a0ade1c732366ff4c.tar.gz
xen-deb36502454d30eff815e09a0ade1c732366ff4c.tar.bz2
xen-deb36502454d30eff815e09a0ade1c732366ff4c.zip
libxc: Update for NetBSD
returns hypercall return value when ioctl was successful. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
-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"