]> git.proxmox.com Git - mirror_qemu.git/commit - hw/usb/dev-smartcard-reader.c
usb: use iovecs in USBPacket
authorGerd Hoffmann <kraxel@redhat.com>
Tue, 12 Jul 2011 13:22:25 +0000 (15:22 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Thu, 4 Aug 2011 13:51:22 +0000 (15:51 +0200)
commit4f4321c11ff6e98583846bfd6f0e81954924b003
tree5b4c7f185539ed6a91b1c63c0841de7cff6a3ac5
parentd35bf9ade5293171f13bc5fd1460920a258e3e39
usb: use iovecs in USBPacket

Zap data pointer from USBPacket, add a QEMUIOVector instead.
Add a bunch of helper functions to manage USBPacket data.
Switch over users to the new interface.

Note that USBPacket->len was used for two purposes:  First to
pass in the buffer size and second to return the number of
transfered bytes or the status code on async transfers.  There
is a new result variable for the latter.  A new status code
was added to catch uninitialized result.

Nobody creates iovecs with more than one element (yet).
Some users are (temporarely) limited to iovecs with a single
element to keep the patch size as small as possible.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
21 files changed:
Makefile.objs
hw/bt-hid.c
hw/milkymist-softusb.c
hw/usb-bt.c
hw/usb-ccid.c
hw/usb-ehci.c
hw/usb-hid.c
hw/usb-hub.c
hw/usb-libhw.c [new file with mode: 0644]
hw/usb-msd.c
hw/usb-musb.c
hw/usb-net.c
hw/usb-ohci.c
hw/usb-serial.c
hw/usb-uhci.c
hw/usb-wacom.c
hw/usb.c
hw/usb.h
usb-bsd.c
usb-linux.c
usb-redir.c