From ccd3b3b8112b670fdccf8a392b8419b173ffccb4 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 9 Nov 2020 04:13:39 -0500 Subject: qemu-option: warn for short-form boolean options Options such as "server" or "nowait", that are commonly found in -chardev, are sugar for "server=on" and "wait=off". This is quite surprising and also does not have any notion of typing attached. It is even possible to do "-device e1000,noid" and get a device with "id=off". Deprecate it and print a warning when it is encountered. In general, this short form for boolean options only seems to be in wide use for -chardev and -spice. Signed-off-by: Paolo Bonzini --- tests/test-qemu-opts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test-qemu-opts.c b/tests/test-qemu-opts.c index 2aab831d10..8bbb17b1c7 100644 --- a/tests/test-qemu-opts.c +++ b/tests/test-qemu-opts.c @@ -515,7 +515,7 @@ static void test_opts_parse(void) error_free_or_abort(&err); g_assert(!opts); - /* Implied value */ + /* Implied value (qemu_opts_parse warns but accepts it) */ opts = qemu_opts_parse(&opts_list_03, "an,noaus,noaus=", false, &error_abort); g_assert_cmpuint(opts_count(opts), ==, 3); -- cgit v1.2.3-55-g7522