summaryrefslogtreecommitdiff
path: root/block-raw-posix.c
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-11 18:00:19 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-11 18:00:19 +0000
commita3392f9b100e6b63616922a8b30ad9643c62785a (patch)
tree00577aa3082c3742a4a4e8917909ab354c84572e /block-raw-posix.c
parent5068cbd9e9ef1bec70b5c04650a12d8d8bb7ff3d (diff)
downloadqemu-a3392f9b100e6b63616922a8b30ad9643c62785a.tar.gz
qemu-a3392f9b100e6b63616922a8b30ad9643c62785a.tar.bz2
qemu-a3392f9b100e6b63616922a8b30ad9643c62785a.zip
Only build compatfd when using AIO and make sure to always init AIO
OpenBSD doesn't use AIO so don't try to build compatfd when not using AIO. Also make sure to call qemu_aio_init() from bdrv_init. Everything that uses bdrv calls bdrv_init so it makes sense to init aio from there instead of in every single tool. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5197 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'block-raw-posix.c')
-rw-r--r--block-raw-posix.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/block-raw-posix.c b/block-raw-posix.c
index 0587950c8f..eaf3bf2695 100644
--- a/block-raw-posix.c
+++ b/block-raw-posix.c
@@ -561,6 +561,9 @@ void qemu_aio_wait(void)
return;
#endif
+ if (!first_aio)
+ return;
+
do {
fd_set rdfds;