[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [COMMIT e44bd6f] Don't compile aio code if CONFIG_LINUX_A

From: Anthony Liguori
Subject: [Qemu-commits] [COMMIT e44bd6f] Don't compile aio code if CONFIG_LINUX_AIO isundefined
Date: Fri, 28 Aug 2009 15:02:12 -0000

From: Stefan Weil <address@hidden>

This patch fixes linker errors when building QEMU without Linux AIO support.

It is based on suggestions from malc and Kevin Wolf.

Signed-off-by: Stefan Weil <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>

diff --git a/block/raw-posix.c b/block/raw-posix.c
index 8a7dc15..2125d67 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -115,7 +115,9 @@ typedef struct BDRVRawState {
     int fd_got_error;
     int fd_media_changed;
     int use_aio;
     uint8_t* aligned_buf;
 } BDRVRawState;
@@ -183,7 +185,9 @@ static int raw_open_common(BlockDriverState *bs, const char 
         if (!s->aio_ctx) {
             goto out_free_buf;
         s->use_aio = 0;
     return 0;
@@ -542,9 +546,11 @@ static BlockDriverAIOCB *raw_aio_submit(BlockDriverState 
     if (s->aligned_buf) {
         if (!qiov_is_aligned(qiov)) {
             type |= QEMU_AIO_MISALIGNED;
         } else if (s->use_aio) {
             return laio_submit(bs, s->aio_ctx, s->fd, sector_num, qiov,
-                              nb_sectors, cb, opaque, type);
+                               nb_sectors, cb, opaque, type);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]