From: Ian Jackson Date: Tue, 15 Jul 2008 17:36:40 +0000 (+0100) Subject: Honour -DNO_AIO. X-Git-Tag: xen-3.3.0-rc1~29^2 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=e0df07c4dc397affcf88fa7453d8541b80120d07;p=qemu-xen-4.0-testing.git Honour -DNO_AIO. Based on a patch by Samuel Thibault. Signed-off-by: Ian Jackson --- diff --git a/block-raw-posix.c b/block-raw-posix.c index 23311e87..ec817e98 100644 --- a/block-raw-posix.c +++ b/block-raw-posix.c @@ -28,7 +28,9 @@ #endif #include "block_int.h" #include +#ifndef NO_AIO #include +#endif #ifdef CONFIG_COCOA #include @@ -233,6 +235,7 @@ label__raw_write__success: /***********************************************************/ /* Unix AIO using POSIX AIO */ +#ifndef NO_AIO typedef struct RawAIOCB { BlockDriverAIOCB common; struct aiocb aiocb; @@ -469,6 +472,7 @@ static void raw_aio_cancel(BlockDriverAIOCB *blockacb) pacb = &acb->next; } } +#endif static void raw_close(BlockDriverState *bs) { @@ -572,10 +576,12 @@ BlockDriver bdrv_raw = { raw_create, raw_flush, +#ifndef NO_AIO .bdrv_aio_read = raw_aio_read, .bdrv_aio_write = raw_aio_write, .bdrv_aio_cancel = raw_aio_cancel, .aiocb_size = sizeof(RawAIOCB), +#endif .protocol_name = "file", .bdrv_pread = raw_pread, .bdrv_pwrite = raw_pwrite, @@ -927,11 +933,13 @@ BlockDriver bdrv_host_device = { NULL, raw_flush, +#ifndef NO_AIO .bdrv_aio_read = raw_aio_read, .bdrv_aio_write = raw_aio_write, .bdrv_aio_cancel = raw_aio_cancel, .bdrv_aio_flush = raw_aio_flush, .aiocb_size = sizeof(RawAIOCB), +#endif .bdrv_pread = raw_pread, .bdrv_pwrite = raw_pwrite, .bdrv_getlength = raw_getlength,