Received: from eggs.gnu.org ([2001:4830:134:3::10]:58791) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1Pp0-0003Vi-MO for qemu-devel@nongnu.org; Mon, 22 Jul 2013 19:47:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V1Pot-00048S-KH for qemu-devel@nongnu.org; Mon, 22 Jul 2013 19:47:18 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Tue, 23 Jul 2013 01:46:30 +0200 Message-Id: <1374536796-13983-50-git-send-email-afaerber@suse.de> In-Reply-To: <1374536796-13983-1-git-send-email-afaerber@suse.de> References: <1374536796-13983-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] [PULL 49/55] 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 , =?UTF-8?q?Andreas=20F=C3=A4rber?= , qemu-stable@nongnu.org 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=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