diff options
author | 2012-11-03 18:10:17 +0100 | |
---|---|---|
committer | 2012-12-13 15:31:59 -0600 | |
commit | b27cb4a09e8515ec199bce8902e018f8ca569911 (patch) | |
tree | 85bd964165b1c16a84d8d9f2db4f2d5892b6ddbd | |
parent | xhci: fix usb name in caps (diff) | |
download | qemu-kvm-b27cb4a09e8515ec199bce8902e018f8ca569911.tar.gz qemu-kvm-b27cb4a09e8515ec199bce8902e018f8ca569911.tar.bz2 qemu-kvm-b27cb4a09e8515ec199bce8902e018f8ca569911.zip |
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>
(cherry picked from commit 2592c59a66d456fe98fe96cb5787b356c40ee66f)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
(cherry picked from commit 5c0d5aebd5c9cf445fb71e01ee56efad094248f5)
-rw-r--r-- | qemu-img.c | 3 | ||||
-rw-r--r-- | qemu-io.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/qemu-img.c b/qemu-img.c index 7615e9191..c90ae4abb 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -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(); |