qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: qemu-devel@nongnu.org
Cc: "Andreas Färber" <afaerber@suse.de>,
	"Martin Cerveny" <M.Cerveny@computer.org>,
	"Markus Armbruster" <armbru@redhat.com>
Subject: [Qemu-devel] [PULL v2 04/12] scripts: Add support for path as argument of qom-tree
Date: Wed, 27 May 2015 20:20:15 +0200	[thread overview]
Message-ID: <1432750824-27702-5-git-send-email-afaerber@suse.de> (raw)
In-Reply-To: <1432750824-27702-1-git-send-email-afaerber@suse.de>

From: Martin Cerveny <M.Cerveny@computer.org>

Add processing of optional argument path as "tree base".

Signed-off-by: Martin Cerveny <M.Cerveny@computer.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 scripts/qmp/qom-tree | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/scripts/qmp/qom-tree b/scripts/qmp/qom-tree
index aea11d4..906fcd2 100755
--- a/scripts/qmp/qom-tree
+++ b/scripts/qmp/qom-tree
@@ -65,6 +65,11 @@ def list_node(path):
     print ''
     for item in items:
         if item['type'].startswith('child<'):
-            list_node(path + '/' + item['name'])
+            list_node((path if (path != '/') else '')  + '/' + item['name'])
 
-list_node('/machine')
+if len(args) == 0:
+    path = '/'
+else:
+    path = args[0]
+
+list_node(path)
-- 
2.1.4

  parent reply	other threads:[~2015-05-27 18:20 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-27 18:20 [Qemu-devel] [PULL v2 00/12] QOM devices patch queue 2015-05-27 Andreas Färber
2015-05-27 18:20 ` [Qemu-devel] [PULL v2 01/12] qom: strdup() target property name on object_property_add_alias() Andreas Färber
2015-05-27 18:20 ` [Qemu-devel] [PULL v2 02/12] qdev: Free property names after registering gpio aliases Andreas Färber
2015-05-27 18:20 ` [Qemu-devel] [PULL v2 03/12] tests: Use qtest_add_data_func() consistently Andreas Färber
2015-05-27 18:20 ` Andreas Färber [this message]
2015-05-27 18:20 ` [Qemu-devel] [PULL v2 05/12] backends: Fix typename of 'policy' enum property in hostmem obj Andreas Färber
2015-05-27 18:20 ` [Qemu-devel] [PULL v2 06/12] doc: Document user creatable object types in help text Andreas Färber
2015-05-27 18:20 ` [Qemu-devel] [PULL v2 07/12] vl: Create (most) objects before creating chardev backends Andreas Färber
2015-06-19 10:03   ` Andreas Färber
2015-06-19 10:04     ` Paolo Bonzini
2015-06-19 10:49     ` Daniel P. Berrange
2015-05-27 18:20 ` [Qemu-devel] [PULL v2 08/12] qom: Add helper method for getting user objects root Andreas Färber
2015-05-27 18:20 ` [Qemu-devel] [PULL v2 09/12] qom: Add object_new_with_props() / object_new_withpropv() helpers Andreas Färber
2015-05-27 18:20 ` [Qemu-devel] [PULL v2 10/12] qom: Make enum string tables const-correct Andreas Färber
2015-05-27 18:20 ` [Qemu-devel] [PULL v2 11/12] qom: Add an object_property_add_enum() helper function Andreas Färber
2015-05-27 18:20 ` [Qemu-devel] [PULL v2 12/12] qom: Add object_property_add_const_link() Andreas Färber
2015-05-28 11:46 ` [Qemu-devel] [PULL v2 00/12] QOM devices patch queue 2015-05-27 Peter Maydell
2015-06-19  8:45   ` Andreas Färber
2015-06-19  8:56     ` Peter Maydell

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=1432750824-27702-5-git-send-email-afaerber@suse.de \
    --to=afaerber@suse.de \
    --cc=M.Cerveny@computer.org \
    --cc=armbru@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).