From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: MkfsSion <mkfssion@mkfssion.com>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Markus Armbruster <armbru@redhat.com>
Subject: Re: [PATCH] vl: Add opts to device opts list when using JSON syntax for -device
Date: Tue, 21 Dec 2021 09:25:00 +0100 [thread overview]
Message-ID: <d6a7cb7c-5813-158a-a86b-71cfab90402f@redhat.com> (raw)
In-Reply-To: <20211220084544.54902-1-mkfssion@mkfssion.com>
Cc'ing Markus.
On 12/20/21 09:45, MkfsSion wrote:
> When using JSON syntax for -device, -set option can not find device
> specified in JSON by id field. The following commandline is an example:
>
> $ qemu-system-x86_64 -device '{"id":"foo"}' -set device.foo.bar=1
> qemu-system-x86_64: -set device.foo.bar=1: there is no device "foo" defined
>
> The patch adds device opts to device opts list when a device opts get
> parsed.
>
> Signed-off-by: MkfsSion <mkfssion@mkfssion.com>
BTW per:
https://www.qemu.org/docs/master/devel/submitting-a-patch.html#patch-emails-must-include-a-signed-off-by-line
"Please use your real name to sign a patch (not an alias or acronym)."
> ---
> softmmu/vl.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/softmmu/vl.c b/softmmu/vl.c
> index 620a1f1367..0dd5acbc1a 100644
> --- a/softmmu/vl.c
> +++ b/softmmu/vl.c
> @@ -3400,6 +3400,8 @@ void qemu_init(int argc, char **argv, char **envp)
> loc_save(&opt->loc);
> assert(opt->opts != NULL);
> QTAILQ_INSERT_TAIL(&device_opts, opt, next);
> + qemu_opts_from_qdict(qemu_find_opts_err("device", &error_fatal),
> + opt->opts, &error_fatal);
> } else {
> if (!qemu_opts_parse_noisily(qemu_find_opts("device"),
> optarg, true)) {
next prev parent reply other threads:[~2021-12-21 8:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-20 8:45 [PATCH] vl: Add opts to device opts list when using JSON syntax for -device MkfsSion
2021-12-21 8:25 ` Philippe Mathieu-Daudé [this message]
2021-12-21 10:09 ` MkfsSion
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=d6a7cb7c-5813-158a-a86b-71cfab90402f@redhat.com \
--to=philmd@redhat.com \
--cc=armbru@redhat.com \
--cc=mkfssion@mkfssion.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).