projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
53f77e4
)
scripts: Add support for path as argument of qom-tree
author
Martin Cerveny
<M.Cerveny@computer.org>
Wed, 13 May 2015 12:14:54 +0000
(14:14 +0200)
committer
Andreas Färber
<afaerber@suse.de>
Fri, 19 Jun 2015 08:29:14 +0000
(10:29 +0200)
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
patch
|
blob
|
history
diff --git
a/scripts/qmp/qom-tree
b/scripts/qmp/qom-tree
index aea11d4b1a9c86032ebe6fcb3017def25a97043a..906fcd2640b399a26d5109412c15b69f439f1506 100755
(executable)
--- 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)