From: Markus Armbruster <armbru@redhat.com>
To: "Dr. David Alan Gilbert \(git\)" <dgilbert@redhat.com>
Cc: berrange@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com,
clg@kaod.org, Paolo Bonzini <pbonzini@redhat.com>,
afaerber@suse.de
Subject: Re: [PATCH 1/2] hmp: Implement qom-get HMP command
Date: Mon, 25 May 2020 11:02:23 +0200 [thread overview]
Message-ID: <87sgfoe6ao.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <20200520151108.160598-2-dgilbert@redhat.com> (David Alan Gilbert's message of "Wed, 20 May 2020 16:11:07 +0100")
"Dr. David Alan Gilbert (git)" <dgilbert@redhat.com> writes:
> From: "Dr. David Alan Gilbert" <dgilbert@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.
next prev parent reply other threads:[~2020-05-25 9:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-20 15:11 [PATCH 0/2] HMP: qom-get and set Dr. David Alan Gilbert (git)
2020-05-20 15:11 ` [PATCH 1/2] hmp: Implement qom-get HMP command Dr. David Alan Gilbert (git)
2020-05-20 16:44 ` Philippe Mathieu-Daudé
2020-05-25 9:02 ` Markus Armbruster [this message]
2020-05-29 6:59 ` Markus Armbruster
2020-05-20 15:11 ` [PATCH 2/2] hmp: Simplify qom_set Dr. David Alan Gilbert (git)
2020-05-20 16:47 ` Philippe Mathieu-Daudé
2020-05-20 19:03 ` Dr. David Alan Gilbert
2020-05-25 8:54 ` Markus Armbruster
2020-05-28 14:06 ` Dr. David Alan Gilbert
2020-05-28 15:12 ` Philippe Mathieu-Daudé
2020-05-29 6:20 ` Markus Armbruster
2020-05-29 9:07 ` Dr. David Alan Gilbert
2020-05-29 18:48 ` [PATCH 0/2] HMP: qom-get and set Dr. David Alan Gilbert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sgfoe6ao.fsf@dusky.pond.sub.org \
--to=armbru@redhat.com \
--cc=afaerber@suse.de \
--cc=berrange@redhat.com \
--cc=clg@kaod.org \
--cc=dgilbert@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.