Skip to contentSkip to conversation

libxc: Update for NetBSD

PATCH New Christoph Egger 1 participant 1 message Jun 10, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libxc: Update for NetBSD

Hi!

Attached patch returns hypercall return value
when ioctl was successful.

Signature · 12 lines
AMD Saxony, Dresden, Germany
Operating System Research Center

Legal Information:
AMD Saxony Limited Liability Company & Co. KG
Sitz (Geschäftsanschrift):
   Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland
Registergericht Dresden: HRA 4896
vertretungsberechtigter Komplementär:
   AMD Saxony LLC (Sitz Wilmington, Delaware, USA)
Geschäftsführer der AMD Saxony LLC:
   Dr. Hans-R. Deppe, Thomas McCoy
tools/include/xen-sys/NetBSD/privcmd.h +1 -0
diff -r 7a0f1bf86516 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 {
tools/libxc/xc_netbsd.c +5 -1
diff -r 7a0f1bf86516 tools/libxc/xc_netbsd.c
@@ -142,9 +142,13 @@ static int do_privcmd(int xc_handle, uns
 
 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"

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel