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@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>
This commit is contained in:
Roger Pau Monne committed 2012-01-19 11:21:10 +01:00
1 parent 089179f6f3
commit b21046d2ea
1 file changed
+6
+6
View File
@@ -96,6 +96,12 @@ static int netbsd_privcmd_hypercall(xc_interface *xch, xc_osdep_handle h, privcm
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
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.