"add drive to PCI storage controller" },
{ "pci_add", "sss", pci_device_hot_add, "pci_addr=auto|[[<domain>:]<bus>:]<slot> nic|storage [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]...", "hot-add PCI device" },
{ "pci_del", "s", pci_device_hot_remove, "pci_addr=[[<domain>:]<bus>:]<slot>", "hot remove PCI device" },
- { "host_net_add", "ss", net_host_device_add,
- "[tap,user,socket,vde,dump] options", "add host VLAN client" },
+ { "host_net_add", "ss?", net_host_device_add,
+ "tap|user|socket|vde|dump [options]", "add host VLAN client" },
{ "host_net_remove", "is", net_host_device_remove,
"vlan_id name", "remove host VLAN client" },
#endif
monitor_printf(mon, "invalid host network device %s\n", device);
return;
}
- net_client_init(device, opts);
+ if (net_client_init(device, opts ? : "") < 0) {
+ monitor_printf(mon, "adding host network device %s failed\n", device);
+ }
}
void net_host_device_remove(Monitor *mon, int vlan_id, const char *device)