"Dr. David Alan Gilbert (git)" <dgilb...@redhat.com> writes:
> From: "Dr. David Alan Gilbert" <dgilb...@redhat.com> > > This started off as Andreas Färber's implementation from > March 2015, but after feedback from Paolo and Markus it morphed into > using the json output which handles structs reasonably. > > Use with qom-list to find the members of an object. > > (qemu) qom-get /backend/console[0]/device/vga.rom[0] size > 65536 > (qemu) qom-get /machine smm > "auto" > (qemu) qom-get /machine rtc-time > { > "tm_year": 120, > "tm_sec": 51, > "tm_hour": 9, > "tm_min": 50, > "tm_mon": 4, > "tm_mday": 20 > } > (qemu) qom-get /machine frob > Error: Property '.frob' not found (qemu) qom-get /machine peripheral "/machine/peripheral" Not this patch's fault, but WTF? Turns out it's simply what object_get_child_property() does. Paolo, is this what we want for qom-get? Also not this patch's fault: separating path and property feels like a pointless complication of the interface to me. Why {"execute": "qom-get", "arguments": {"path": "/machine", "property": "smm"}} and not {"execute": "qom-get", "arguments": {"path": "/machine/smm"}} ? Too late to change for QMP, I guess.