All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Fabiano Rosas <farosas@suse.de>
Cc: qemu-devel@nongnu.org,
	"Daniel P . Berrangé" <berrange@redhat.com>,
	"Pierrick Bouvier" <pierrick.bouvier@oss.qualcomm.com>,
	"Kevin Wolf" <kwolf@redhat.com>,
	"Hanna Reitz" <hreitz@redhat.com>
Subject: Re: [PATCH v2 03/11] qemu-option: Remove short form options support
Date: Wed, 07 Oct 2026 09:08:52 +0200	[thread overview]
Message-ID: <87h5iyasxn.fsf@pond.sub.org> (raw)
In-Reply-To: <20260930221105.2262063-4-farosas@suse.de> (Fabiano Rosas's message of "Wed, 30 Sep 2026 19:10:57 -0300")

Fabiano Rosas <farosas@suse.de> writes:

> Option parameters without a value (i.e. key vs. key=val) are
> deprecated. The missing value is currently implied to be either "on"
> or "off" depending on whether the parameter name starts with "no".

Commit ccd3b3b811 (qemu-option: warn for short-form boolean options,
2020-11-09).  Six years of warnings should suffice.

> Remove the implied behavior and start rejecting option parameters
> without values by emitting the error message:
>
>  "Parameter 'foo' without a value."
>
> Two special cases remain:
>
> 1) The 'help' parameter is special and still supported. Keep a
>    positive value attached to it ("on").
>
>    Note that currently there is no validation for the value (if any)
>    attached to the help parameter. help, help=on, help=off, help=foo
>    all result in the help text being emitted. This is not changed by
>    this patch.

Really?

    $ qemu-system-x86_64 -chardev help=foo
    qemu-system-x86_64: -chardev help=foo: Invalid parameter 'help'

> 2) The empty value is allowed if the key is also empty. This can be
>    achieved in the command line by adding commas.
>    E.g.: share=on,, is parsed as:
>      key:"share" value:"on" and
>      key:"" value:"on"

I don't think so:

    $ qemu-system-x86_64 -object memory-backend-ram,id=mem0,share=on,,
    qemu-system-x86_64: -object memory-backend-ram,id=mem0,share=on,,: Parameter 'share' expects 'on' or 'off'

Set a breakpoint on qapi_bool_parse() to see the actual value.  It's
"on,".  In QemuOpts syntax, double comma is an escape, so you can put
comma in values.

> One effect of this change that might not be obvious is that parameter
> combinations of the form:
>
>  id=mem0,share,help
>
> no longer produce the help output. The lack of value for the 'share'
> parameter is reported with precedence. Users will need to either use a
> valid value or omit the parameter entirely:
>
>  id=mem0,share=on,help
>  id=mem0,help

That's unfortunate.

[...]



  parent reply	other threads:[~2026-10-07  9:26 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-30 22:10 [PATCH v2 00/11] qemu-options: Spring cleanup Fabiano Rosas
2026-09-30 22:10 ` [PATCH v2 01/11] qemu-option: Use g_autofree when calling get_opt_name_value() Fabiano Rosas
2026-10-01  9:42   ` marcandre.lureau
2026-09-30 22:10 ` [PATCH v2 02/11] tests/unit/test-qemu-opts: Validate help=foo options Fabiano Rosas
2026-10-01  9:42   ` marcandre.lureau
2026-09-30 22:10 ` [PATCH v2 03/11] qemu-option: Remove short form options support Fabiano Rosas
2026-10-01  9:42   ` marcandre.lureau
2026-10-07  7:08   ` Markus Armbruster [this message]
2026-10-07 12:43     ` Fabiano Rosas
2026-10-08  4:42       ` Markus Armbruster
2026-10-10  0:04         ` Fabiano Rosas
2026-10-07  8:16   ` Markus Armbruster
2026-09-30 22:10 ` [PATCH v2 04/11] qemu-option: Fix 'help' parameter parsing Fabiano Rosas
2026-10-01  9:42   ` marcandre.lureau
2026-10-01 15:43     ` Fabiano Rosas
2026-09-30 22:10 ` [PATCH v2 05/11] qemu-option: Add qemu_opts_parse_list Fabiano Rosas
2026-10-01  9:42   ` marcandre.lureau
2026-09-30 22:11 ` [PATCH v2 06/11] qemu-option: Change qemu_parse_opts() to take the group name Fabiano Rosas
2026-10-01  9:42   ` marcandre.lureau
2026-09-30 22:11 ` [PATCH v2 07/11] qemu-option: Add qemu_opts_parse_list_noisily Fabiano Rosas
2026-10-01  9:42   ` marcandre.lureau
2026-10-07 12:54   ` Eric Blake
2026-09-30 22:11 ` [PATCH v2 08/11] qemu-option: Use qemu_opts_parse_list_noisily where appropriate Fabiano Rosas
2026-10-01  9:42   ` marcandre.lureau
2026-09-30 22:11 ` [PATCH v2 09/11] qemu-option: Change qemu_opts_parse_noisily() to take the group Fabiano Rosas
2026-10-01  9:42   ` marcandre.lureau
2026-10-07 12:54   ` Eric Blake
2026-09-30 22:11 ` [PATCH v2 10/11] qemu-option: Check for NULL list at qemu_opts_parse() Fabiano Rosas
2026-10-01  9:42   ` marcandre.lureau
2026-09-30 22:11 ` [PATCH v2 11/11] qemu-option: Remove a few instances of noisily parsing Fabiano Rosas
2026-10-01  9:42   ` marcandre.lureau

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=87h5iyasxn.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=farosas@suse.de \
    --cc=hreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pierrick.bouvier@oss.qualcomm.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.