aboutsummaryrefslogtreecommitdiff
path: root/qemu-nbd.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-11-03 18:06:26 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2012-11-12 11:33:29 +0100
commit7e7f4a0efc81258213dc34aeeaade36b0f59d076 (patch)
tree08153e8eb8285f3d642813efa3feee922002a502 /qemu-nbd.c
parent3c5645fab3c4b65d0cffbe1aaafc787e4be63d0f (diff)
qemu-nbd: initialize main loop before block layer
qemu-nbd was broken because they initialized the block layer while qemu_aio_context was still NULL. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'qemu-nbd.c')
-rw-r--r--qemu-nbd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/qemu-nbd.c b/qemu-nbd.c
index 15bcd08123..80f08d8464 100644
--- a/qemu-nbd.c
+++ b/qemu-nbd.c
@@ -539,6 +539,7 @@ int main(int argc, char **argv)
snprintf(sockpath, 128, SOCKET_PATH, basename(device));
}
+ qemu_init_main_loop();
bdrv_init();
atexit(bdrv_close_all);
@@ -584,7 +585,6 @@ int main(int argc, char **argv)
memset(&client_thread, 0, sizeof(client_thread));
}
- qemu_init_main_loop();
qemu_set_fd_handler2(fd, nbd_can_accept, nbd_accept, NULL,
(void *)(uintptr_t)fd);