summaryrefslogtreecommitdiff
path: root/hw/pci
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2013-04-03 12:41:46 +0200
committerKevin Wolf <kwolf@redhat.com>2013-04-05 18:58:05 +0200
commit76534da749ceb3b4c13ec09b173bcf6d6c2e36d4 (patch)
treea3bb27ce98ab5356b05eca7a6960093468763840 /hw/pci
parentd05ef160453e98546a4197496dc8a3cb2defac53 (diff)
downloadqemu-76534da749ceb3b4c13ec09b173bcf6d6c2e36d4.tar.gz
usb-storage: Forward serial number to scsi-disk
usb-storage takes care to fetch the USB serial number from -drive options, but it neglected to pass its own 'serial' property to the scsi-disk it creates. With this patch, the 'serial' qdev property and the 'serial' option in -drive behave the same and correctly apply the serial number on both USB and SCSI level. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/pci')
-rw-r--r--hw/pci/pci-hotplug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/pci/pci-hotplug.c b/hw/pci/pci-hotplug.c
index f38df30540..180ee07fef 100644
--- a/hw/pci/pci-hotplug.c
+++ b/hw/pci/pci-hotplug.c
@@ -99,7 +99,7 @@ static int scsi_hot_add(Monitor *mon, DeviceState *adapter,
dinfo->unit = qemu_opt_get_number(dinfo->opts, "unit", -1);
dinfo->bus = scsibus->busnr;
scsidev = scsi_bus_legacy_add_drive(scsibus, dinfo->bdrv, dinfo->unit,
- false, -1);
+ false, -1, NULL);
if (!scsidev) {
return -1;
}