qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] tools: initialize main loop before block layer
@ 2012-11-03 17:10 Paolo Bonzini
  2012-11-06  0:39 ` malc
  0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2012-11-03 17:10 UTC (permalink / raw)
  To: qemu-devel

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>
---
 qemu-img.c | 3 +--
 qemu-io.c  | 3 +--
 2 file modificati, 2 inserzioni(+), 4 rimozioni(-)

diff --git a/qemu-img.c b/qemu-img.c
index b17bddd..e29e01b 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 d0f4fb7..1ad7d3a 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();
-- 
1.7.12.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] tools: initialize main loop before block layer
  2012-11-03 17:10 [Qemu-devel] [PATCH] tools: initialize main loop before block layer Paolo Bonzini
@ 2012-11-06  0:39 ` malc
  0 siblings, 0 replies; 2+ messages in thread
From: malc @ 2012-11-06  0:39 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel

On Sat, 3 Nov 2012, Paolo Bonzini wrote:

> 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>

[..snip..]

Applied, thanks.

-- 
mailto:av1474@comtv.ru

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-11-06  0:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-03 17:10 [Qemu-devel] [PATCH] tools: initialize main loop before block layer Paolo Bonzini
2012-11-06  0:39 ` malc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).