libxc: Update for NetBSD
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 10 Jun 2008 12:49:02 +0000 (13:49 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 10 Jun 2008 12:49:02 +0000 (13:49 +0100)
returns hypercall return value when ioctl was successful.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
tools/include/xen-sys/NetBSD/privcmd.h
tools/libxc/xc_netbsd.c

index d670b41475980d14de0deb3e746b753921fe64b3..1296b30e5f7d499c6cbb332adc27e31a1d059b00 100644 (file)
@@ -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 {
index 81c86d1064b4917dd29a86bd031635fb447faba9..036f64879c155a781e4a550794c5c7ee3b35726a 100644 (file)
@@ -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"