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

[Xen-devel] [PATCH 1 of 2] libxc/NetBSD: return ioctl return value on error



# HG changeset patch
# User Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>
# Date 1326968255 -3600
# Node ID d7d91b1eb79edf93230713d80ac6ac7738bdd71e
# Parent  f14765a3013a27f9e3948ee97fbdb798b057db04
libxc/NetBSD: return ioctl return value on error

NetBSD libxc hypercall implementation was returning -errno on error,
instead of the actual error value from ioctl. Returning error is
easier to understand, and the caller can always check errno.

Signed-off-by: Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>

diff -r f14765a3013a -r d7d91b1eb79e tools/libxc/xc_netbsd.c
--- a/tools/libxc/xc_netbsd.c   Mon Jan 16 16:55:37 2012 +0100
+++ b/tools/libxc/xc_netbsd.c   Thu Jan 19 11:17:35 2012 +0100
@@ -97,7 +97,7 @@ static int netbsd_privcmd_hypercall(xc_i
     int error = ioctl(fd, IOCTL_PRIVCMD_HYPERCALL, hypercall);
 
     if (error < 0)
-        return -errno;
+        return error;
     else
         return hypercall->retval;
 }

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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