aboutsummaryrefslogtreecommitdiff
path: root/hw/usb-serial.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/usb-serial.c')
-rw-r--r--hw/usb-serial.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/usb-serial.c b/hw/usb-serial.c
index 298c1e9d95..09731da485 100644
--- a/hw/usb-serial.c
+++ b/hw/usb-serial.c
@@ -361,10 +361,11 @@ static int usb_serial_handle_data(USBDevice *dev, USBPacket *p)
USBSerialState *s = (USBSerialState *)dev;
int ret = 0;
uint8_t devep = p->devep;
- uint8_t *data = p->data;
- int len = p->len;
+ uint8_t *data = p->iov.iov[0].iov_base;
+ int len = p->iov.iov[0].iov_len;
int first_len;
+ assert(p->iov.niov == 1); /* temporary */
switch (p->pid) {
case USB_TOKEN_OUT:
if (devep != 2)