qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

scripts: Add support for path as argument of qom-tree

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>

authored by

Martin Cerveny and committed by
Andreas Färber
ff5397bc 53f77e45

+7 -2
+7 -2
scripts/qmp/qom-tree
··· 65 65 print '' 66 66 for item in items: 67 67 if item['type'].startswith('child<'): 68 - list_node(path + '/' + item['name']) 68 + list_node((path if (path != '/') else '') + '/' + item['name']) 69 + 70 + if len(args) == 0: 71 + path = '/' 72 + else: 73 + path = args[0] 69 74 70 - list_node('/machine') 75 + list_node(path)