summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--qemu-img.c3
-rw-r--r--qemu-io.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/qemu-img.c b/qemu-img.c
index b17bddd25c..e29e01b729 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -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)) {
diff --git a/qemu-io.c b/qemu-io.c
index d0f4fb70c7..1ad7d3adb9 100644
--- a/qemu-io.c
+++ b/qemu-io.c
@@ -1892,9 +1892,8 @@ int main(int argc, char **argv)
exit(1);
}
- bdrv_init();
-
qemu_init_main_loop();
+ bdrv_init();
/* initialize commands */
quit_init();