From: Jan Kiszka Date: Thu, 25 Jun 2009 22:04:10 +0000 (+0200) Subject: monitor: Make pci_add device options truely optional X-Git-Tag: v0.11.0-rc0~194 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a62acdc0cc5308706e2503557a09828979b59a12;p=thirdparty%2Fqemu.git monitor: Make pci_add device options truely optional Signed-off-by: Jan Kiszka Signed-off-by: Anthony Liguori --- diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c index f7d38a70d65..d0f2911d650 100644 --- a/hw/pci-hotplug.c +++ b/hw/pci-hotplug.c @@ -153,6 +153,10 @@ void pci_device_hot_add(Monitor *mon, const char *pci_addr, const char *type, pci_addr += 9; } + if (!opts) { + opts = ""; + } + if (!strcmp(pci_addr, "auto")) pci_addr = NULL; diff --git a/qemu-monitor.hx b/qemu-monitor.hx index 932a013b510..a87530ca7c0 100644 --- a/qemu-monitor.hx +++ b/qemu-monitor.hx @@ -506,7 +506,7 @@ Add drive to PCI storage controller. ETEXI #if defined(TARGET_I386) - { "pci_add", "sss", pci_device_hot_add, "auto|[[:]:] nic|storage [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]...", "hot-add PCI device" }, + { "pci_add", "sss?", pci_device_hot_add, "auto|[[:]:] nic|storage [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]...", "hot-add PCI device" }, #endif STEXI @item pci_add