mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
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: malc <av1474@comtv.ru> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
This commit is contained in:
parent
c878da3b27
commit
2592c59a66
2 changed files with 2 additions and 4 deletions
|
@ -2001,14 +2001,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();
|
||||
|
|
Loading…
Reference in a new issue