[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] libxc: add comment to why NetBSD return hypercall->retval



# HG changeset patch
# User Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>
# Date 1326968470 -3600
# Node ID 8a8c6e9a7c436802139eaacc5835e5d2ffe53fd8
# Parent  1f8ce25dc09897948ec8bf59f6f6d10979298413
libxc: add comment to why NetBSD return hypercall->retval

Added a comment that explains why NetBSD return hypercall->retval on
success.

Signed-off-by: Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>
Acked-by: Ian Campbell <ian.campbell.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Reported-by: Olaf Hering <olaf@xxxxxxxxx>
---


diff -r 1f8ce25dc098 -r 8a8c6e9a7c43 tools/libxc/xc_netbsd.c
--- a/tools/libxc/xc_netbsd.c   Mon Feb 20 16:46:27 2012 +0000
+++ b/tools/libxc/xc_netbsd.c   Thu Jan 19 11:21:10 2012 +0100
@@ -96,6 +96,12 @@
     int fd = (int)h;
     int error = ioctl(fd, IOCTL_PRIVCMD_HYPERCALL, hypercall);
 
+    /*
+     * Since NetBSD ioctl can only return 0 on success or < 0 on
+     * error, if we want to return a value from ioctl we should
+     * do so by setting hypercall->retval, to mimic Linux ioctl
+     * implementation.
+     */
     if (error < 0)
         return -errno;
     else

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.