Use xenio3.h for ioctl definitions
read_exact/write_exact seems to not be available here, which cause a gcc
error. Use plain read/write, the xenevtchn interface won't do partial
read/write on NetBSD anyway so it should be safe. This is in line with the
rest of the OS specific helpers.
Fixes: b7f76a699dc ('tools: Refactor /dev/xen/evtchn wrappers into libxenevtchn')
Signed-off-by: Manuel Bouyer <bouyer@netbsd.org>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
#include <sys/ioctl.h>
-#include <xen/sys/evtchn.h>
-
#include "private.h"
+#include <xen/xenio3.h>
+
#define EVTCHN_DEV_NAME "/dev/xenevt"
int osdep_evtchn_open(xenevtchn_handle *xce, unsigned int flags)
int fd = xce->fd;
evtchn_port_t port;
- if ( read_exact(fd, (char *)&port, sizeof(port)) == -1 )
+ if ( read(fd, (char *)&port, sizeof(port)) == -1 )
return -1;
return port;
{
int fd = xce->fd;
- return write_exact(fd, (char *)&port, sizeof(port));
+ return write(fd, (char *)&port, sizeof(port));
}
/*