qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: berrange@redhat.com, armbru@redhat.com
Subject: [PATCH for-5.2 0/2] deprecate short-form boolean options
Date: Thu,  5 Nov 2020 09:27:29 -0500	[thread overview]
Message-ID: <20201105142731.623428-1-pbonzini@redhat.com> (raw)

QemuOpts lets you write boolean options in "short form"
where "abc" means "abc=on" and "noabc" means "abc=off".
This is confusing, since it is not done for the first
key=value pair but only if there is an implied key;
it can also be grossly misused, for example "-device
e1000,noid" will create a device with id equal to "off".

Unfortunately, this idiom has found wide use with
-chardev (think "server,nowait") and to a lesser extent
-spice.

Patch 2 in this series deprecates it for all other option
groups.  The first patch avoids emitting the warning
for the "help" option.

Paolo

Paolo Bonzini (2):
  qemu-option: move help handling to get_opt_name_value
  qemu-option: warn for short-form boolean options

 chardev/char.c             |  1 +
 docs/system/deprecated.rst |  7 +++++
 include/qemu/option.h      |  1 +
 tests/test-qemu-opts.c     |  1 +
 ui/spice-core.c            |  1 +
 util/qemu-option.c         | 55 +++++++++++++++++++++-----------------
 6 files changed, 42 insertions(+), 24 deletions(-)

-- 
2.26.2



             reply	other threads:[~2020-11-05 14:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-05 14:27 Paolo Bonzini [this message]
2020-11-05 14:27 ` [PATCH 1/2] qemu-option: move help handling to get_opt_name_value Paolo Bonzini
2020-11-06 15:10   ` Markus Armbruster
2020-11-06 16:55     ` Markus Armbruster
2020-11-05 14:27 ` [PATCH 2/2] qemu-option: warn for short-form boolean options Paolo Bonzini
2020-11-06 16:49   ` Markus Armbruster
2020-11-06 18:20     ` Paolo Bonzini
2020-11-09  7:59       ` Markus Armbruster
2020-11-05 14:36 ` [PATCH for-5.2 0/2] deprecate " no-reply

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=20201105142731.623428-1-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=armbru@redhat.com \
    --cc=berrange@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).