[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [COMMIT 7101174] allow if=none for drive_add
From: |
Anthony Liguori |
Subject: |
[Qemu-commits] [COMMIT 7101174] allow if=none for drive_add |
Date: |
Mon, 05 Oct 2009 14:53:30 -0000 |
From: Gerd Hoffmann <address@hidden>
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 <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c
index 833d5d8..d40a3bd 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;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [COMMIT 7101174] allow if=none for drive_add,
Anthony Liguori <=