qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for-5.2 0/4] deprecate short-form boolean options
@ 2020-11-03 15:14 Paolo Bonzini
  2020-11-03 15:14 ` [PATCH for-5.2 1/4] ivshmem-test: do not use short-form boolean option Paolo Bonzini
                   ` (4 more replies)
  0 siblings, 5 replies; 21+ messages in thread
From: Paolo Bonzini @ 2020-11-03 15:14 UTC (permalink / raw)
  To: qemu-devel; +Cc: 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 4 in this series deprecates it for all other option
groups.  The first three patches avoid emitting the warning
in tests (which in one case were buggy, see patch 3) or
for the "help" option.

Paolo Bonzini (4):
  ivshmem-test: do not use short-form boolean option
  qemu-option: move help handling to get_opt_name_value
  qtest: escape device name in device-introspect-test
  qemu-option: warn for short-form boolean options

 chardev/char.c                       |  1 +
 docs/system/deprecated.rst           |  7 ++++
 include/qemu/option.h                |  1 +
 tests/qtest/device-introspect-test.c |  9 +++--
 tests/qtest/ivshmem-test.c           |  2 +-
 tests/test-qemu-opts.c               |  1 +
 ui/spice-core.c                      |  1 +
 util/qemu-option.c                   | 51 ++++++++++++++++------------
 8 files changed, 48 insertions(+), 25 deletions(-)

-- 
2.26.2



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

end of thread, other threads:[~2020-11-06 15:35 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-03 15:14 [PATCH for-5.2 0/4] deprecate short-form boolean options Paolo Bonzini
2020-11-03 15:14 ` [PATCH for-5.2 1/4] ivshmem-test: do not use short-form boolean option Paolo Bonzini
2020-11-04  7:40   ` Thomas Huth
2020-11-04  9:12   ` Markus Armbruster
2020-11-03 15:14 ` [PATCH for-5.2 2/4] qemu-option: move help handling to get_opt_name_value Paolo Bonzini
2020-11-04 12:21   ` Markus Armbruster
2020-11-04 12:49     ` Paolo Bonzini
2020-11-03 15:14 ` [PATCH for-5.2 3/4] qtest: escape device name in device-introspect-test Paolo Bonzini
2020-11-04  7:44   ` Thomas Huth
2020-11-04  8:10     ` Paolo Bonzini
2020-11-06 13:15   ` Markus Armbruster
2020-11-06 13:23     ` Paolo Bonzini
2020-11-06 15:34       ` Markus Armbruster
2020-11-03 15:14 ` [PATCH for-5.2 4/4] qemu-option: warn for short-form boolean options Paolo Bonzini
2020-11-03 16:08   ` Daniel P. Berrangé
2020-11-03 16:18     ` Paolo Bonzini
2020-11-04 13:43       ` Markus Armbruster
2020-11-03 21:22     ` Igor Mammedov
2020-11-03 21:41       ` Paolo Bonzini
2020-11-04 11:04         ` Igor Mammedov
2020-11-03 15:33 ` [PATCH for-5.2 0/4] 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).