aboutsummaryrefslogtreecommitdiff
path: root/hw/pci-hotplug.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2009-09-25 21:42:48 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-10-05 09:32:49 -0500
commit7101174e5cd37ed57fadbba9515f2f3e15aec47d (patch)
tree2b333b88e7d54be73aee2d1a1a965f5817b094e0 /hw/pci-hotplug.c
parent4db49dc087dcac6423e729a4bb076052c5e4b615 (diff)
allow if=none for drive_add
Allow adding unconnected host drives by specifying if=none like it is possible with -drive. They can be put in use with drive attributes, like this: drive_add dummy if=none,id=mydisk,file=/some/disk.img device_add virtio-blk-pci,drive=mydisk which is the monitor aequivalent to these command line switches: -drive if=none,id=mydisk,file=/some/disk.img -device virtio-blk-pci,drive=mydisk Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/pci-hotplug.c')
-rw-r--r--hw/pci-hotplug.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c
index 833d5d8a98..d40a3bd0cd 100644
--- a/hw/pci-hotplug.c
+++ b/hw/pci-hotplug.c
@@ -91,6 +91,9 @@ void drive_hot_add(Monitor *mon, const QDict *qdict)
dinfo->bus,
dinfo->unit);
break;
+ case IF_NONE:
+ monitor_printf(mon, "OK\n");
+ break;
default:
monitor_printf(mon, "Can't hot-add drive to type %d\n", type);
goto err;