]> xenbits.xensource.com Git - people/vhanquez/xen.git/commitdiff
libxc/NetBSD: return ioctl return value on error
authorRoger Pau Monne <roger.pau@entel.upc.edu>
Thu, 19 Jan 2012 10:17:35 +0000 (11:17 +0100)
committerRoger Pau Monne <roger.pau@entel.upc.edu>
Thu, 19 Jan 2012 10:17:35 +0000 (11:17 +0100)
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@entel.upc.edu>
Acked-by: Ian Campbell <ian.campbell.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Reported-by: Olaf Hering <olaf@aepfle.de>
tools/libxc/xc_netbsd.c

index b6d67bbb8c69766f3b88fd47b9edb074cc78ca52..dbcb6408282c2cb4f4e987122ebef6825fe3301c 100644 (file)
@@ -103,7 +103,7 @@ static int netbsd_privcmd_hypercall(xc_interface *xch, xc_osdep_handle h, privcm
      * implementation.
      */
     if (error < 0)
-        return -errno;
+        return error;
     else
         return hypercall->retval;
 }