From: Andreas Färber Date: Sun, 21 Jul 2013 10:20:15 +0000 (+0200) Subject: megasas: Legacy command line handling fix X-Git-Tag: TizenStudio_2.0_p2.3.2~208^2~1578^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=22d6aa03fd87ba5f219d26bc1810646d0f95842a;p=sdk%2Femulator%2Fqemu.git megasas: Legacy command line handling fix Only apply legacy command line handling when the device has not been hot-plugged. Propagate failure of legacy command line handling. Cc: qemu-stable@nongnu.org Acked-by: Paolo Bonzini Signed-off-by: Andreas Färber --- diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c index 55d5b73..2ae4346 100644 --- a/hw/scsi/megasas.c +++ b/hw/scsi/megasas.c @@ -2098,6 +2098,7 @@ static const struct SCSIBusInfo megasas_scsi_info = { static int megasas_scsi_init(PCIDevice *dev) { + DeviceState *d = DEVICE(dev); MegasasState *s = MEGASAS(dev); uint8_t *pci_conf; int i, bar_type; @@ -2170,7 +2171,9 @@ static int megasas_scsi_init(PCIDevice *dev) } scsi_bus_new(&s->bus, DEVICE(dev), &megasas_scsi_info, NULL); - scsi_bus_legacy_handle_cmdline(&s->bus); + if (!d->hotplugged) { + return scsi_bus_legacy_handle_cmdline(&s->bus); + } return 0; }