diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2011-11-18 16:32:00 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-11-22 10:33:30 +0100 |
commit | ce4e7e4661af433674f349ccdd5709b4b7a8b2fd (patch) | |
tree | 9a3708c7f2b195d95a3398df3452c36725158802 /hw/usb-msd.c | |
parent | 3a395142ba99197429a2378930d3c1551fc053cc (diff) | |
download | qemu-ce4e7e4661af433674f349ccdd5709b4b7a8b2fd.tar.gz |
usb-msd: do not register twice in the boot order
USB mass storage devices are registered twice in the boot order.
To avoid having to keep the two paths in sync, pass the bootindex
property down to the scsi-disk device and let it register itself.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/usb-msd.c')
-rw-r--r-- | hw/usb-msd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/usb-msd.c b/hw/usb-msd.c index 68e3756783..4c06950125 100644 --- a/hw/usb-msd.c +++ b/hw/usb-msd.c @@ -546,7 +546,8 @@ static int usb_msd_initfn(USBDevice *dev) usb_desc_init(dev); scsi_bus_new(&s->bus, &s->dev.qdev, &usb_msd_scsi_info); - s->scsi_dev = scsi_bus_legacy_add_drive(&s->bus, bs, 0, !!s->removable); + s->scsi_dev = scsi_bus_legacy_add_drive(&s->bus, bs, 0, !!s->removable, + s->conf.bootindex); if (!s->scsi_dev) { return -1; } @@ -562,7 +563,6 @@ static int usb_msd_initfn(USBDevice *dev) } } - add_boot_device_path(s->conf.bootindex, &dev->qdev, "/disk@0,0"); return 0; } |