ia64/xen-unstable
changeset 17821:8a36f7f70859
libxc: Update for NetBSD
returns hypercall return value when ioctl was successful.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
returns hypercall return value when ioctl was successful.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Tue Jun 10 13:49:02 2008 +0100 (2008-06-10) |
parents | 9af7a535225f |
children | 189597fbb882 |
files | tools/include/xen-sys/NetBSD/privcmd.h tools/libxc/xc_netbsd.c |
line diff
1.1 --- a/tools/include/xen-sys/NetBSD/privcmd.h Tue Jun 10 13:45:29 2008 +0100 1.2 +++ b/tools/include/xen-sys/NetBSD/privcmd.h Tue Jun 10 13:49:02 2008 +0100 1.3 @@ -36,6 +36,7 @@ typedef struct privcmd_hypercall 1.4 { 1.5 unsigned long op; 1.6 unsigned long arg[5]; 1.7 + long retval; 1.8 } privcmd_hypercall_t; 1.9 1.10 typedef struct privcmd_mmap_entry {
2.1 --- a/tools/libxc/xc_netbsd.c Tue Jun 10 13:45:29 2008 +0100 2.2 +++ b/tools/libxc/xc_netbsd.c Tue Jun 10 13:49:02 2008 +0100 2.3 @@ -142,9 +142,13 @@ static int do_privcmd(int xc_handle, uns 2.4 2.5 int do_xen_hypercall(int xc_handle, privcmd_hypercall_t *hypercall) 2.6 { 2.7 - return do_privcmd(xc_handle, 2.8 + int error = do_privcmd(xc_handle, 2.9 IOCTL_PRIVCMD_HYPERCALL, 2.10 (unsigned long)hypercall); 2.11 + if (error) 2.12 + return error; 2.13 + else 2.14 + return (hypercall->retval); 2.15 } 2.16 2.17 #define EVTCHN_DEV_NAME "/dev/xenevt"