mirror of https://gitee.com/openkylin/qemu.git
vl: Eliminate defconfig variable
Both -nodefconfig and -no-user-config options do the same thing today, we only need one variable to keep track of them. Suggested-by: Markus Armbruster <armbru@redhat.com> Acked-by: Alistair Francis <alistair.francis@xilinx.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20171004030025.7866-2-ehabkost@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
c9cf636d48
commit
1ea06c398c
5
vl.c
5
vl.c
|
@ -3111,7 +3111,6 @@ int main(int argc, char **argv, char **envp)
|
||||||
const char *qtest_log = NULL;
|
const char *qtest_log = NULL;
|
||||||
const char *pid_file = NULL;
|
const char *pid_file = NULL;
|
||||||
const char *incoming = NULL;
|
const char *incoming = NULL;
|
||||||
bool defconfig = true;
|
|
||||||
bool userconfig = true;
|
bool userconfig = true;
|
||||||
bool nographic = false;
|
bool nographic = false;
|
||||||
DisplayType display_type = DT_DEFAULT;
|
DisplayType display_type = DT_DEFAULT;
|
||||||
|
@ -3213,8 +3212,6 @@ int main(int argc, char **argv, char **envp)
|
||||||
popt = lookup_opt(argc, argv, &optarg, &optind);
|
popt = lookup_opt(argc, argv, &optarg, &optind);
|
||||||
switch (popt->index) {
|
switch (popt->index) {
|
||||||
case QEMU_OPTION_nodefconfig:
|
case QEMU_OPTION_nodefconfig:
|
||||||
defconfig = false;
|
|
||||||
break;
|
|
||||||
case QEMU_OPTION_nouserconfig:
|
case QEMU_OPTION_nouserconfig:
|
||||||
userconfig = false;
|
userconfig = false;
|
||||||
break;
|
break;
|
||||||
|
@ -3222,7 +3219,7 @@ int main(int argc, char **argv, char **envp)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defconfig && userconfig) {
|
if (userconfig) {
|
||||||
if (qemu_read_default_config_file() < 0) {
|
if (qemu_read_default_config_file() < 0) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue