diff options
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 25 |
1 files changed, 14 insertions, 11 deletions
@@ -2290,7 +2290,8 @@ int main(int argc, char **argv, char **envp) #ifdef CONFIG_VNC int show_vnc_port = 0; #endif - int defconfig = 1; + bool defconfig = true; + bool userconfig = true; const char *log_mask = NULL; const char *log_file = NULL; GMemVTable mem_trace = { @@ -2357,7 +2358,10 @@ int main(int argc, char **argv, char **envp) popt = lookup_opt(argc, argv, &optarg, &optind); switch (popt->index) { case QEMU_OPTION_nodefconfig: - defconfig=0; + defconfig = false; + break; + case QEMU_OPTION_nouserconfig: + userconfig = false; break; } } @@ -2365,14 +2369,8 @@ int main(int argc, char **argv, char **envp) if (defconfig) { int ret; - - ret = qemu_read_config_file(CONFIG_QEMU_CONFDIR "/qemu.conf"); - if (ret < 0 && ret != -ENOENT) { - exit(1); - } - - ret = qemu_read_config_file(arch_config_name); - if (ret < 0 && ret != -ENOENT) { + ret = qemu_read_default_config_files(userconfig); + if (ret < 0) { exit(1); } } @@ -3636,8 +3634,13 @@ int main(int argc, char **argv, char **envp) } if (incoming) { - int ret = qemu_start_incoming_migration(incoming); + Error *errp = NULL; + int ret = qemu_start_incoming_migration(incoming, &errp); if (ret < 0) { + if (error_is_set(&errp)) { + fprintf(stderr, "Migrate: %s\n", error_get_pretty(errp)); + error_free(errp); + } fprintf(stderr, "Migration failed. Exit code %s(%d), exiting.\n", incoming, ret); exit(ret); |