diff options
author | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2020-05-20 16:11:07 +0100 |
---|---|---|
committer | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2020-06-01 18:44:27 +0100 |
commit | 89cf4fe34f4afa671a2ab5d9430021ea12106274 (patch) | |
tree | 00612da0cad52aa0080081efb8ba34cf9c701b47 /include/monitor | |
parent | 2f0c285aaac5fdc4c5c2f8e03fa8c11e679c50c4 (diff) | |
download | qemu-89cf4fe34f4afa671a2ab5d9430021ea12106274.zip qemu-89cf4fe34f4afa671a2ab5d9430021ea12106274.tar.gz qemu-89cf4fe34f4afa671a2ab5d9430021ea12106274.tar.bz2 |
hmp: Implement qom-get HMP command
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
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20200520151108.160598-2-dgilbert@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'include/monitor')
-rw-r--r-- | include/monitor/hmp.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/monitor/hmp.h b/include/monitor/hmp.h index e33ca5a..c986cfd 100644 --- a/include/monitor/hmp.h +++ b/include/monitor/hmp.h @@ -96,6 +96,7 @@ void hmp_info_memdev(Monitor *mon, const QDict *qdict); void hmp_info_numa(Monitor *mon, const QDict *qdict); void hmp_info_memory_devices(Monitor *mon, const QDict *qdict); void hmp_qom_list(Monitor *mon, const QDict *qdict); +void hmp_qom_get(Monitor *mon, const QDict *qdict); void hmp_qom_set(Monitor *mon, const QDict *qdict); void hmp_info_qom_tree(Monitor *mon, const QDict *dict); void object_add_completion(ReadLineState *rs, int nb_args, const char *str); |