[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/2] block: Allow the user to define "node-name" opt
From: |
Benoît Canet |
Subject: |
[Qemu-devel] [PATCH 2/2] block: Allow the user to define "node-name" option. |
Date: |
Thu, 7 Nov 2013 16:01:43 +0100 |
As node-name is a separate name space as device-name we can enable it's
definition right now: nobody will use it so no harm involved.
Signed-off-by: Benoit Canet <address@hidden>
---
block.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/block.c b/block.c
index 230e71a..132981f 100644
--- a/block.c
+++ b/block.c
@@ -885,7 +885,8 @@ int bdrv_file_open(BlockDriverState **pbs, const char
*filename,
options = qdict_new();
}
- bs = bdrv_new("", NULL);
+ bs = bdrv_new("", qdict_get_try_str(options, "node-name"));
+ qdict_del(options, "node-name");
bs->options = options;
options = qdict_clone_shallow(options);
@@ -1007,7 +1008,8 @@ int bdrv_open_backing_file(BlockDriverState *bs, QDict
*options, Error **errp)
sizeof(backing_filename));
}
- bs->backing_hd = bdrv_new("", NULL);
+ bs->backing_hd = bdrv_new("", qdict_get_try_str(options, "node-name"));
+ qdict_del(options, "node-name");
if (bs->backing_format[0] != '\0') {
back_drv = bdrv_find_format(bs->backing_format);
--
1.8.3.2