ia64/xen-unstable

changeset 17020:dbb60ed6bc22

ioemu: make AIO optional (already done upstream)
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Feb 11 10:03:05 2008 +0000 (2008-02-11)
parents 54bd38dab5ef
children b0119e24d900
files tools/ioemu/block-raw.c
line diff
     1.1 --- a/tools/ioemu/block-raw.c	Mon Feb 11 10:02:39 2008 +0000
     1.2 +++ b/tools/ioemu/block-raw.c	Mon Feb 11 10:03:05 2008 +0000
     1.3 @@ -25,7 +25,9 @@
     1.4  #include "block_int.h"
     1.5  #include <assert.h>
     1.6  #ifndef _WIN32
     1.7 +#ifndef NO_AIO
     1.8  #include <aio.h>
     1.9 +#endif
    1.10  
    1.11  #ifndef QEMU_TOOL
    1.12  #include "exec-all.h"
    1.13 @@ -255,6 +257,7 @@ label__raw_write__success:
    1.14  /***********************************************************/
    1.15  /* Unix AIO using POSIX AIO */
    1.16  
    1.17 +#ifndef NO_AIO
    1.18  typedef struct RawAIOCB {
    1.19      BlockDriverAIOCB common;
    1.20      struct aiocb aiocb;
    1.21 @@ -480,6 +483,7 @@ static void raw_aio_cancel(BlockDriverAI
    1.22          pacb = &acb->next;
    1.23      }
    1.24  }
    1.25 +#endif
    1.26  
    1.27  static void raw_close(BlockDriverState *bs)
    1.28  {
    1.29 @@ -600,10 +604,12 @@ BlockDriver bdrv_raw = {
    1.30      raw_create,
    1.31      raw_flush,
    1.32      
    1.33 +#ifndef NO_AIO
    1.34      .bdrv_aio_read = raw_aio_read,
    1.35      .bdrv_aio_write = raw_aio_write,
    1.36      .bdrv_aio_cancel = raw_aio_cancel,
    1.37      .aiocb_size = sizeof(RawAIOCB),
    1.38 +#endif
    1.39      .protocol_name = "file",
    1.40      .bdrv_pread = raw_pread,
    1.41      .bdrv_pwrite = raw_pwrite,
    1.42 @@ -936,10 +942,12 @@ BlockDriver bdrv_host_device = {
    1.43      NULL,
    1.44      raw_flush,
    1.45      
    1.46 +#ifndef NO_AIO
    1.47      .bdrv_aio_read = raw_aio_read,
    1.48      .bdrv_aio_write = raw_aio_write,
    1.49      .bdrv_aio_cancel = raw_aio_cancel,
    1.50      .aiocb_size = sizeof(RawAIOCB),
    1.51 +#endif
    1.52      .bdrv_pread = raw_pread,
    1.53      .bdrv_pwrite = raw_pwrite,
    1.54      .bdrv_getlength = raw_getlength,