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