[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v3 04/14] scripts: Add support for path as argument o
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PULL v3 04/14] scripts: Add support for path as argument of qom-tree |
Date: |
Fri, 19 Jun 2015 19:24:37 +0200 |
From: Martin Cerveny <address@hidden>
Add processing of optional argument path as "tree base".
Signed-off-by: Martin Cerveny <address@hidden>
Signed-off-by: Andreas Färber <address@hidden>
---
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
- [Qemu-devel] [PULL v3 02/14] qdev: Free property names after registering gpio aliases, (continued)
- [Qemu-devel] [PULL v3 02/14] qdev: Free property names after registering gpio aliases, Andreas Färber, 2015/06/19
- [Qemu-devel] [PULL v3 12/14] qom: Don't pass string table to object_get_enum() function, Andreas Färber, 2015/06/19
- [Qemu-devel] [PULL v3 07/14] vl: Create (most) objects before creating chardev backends, Andreas Färber, 2015/06/19
- [Qemu-devel] [PULL v3 08/14] qom: Add helper function for getting user objects root, Andreas Färber, 2015/06/19
- [Qemu-devel] [PULL v3 06/14] doc: Document user creatable object types in help text, Andreas Färber, 2015/06/19
- [Qemu-devel] [PULL v3 13/14] qdev: Deprecated qdev_init() is finally unused, drop, Andreas Färber, 2015/06/19
- [Qemu-devel] [PULL v3 11/14] qom: Add an object_property_add_enum() helper function, Andreas Färber, 2015/06/19
- [Qemu-devel] [PULL v3 10/14] qom: Make enum string tables const-correct, Andreas Färber, 2015/06/19
- [Qemu-devel] [PULL v3 09/14] qom: Add object_new_with_props() / object_new_withpropv() helpers, Andreas Färber, 2015/06/19
- [Qemu-devel] [PULL v3 03/14] tests: Use qtest_add_data_func() consistently, Andreas Färber, 2015/06/19
- [Qemu-devel] [PULL v3 04/14] scripts: Add support for path as argument of qom-tree,
Andreas Färber <=
- Re: [Qemu-devel] [PULL v2 00/14] QOM devices patch queue 2015-06-19, Peter Maydell, 2015/06/22