Commit a62acdc0cc5308706e2503557a09828979b59a12

Authored by Jan Kiszka
Committed by Anthony Liguori
1 parent 8d2ba1fb

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>
hw/pci-hotplug.c
... ... @@ -153,6 +153,10 @@ void pci_device_hot_add(Monitor *mon, const char *pci_addr, const char *type,
153 153 pci_addr += 9;
154 154 }
155 155  
  156 + if (!opts) {
  157 + opts = "";
  158 + }
  159 +
156 160 if (!strcmp(pci_addr, "auto"))
157 161 pci_addr = NULL;
158 162  
... ...
qemu-monitor.hx
... ... @@ -506,7 +506,7 @@ Add drive to PCI storage controller.
506 506 ETEXI
507 507  
508 508 #if defined(TARGET_I386)
509   - { "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" },
  509 + { "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" },
510 510 #endif
511 511 STEXI
512 512 @item pci_add
... ...