implement -no-user-config command-line option (v3)

Changes v2 -> v3:
 - Rebase against latest qemu.git

Changes v1 -> v2:
 - Change 'userconfig' field/variables to bool instead of int
 - Coding style change

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Eduardo Habkost 2012-05-02 13:07:29 -03:00 committed by Anthony Liguori
parent 3ed2d9ee1f
commit f29a56147b
4 changed files with 27 additions and 8 deletions

6
vl.c
View file

@ -2284,6 +2284,7 @@ int main(int argc, char **argv, char **envp)
int show_vnc_port = 0;
#endif
bool defconfig = true;
bool userconfig = true;
const char *log_mask = NULL;
const char *log_file = NULL;
GMemVTable mem_trace = {
@ -2352,13 +2353,16 @@ int main(int argc, char **argv, char **envp)
case QEMU_OPTION_nodefconfig:
defconfig = false;
break;
case QEMU_OPTION_nouserconfig:
userconfig = false;
break;
}
}
}
if (defconfig) {
int ret;
ret = qemu_read_default_config_files();
ret = qemu_read_default_config_files(userconfig);
if (ret < 0) {
exit(1);
}