From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MJx3a-0002TJ-6G for qemu-devel@nongnu.org; Thu, 25 Jun 2009 18:04:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MJx3V-0002RO-7C for qemu-devel@nongnu.org; Thu, 25 Jun 2009 18:04:33 -0400 Received: from [199.232.76.173] (port=53015 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MJx3V-0002RJ-22 for qemu-devel@nongnu.org; Thu, 25 Jun 2009 18:04:29 -0400 Received: from fmmailgate02.web.de ([217.72.192.227]:60822) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MJx3U-0001RF-5o for qemu-devel@nongnu.org; Thu, 25 Jun 2009 18:04:28 -0400 Message-ID: <4A43F45A.5070906@web.de> Date: Fri, 26 Jun 2009 00:04:10 +0200 From: Jan Kiszka MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig676A9BB0BADBA7242527AC30" Sender: jan.kiszka@web.de Subject: [Qemu-devel] [PATCH 2/2] monitor: Make pci_add device options truely optional List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig676A9BB0BADBA7242527AC30 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Signed-off-by: Jan Kiszka --- hw/pci-hotplug.c | 4 ++++ qemu-monitor.hx | 2 +- 2 files changed, 5 insertions(+), 1 deletions(-) diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c index f7d38a7..d0f2911 100644 --- a/hw/pci-hotplug.c +++ b/hw/pci-hotplug.c @@ -153,6 +153,10 @@ void pci_device_hot_add(Monitor *mon, const char *pc= i_addr, const char *type, pci_addr +=3D 9; } =20 + if (!opts) { + opts =3D ""; + } + if (!strcmp(pci_addr, "auto")) pci_addr =3D NULL; =20 diff --git a/qemu-monitor.hx b/qemu-monitor.hx index 2ea9840..2d1792d 100644 --- a/qemu-monitor.hx +++ b/qemu-monitor.hx @@ -506,7 +506,7 @@ Add drive to PCI storage controller. ETEXI =20 #if defined(TARGET_I386) - { "pci_add", "sss", pci_device_hot_add, "auto|[[:]:] nic|storage [[vlan=3Dn][,macaddr=3Daddr][,model=3Dtype]] [file=3Dfile= ][,if=3Dtype][,bus=3Dnr]...", "hot-add PCI device" }, + { "pci_add", "sss?", pci_device_hot_add, "auto|[[:]:] nic|storage [[vlan=3Dn][,macaddr=3Daddr][,model=3Dtype]] [file=3Dfil= e][,if=3Dtype][,bus=3Dnr]...", "hot-add PCI device" }, #endif STEXI @item pci_add --------------enig676A9BB0BADBA7242527AC30 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkpD9FoACgkQniDOoMHTA+mDzQCfS2p6PF991GKU+Eu7JvMpwKm6 tFIAnjHIJdfftg8DH5H2vxCerpFbutwE =febT -----END PGP SIGNATURE----- --------------enig676A9BB0BADBA7242527AC30--