Skip to contentSkip to conversation

monitor: Make pci_add device options truely optional

PATCH In review Jan Kiszka 1 participant 1 message Jun 25, 2009

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 2/2 monitor: Make pci_add device options truely optional

---

 hw/pci-hotplug.c |    4 ++++
 qemu-monitor.hx  |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)
hw/pci-hotplug.c +4 -0
index f7d38a7..d0f2911 100644
@@ -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;
 
qemu-monitor.hx +1 -1
index 2ea9840..2d1792d 100644
@@ -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