From: Markus Armbruster <armbru@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Richard W.M. Jones" <rjones@redhat.com>,
QEMU Development <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Writing a C library to generate qemu command lines and configuration files
Date: Tue, 02 May 2017 18:37:54 +0200 [thread overview]
Message-ID: <871ss7cizh.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <86128a38-af03-5ee1-7de6-124384e3d2a2@redhat.com> (Paolo Bonzini's message of "Tue, 2 May 2017 17:54:44 +0200")
Paolo Bonzini <pbonzini@redhat.com> writes:
> On 02/05/2017 16:59, Richard W.M. Jones wrote:
>>> To answer your question: you have to double comma after '=', or else it
>>> terminates the value. There is no other quoting.
>>
>> Hmm, is that really right?
I should avoid absolutes when it comes to QemuOpts...
>> It seems to me that any comma must be
>> doubled. For example:
>>
>> $ qemu-system-x86_64 -name foo,bar -writeconfig - -hda die
>> qemu-system-x86_64: -name foo,bar: Invalid parameter 'bar'
>
> That's because, as you found out, "-name" is not a simple option but a
> compound one; "-name foo" is short for "-name guest=foo" (compare
> "-device e1000").
>
> The grammar mentioned in util/keyval.c says that you have to double
> comma in a value, *and* comma is completely invalid in a key.
>
> If you have '=', you have to double commas after it and cannot use it
> before.
>
> If you have no '=' at all, then you have to double comma too.
Yes. My description wasn't precise enough, sorry.
Please take note that the grammar in util/keyval.c does *not* produce
the exact QemuOpts language. It's close, but it doesn't reproduce all
corner cases. Anything it does produce should have the same meaning in
QemuOpts.
> Paolo
>
>> $ qemu-system-x86_64 -name foo,,bar -writeconfig - -hda die
>> # qemu config file
>>
>> [name]
>> guest = "foo,bar"
prev parent reply other threads:[~2017-05-02 16:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-02 8:35 [Qemu-devel] Writing a C library to generate qemu command lines and configuration files Richard W.M. Jones
2017-05-02 14:28 ` Markus Armbruster
2017-05-02 14:59 ` Richard W.M. Jones
2017-05-02 15:54 ` Paolo Bonzini
2017-05-02 16:37 ` Markus Armbruster [this message]
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=871ss7cizh.fsf@dusky.pond.sub.org \
--to=armbru@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rjones@redhat.com \
/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.