From: Paolo Bonzini <pbonzini@redhat.com>
To: "Richard W.M. Jones" <rjones@redhat.com>,
Markus Armbruster <armbru@redhat.com>
Cc: QEMU Development <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Writing a C library to generate qemu command lines and configuration files
Date: Tue, 2 May 2017 17:54:44 +0200 [thread overview]
Message-ID: <86128a38-af03-5ee1-7de6-124384e3d2a2@redhat.com> (raw)
In-Reply-To: <20170502145913.GF16511@redhat.com>
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? 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.
Paolo
> $ qemu-system-x86_64 -name foo,,bar -writeconfig - -hda die
> # qemu config file
>
> [name]
> guest = "foo,bar"
next prev parent reply other threads:[~2017-05-02 15:54 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 [this message]
2017-05-02 16:37 ` Markus Armbruster
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=86128a38-af03-5ee1-7de6-124384e3d2a2@redhat.com \
--to=pbonzini@redhat.com \
--cc=armbru@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 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).