mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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>
This commit is contained in:
parent
281b95231d
commit
1217d6ca2b
4 changed files with 12 additions and 5 deletions
5
vl.c
5
vl.c
|
@ -4033,7 +4033,10 @@ int main(int argc, char **argv, char **envp)
|
|||
}
|
||||
break;
|
||||
default:
|
||||
os_parse_cmd_args(popt->index, optarg);
|
||||
if (os_parse_cmd_args(popt->index, optarg)) {
|
||||
error_report("Option not supported in this build");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue