aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/pci-hotplug.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c
index 7e5c51dfe7..9e8e6ed425 100644
--- a/hw/pci-hotplug.c
+++ b/hw/pci-hotplug.c
@@ -93,6 +93,7 @@ static int scsi_hot_add(DeviceState *adapter, DriveInfo *dinfo, int printinfo)
*/
dinfo->unit = qemu_opt_get_number(dinfo->opts, "unit", -1);
scsidev = scsi_bus_legacy_add_drive(scsibus, dinfo, dinfo->unit);
+ dinfo->unit = scsidev->id;
if (printinfo)
qemu_error("OK bus %d, unit %d\n", scsibus->busnr, scsidev->id);