tools: initialize main loop before block layer
PATCH 1/1 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 <[email protected]>
Signed-off-by Paolo Bonzini <[email protected]>
--- qemu-img.c | 3 +-- qemu-io.c | 3 +--
2 file modificati, 2 inserzioni(+), 4 rimozioni(-)
qemu-img.c +1 -2
@@ -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)) {
qemu-io.c +1 -2
@@ -1892,9 +1892,8 @@ int main(int argc, char **argv)exit (1 ); } -bdrv_init (); -qemu_init_main_loop (); +bdrv_init ();/* initialize commands */ quit_init ();
Signature · 1 line
1.7.12.1
malc
AppliedQuoted 5 lines · Paolo Bonzini
Tools were broken because they initialized the block layer while
qemu_aio_contextwas still NULL.Reported-by malc <[email protected]>Signed-off-by Paolo Bonzini <[email protected]>
[..snip..]
Applied, thanks.
Signature · 1 line
mailto:[email protected]