summary refs log tree commit diff stats
path: root/hw/scsi.h
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/scsi.h
parentd05ef160453e98546a4197496dc8a3cb2defac53 (diff)
downloadfocaccia-qemu-76534da749ceb3b4c13ec09b173bcf6d6c2e36d4.tar.gz
focaccia-qemu-76534da749ceb3b4c13ec09b173bcf6d6c2e36d4.zip
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/scsi.h')
-rw-r--r--hw/scsi.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/scsi.h b/hw/scsi.h
index 33e2e0bdf1..02a1497d7a 100644
--- a/hw/scsi.h
+++ b/hw/scsi.h
@@ -160,7 +160,8 @@ static inline SCSIBus *scsi_bus_from_device(SCSIDevice *d)
 }
 
 SCSIDevice *scsi_bus_legacy_add_drive(SCSIBus *bus, BlockDriverState *bdrv,
-                                      int unit, bool removable, int bootindex);
+                                      int unit, bool removable, int bootindex,
+                                      const char *serial);
 int scsi_bus_legacy_handle_cmdline(SCSIBus *bus);
 
 /*