summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@web.de>2009-06-26 00:04:10 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-06-29 14:18:07 -0500
commita62acdc0cc5308706e2503557a09828979b59a12 (patch)
treea8621c08e5146013d1703901b6edccfacfa3cf6e
parent8d2ba1fb9c8e7006e10d71fa51a020977f14c8b0 (diff)
downloadqemu-a62acdc0cc5308706e2503557a09828979b59a12.tar.gz
qemu-a62acdc0cc5308706e2503557a09828979b59a12.tar.bz2
qemu-a62acdc0cc5308706e2503557a09828979b59a12.zip
monitor: Make pci_add device options truely optional
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--hw/pci-hotplug.c4
-rw-r--r--qemu-monitor.hx2
2 files changed, 5 insertions, 1 deletions
diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c
index f7d38a70d6..d0f2911d65 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 932a013b51..a87530ca7c 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|[[<domain>:]<bus>:]<slot> 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|[[<domain>:]<bus>:]<slot> nic|storage [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]...", "hot-add PCI device" },
#endif
STEXI
@item pci_add