From 1217d6ca2bf28c0febe1bd7d5b3fa912bbf6af2a Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Fri, 4 May 2018 19:01:07 +0200 Subject: qemu-options: Bail out on unsupported options instead of silently ignoring them The dangling remainder of the -tdf option revealed a deficiency in our option parsing: Options that have been declared, but are not supported in the switch-case statement in vl.c and not handled in the OS-specifc os_parse_cmd_args() functions are currently silently ignored. We should rather tell the users that they specified something that we can not handle, so let's print an error message and exit instead. Reported-by: Markus Armbruster Signed-off-by: Thomas Huth Message-Id: <1525453270-23074-3-git-send-email-thuth@redhat.com> Signed-off-by: Paolo Bonzini --- include/qemu-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/qemu-common.h') diff --git a/include/qemu-common.h b/include/qemu-common.h index 8a4f63c9de..85f4749aef 100644 --- a/include/qemu-common.h +++ b/include/qemu-common.h @@ -137,7 +137,7 @@ char *qemu_find_file(int type, const char *name); /* OS specific functions */ void os_setup_early_signal_handling(void); char *os_find_datadir(void); -void os_parse_cmd_args(int index, const char *optarg); +int os_parse_cmd_args(int index, const char *optarg); #include "qemu/module.h" -- cgit v1.2.3