aboutsummaryrefslogtreecommitdiff
path: root/usb-bsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'usb-bsd.c')
-rw-r--r--usb-bsd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usb-bsd.c b/usb-bsd.c
index ab8e3b7294..ab84d93857 100644
--- a/usb-bsd.c
+++ b/usb-bsd.c
@@ -253,9 +253,9 @@ static int usb_host_handle_data(USBDevice *dev, USBPacket *p)
}
if (p->pid == USB_TOKEN_IN)
- ret = read(fd, p->data, p->len);
+ ret = readv(fd, p->iov.iov, p->iov.niov);
else
- ret = write(fd, p->data, p->len);
+ ret = writev(fd, p->iov.iov, p->iov.niov);
sigprocmask(SIG_SETMASK, &old_mask, NULL);