aboutsummaryrefslogtreecommitdiff
path: root/os-win32.c
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2018-05-04 19:01:07 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2018-05-09 00:13:39 +0200
commit1217d6ca2bf28c0febe1bd7d5b3fa912bbf6af2a (patch)
tree4f854522c6ac02bb10ebdb9ebb13c396a8b857ac /os-win32.c
parent281b95231d79a7a7ecc93a51ebb8e68b1ce7f1e5 (diff)
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 <armbru@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1525453270-23074-3-git-send-email-thuth@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'os-win32.c')
-rw-r--r--os-win32.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/os-win32.c b/os-win32.c
index 586a7c7d49..0674f94b57 100644
--- a/os-win32.c
+++ b/os-win32.c
@@ -93,9 +93,9 @@ void os_set_line_buffering(void)
* Parse OS specific command line options.
* return 0 if option handled, -1 otherwise
*/
-void os_parse_cmd_args(int index, const char *optarg)
+int os_parse_cmd_args(int index, const char *optarg)
{
- return;
+ return -1;
}
int qemu_create_pidfile(const char *filename)