[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH for-5.2 0/2] deprecate short-form boolean options
From: |
Paolo Bonzini |
Subject: |
[PATCH for-5.2 0/2] deprecate short-form boolean options |
Date: |
Thu, 5 Nov 2020 09:27:29 -0500 |
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