Patchwork [11/12] raw-posix: rename raw-posix-aio.h, hide unavailable prototypes

login
register
mail settings
Submitter Paolo Bonzini
Date July 16, 2012, 10:42 a.m.
Message ID <1342435377-25897-12-git-send-email-pbonzini@redhat.com>
Download mbox | patch
Permalink /patch/171161/
State New
Headers show

Comments

Paolo Bonzini - July 16, 2012, 10:42 a.m.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 block/{raw-posix-aio.h => raw-aio.h} |   10 ++++++----
 block/raw-posix.c                    |    2 +-
 linux-aio.c                          |    2 +-
 3 files changed, 8 insertions(+), 6 deletions(-)
 rename block/{raw-posix-aio.h => raw-aio.h} (86%)

Patch

diff --git a/block/raw-posix-aio.h b/block/raw-aio.h
similarity index 86%
rename from block/raw-posix-aio.h
rename to block/raw-aio.h
index c714367..b3bb073 100644
--- a/block/raw-posix-aio.h
+++ b/block/raw-aio.h
@@ -1,5 +1,5 @@ 
 /*
- * QEMU Posix block I/O backend AIO support
+ * Declarations for AIO in the raw protocol
  *
  * Copyright IBM, Corp. 2008
  *
@@ -12,8 +12,8 @@ 
  * Contributions after 2012-01-13 are licensed under the terms of the
  * GNU GPL, version 2 or (at your option) any later version.
  */
-#ifndef QEMU_RAW_POSIX_AIO_H
-#define QEMU_RAW_POSIX_AIO_H
+#ifndef QEMU_RAW_AIO_H
+#define QEMU_RAW_AIO_H
 
 /* AIO request types */
 #define QEMU_AIO_READ         0x0001
@@ -28,9 +28,11 @@ 
 
 
 /* linux-aio.c - Linux native implementation */
+#ifdef CONFIG_LINUX_AIO
 void *laio_init(void);
 BlockDriverAIOCB *laio_submit(BlockDriverState *bs, void *aio_ctx, int fd,
         int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
         BlockDriverCompletionFunc *cb, void *opaque, int type);
+#endif
 
-#endif /* QEMU_RAW_POSIX_AIO_H */
+#endif /* QEMU_RAW_AIO_H */
diff --git a/block/raw-posix.c b/block/raw-posix.c
index 3e2e822..64296a6 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -29,7 +29,7 @@ 
 #include "module.h"
 #include "trace.h"
 #include "thread-pool.h"
-#include "block/raw-posix-aio.h"
+#include "block/raw-aio.h"
 
 #if defined(__APPLE__) && (__MACH__)
 #include <paths.h>
diff --git a/linux-aio.c b/linux-aio.c
index 779f793..67c49af 100644
--- a/linux-aio.c
+++ b/linux-aio.c
@@ -9,7 +9,7 @@ 
  */
 #include "qemu-common.h"
 #include "qemu-aio.h"
-#include "block/raw-posix-aio.h"
+#include "block/raw-aio.h"
 #include "event_notifier.h"
 
 #include <libaio.h>