summaryrefslogtreecommitdiff
path: root/hw/usb/bus.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2013-06-12 13:01:49 +0200
committerGerd Hoffmann <kraxel@redhat.com>2013-06-24 08:41:07 +0200
commit71938a09d2b9fd4007515fec6c395916cb08f868 (patch)
tree94eb7456d3f842d2dd7ee3edf191249b149b0bce /hw/usb/bus.c
parent628e54857a82a3cb65ef96c12640c30d6307a064 (diff)
downloadqemu-71938a09d2b9fd4007515fec6c395916cb08f868.tar.gz
usb: add serial bus property
This patch adds a serial property for all usb devices, which can be used to set the serial number of a usb device (as listed by lsusb -v) to a specific value. Applies to emulated devices only. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb/bus.c')
-rw-r--r--hw/usb/bus.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/usb/bus.c b/hw/usb/bus.c
index d1827be101..f83d1de6cd 100644
--- a/hw/usb/bus.c
+++ b/hw/usb/bus.c
@@ -13,6 +13,7 @@ static int usb_qdev_exit(DeviceState *qdev);
static Property usb_props[] = {
DEFINE_PROP_STRING("port", USBDevice, port_path),
+ DEFINE_PROP_STRING("serial", USBDevice, serial),
DEFINE_PROP_BIT("full-path", USBDevice, flags,
USB_DEV_FLAG_FULL_PATH, true),
DEFINE_PROP_END_OF_LIST()