qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for-5.2 0/2] deprecate short-form boolean options
@ 2020-11-05 14:27 Paolo Bonzini
  2020-11-05 14:27 ` [PATCH 1/2] qemu-option: move help handling to get_opt_name_value Paolo Bonzini
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Paolo Bonzini @ 2020-11-05 14:27 UTC (permalink / raw)
  To: qemu-devel; +Cc: berrange, armbru

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



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-11-09  8:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-05 14:27 [PATCH for-5.2 0/2] deprecate short-form boolean options Paolo Bonzini
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

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).