提交 214910a7 编写于 作者: M Marcelo Tosatti 提交者: Aurelien Jarno

fix -daemonize with kvm

Otherwise fork might not inherit state initialized by kvm_init().
Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
上级 b4ed5d18
......@@ -5424,16 +5424,6 @@ int main(int argc, char **argv, char **envp)
}
}
if (kvm_enabled()) {
int ret;
ret = kvm_init(smp_cpus);
if (ret < 0) {
fprintf(stderr, "failed to initialize KVM\n");
exit(1);
}
}
/* If no data_dir is specified then try to find it relative to the
executable path. */
if (!data_dir) {
......@@ -5523,6 +5513,16 @@ int main(int argc, char **argv, char **envp)
}
#endif
if (kvm_enabled()) {
int ret;
ret = kvm_init(smp_cpus);
if (ret < 0) {
fprintf(stderr, "failed to initialize KVM\n");
exit(1);
}
}
if (qemu_init_main_loop()) {
fprintf(stderr, "qemu_init_main_loop failed\n");
exit(1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册