From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41970) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V0qoK-0004CR-9t for qemu-devel@nongnu.org; Sun, 21 Jul 2013 06:24:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V0qoJ-0001Te-E2 for qemu-devel@nongnu.org; Sun, 21 Jul 2013 06:24:16 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sun, 21 Jul 2013 12:24:07 +0200 Message-Id: <1374402247-21828-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH qom-next] megasas: Legacy command line handling fix List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , qemu-stable@nongnu.org, Hannes Reinecke , =?UTF-8?q?Andreas=20F=C3=A4rber?= 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 Signed-off-by: Andreas F=C3=A4rber --- hw/scsi/megasas.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 =3D= { =20 static int megasas_scsi_init(PCIDevice *dev) { + DeviceState *d =3D DEVICE(dev); MegasasState *s =3D MEGASAS(dev); uint8_t *pci_conf; int i, bar_type; @@ -2170,7 +2171,9 @@ static int megasas_scsi_init(PCIDevice *dev) } =20 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; } =20 --=20 1.8.1.4