[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/2] hmp: Implement qom-get HMP command
From: |
Markus Armbruster |
Subject: |
Re: [PATCH 1/2] hmp: Implement qom-get HMP command |
Date: |
Mon, 25 May 2020 11:02:23 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
"Dr. David Alan Gilbert (git)" <address@hidden> writes:
> From: "Dr. David Alan Gilbert" <address@hidden>
>
> 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.
- [PATCH 0/2] HMP: qom-get and set, Dr. David Alan Gilbert (git), 2020/05/20
- [PATCH 1/2] hmp: Implement qom-get HMP command, Dr. David Alan Gilbert (git), 2020/05/20
- [PATCH 2/2] hmp: Simplify qom_set, Dr. David Alan Gilbert (git), 2020/05/20
- Re: [PATCH 2/2] hmp: Simplify qom_set, Philippe Mathieu-Daudé, 2020/05/20
- Re: [PATCH 2/2] hmp: Simplify qom_set, Dr. David Alan Gilbert, 2020/05/20
- Re: [PATCH 2/2] hmp: Simplify qom_set, Markus Armbruster, 2020/05/25
- Re: [PATCH 2/2] hmp: Simplify qom_set, Dr. David Alan Gilbert, 2020/05/28
- Re: [PATCH 2/2] hmp: Simplify qom_set, Philippe Mathieu-Daudé, 2020/05/28
- Re: [PATCH 2/2] hmp: Simplify qom_set, Markus Armbruster, 2020/05/29
- Re: [PATCH 2/2] hmp: Simplify qom_set, Dr. David Alan Gilbert, 2020/05/29
Re: [PATCH 0/2] HMP: qom-get and set, Dr. David Alan Gilbert, 2020/05/29