diff options
author | Michal Privoznik <mprivozn@redhat.com> | 2018-05-14 15:45:45 +0200 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2018-05-20 08:51:58 +0300 |
commit | aec0d0e11812c602866c9fa044847f1e7b1e7dff (patch) | |
tree | a8b862cc1f45fe98f6002a2907ee38bd9255ab69 /vl.c | |
parent | 54be4c42b2796ca6054cd1539d3ad4486447c789 (diff) | |
download | qemu-aec0d0e11812c602866c9fa044847f1e7b1e7dff.zip qemu-aec0d0e11812c602866c9fa044847f1e7b1e7dff.tar.gz qemu-aec0d0e11812c602866c9fa044847f1e7b1e7dff.tar.bz2 |
qemu-options: Allow -no-user-config again
After 1217d6ca2bf28c0febe1bd7d5b3fa912bbf6af2a we error out
explicitly if an unknown -option was passed on the command line.
However, we are doing two pass command line option parsing. In
the first pass we just look for -no-user-config or -nodefconfig
being present which determines whether we load user config or
not. Then in the second pass we finally parse everything else
throwing an error if an unsupported -option was found. Problem is
that in the second pass -no-user-config and -nodefconfig are not
handled explicitly which makes us throw the unsupported option
error.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -4011,6 +4011,10 @@ int main(int argc, char **argv, char **envp) exit(1); } break; + case QEMU_OPTION_nodefconfig: + case QEMU_OPTION_nouserconfig: + /* Nothing to be parsed here. Especially, do not error out below. */ + break; default: if (os_parse_cmd_args(popt->index, optarg)) { error_report("Option not supported in this build"); |