提交 5c0d5aeb 编写于 作者: P Paolo Bonzini 提交者: Michael Roth

tools: initialize main loop before block layer

Tools were broken because they initialized the block layer while
qemu_aio_context was still NULL.
Reported-by: Nmalc <av1474@comtv.ru>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Nmalc <av1474@comtv.ru>
(cherry picked from commit 2592c59a)
Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
上级 3dd59b4d
......@@ -1698,14 +1698,13 @@ int main(int argc, char **argv)
error_set_progname(argv[0]);
qemu_init_main_loop();
bdrv_init();
if (argc < 2)
help();
cmdname = argv[1];
argc--; argv++;
qemu_init_main_loop();
/* find the command */
for(cmd = img_cmds; cmd->name != NULL; cmd++) {
if (!strcmp(cmdname, cmd->name)) {
......
......@@ -1892,9 +1892,8 @@ int main(int argc, char **argv)
exit(1);
}
bdrv_init();
qemu_init_main_loop();
bdrv_init();
/* initialize commands */
quit_init();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册