qemu-devel
[Top][All Lists]
Advanced

[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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]