qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Benoît Canet" <benoit@irqsave.net>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, famz@redhat.com,
	"Benoît Canet" <benoit@irqsave.net>,
	armbru@redhat.com, stefanha@redhat.com
Subject: [Qemu-devel] [PATCH 2/2] block: Allow the user to define "node-name" option.
Date: Thu,  7 Nov 2013 16:01:43 +0100	[thread overview]
Message-ID: <1383836503-25447-3-git-send-email-benoit@irqsave.net> (raw)
In-Reply-To: <1383836503-25447-1-git-send-email-benoit@irqsave.net>

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 <benoit@irqsave.net>
---
 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

  parent reply	other threads:[~2013-11-07 15:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-07 15:01 [Qemu-devel] [PATCH 0/2] Giving names to graph's BlockDriverState Benoît Canet
2013-11-07 15:01 ` [Qemu-devel] [PATCH 1/2] block: Add bs->node_name to hold the name of a bs node of the bs graph Benoît Canet
2013-11-07 20:23   ` Eric Blake
2013-11-07 21:09     ` Benoît Canet
2013-11-08  9:51     ` Kevin Wolf
2013-11-07 20:54   ` Jeff Cody
2013-11-07 21:11     ` Benoît Canet
2013-11-08  8:19   ` Fam Zheng
2013-11-07 15:01 ` Benoît Canet [this message]
2013-11-07 20:31   ` [Qemu-devel] [PATCH 2/2] block: Allow the user to define "node-name" option Eric Blake
2013-11-08  9:55   ` Kevin Wolf
2013-11-07 20:34 ` [Qemu-devel] [PATCH 0/2] Giving names to graph's BlockDriverState Eric Blake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1383836503-25447-3-git-send-email-benoit@irqsave.net \
    --to=benoit@irqsave.net \
    --cc=armbru@redhat.com \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).