aboutsummaryrefslogtreecommitdiff
path: root/device-hotplug.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-03-15 09:13:06 +0000
committerPeter Maydell <peter.maydell@linaro.org>2016-03-15 09:13:06 +0000
commit1a8b40816839f71ef2076bbd88c4aecaf5b8d75b (patch)
treeea7a584055c8d1b51030e86d6574aae0172a40ab /device-hotplug.c
parent618a5a8bc52ba0f2ecbb3dffd01e657f4d841f75 (diff)
parent0d611402a1e53a968a03c7c5e2f87114be92a319 (diff)
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
Block layer patches # gpg: Signature made Mon 14 Mar 2016 16:36:52 GMT using RSA key ID C88F2FD6 # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" * remotes/kevin/tags/for-upstream: (40 commits) iotests: Add test for QMP event rates monitor: Use QEMU_CLOCK_VIRTUAL for the event queue in qtest mode monitor: Separate QUORUM_REPORT_BAD events according to the node name quorum: Fix crash in quorum_aio_cb() iotests: Correct 081's reference output block: Remove unused typedef of BlockDriverDirtyHandler block: Move block dirty bitmap code to separate files typedefs: Add BdrvDirtyBitmap block: Include hbitmap.h in block.h backup: Use Bitmap to replace "s->bitmap" vpc: Use BB functions in .bdrv_create() vmdk: Use BB functions in .bdrv_create() vhdx: Use BB functions in .bdrv_create() vdi: Use BB functions in .bdrv_create() sheepdog: Use BB functions in .bdrv_create() qed: Use BB functions in .bdrv_create() qcow2: Use BB functions in .bdrv_create() qcow: Use BB functions in .bdrv_create() parallels: Use BB functions in .bdrv_create() block: Introduce blk_set_allow_write_beyond_eof() ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'device-hotplug.c')
-rw-r--r--device-hotplug.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/device-hotplug.c b/device-hotplug.c
index 9a7cd669d5..3e5cdaad10 100644
--- a/device-hotplug.c
+++ b/device-hotplug.c
@@ -30,6 +30,7 @@
#include "qemu/config-file.h"
#include "sysemu/sysemu.h"
#include "monitor/monitor.h"
+#include "block/block_int.h"
static DriveInfo *add_init_drive(const char *optstr)
{
@@ -55,6 +56,12 @@ void hmp_drive_add(Monitor *mon, const QDict *qdict)
{
DriveInfo *dinfo = NULL;
const char *opts = qdict_get_str(qdict, "opts");
+ bool node = qdict_get_try_bool(qdict, "node", false);
+
+ if (node) {
+ hmp_drive_add_node(mon, opts);
+ return;
+ }
dinfo = add_init_drive(opts);
if (!dinfo) {