[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1248811555-6648-1-git-send-email-jirislaby@gmail.com>
Date: Tue, 28 Jul 2009 22:05:55 +0200
From: Jiri Slaby <jirislaby@...il.com>
To: Alexander Viro <viro@...iv.linux.org.uk>
Cc: linux-fsdevel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Christoph Hellwig <hch@...radead.org>,
linux-kernel@...r.kernel.org, Sam Ravnborg <sam@...nborg.org>,
Jiri Slaby <jirislaby@...il.com>
Subject: [PATCH v3 1/1] UIO: mark uio.h functions __KERNEL__ only
To avoid userspace build failures such as:
.../linux/uio.h:37: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘iov_length’
.../linux/uio.h:47: error: expected declaration specifiers or ‘...’ before ‘size_t’
move uio functions inside a __KERNEL__ block.
Signed-off-by: Jiri Slaby <jirislaby@...il.com>
---
include/linux/uio.h | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/include/linux/uio.h b/include/linux/uio.h
index b7fe138..98c1143 100644
--- a/include/linux/uio.h
+++ b/include/linux/uio.h
@@ -19,15 +19,6 @@ struct iovec
__kernel_size_t iov_len; /* Must be size_t (1003.1g) */
};
-#ifdef __KERNEL__
-
-struct kvec {
- void *iov_base; /* and that should *never* hold a userland pointer */
- size_t iov_len;
-};
-
-#endif
-
/*
* UIO_MAXIOV shall be at least 16 1003.1g (5.4.1.1)
*/
@@ -35,6 +26,13 @@ struct kvec {
#define UIO_FASTIOV 8
#define UIO_MAXIOV 1024
+#ifdef __KERNEL__
+
+struct kvec {
+ void *iov_base; /* and that should *never* hold a userland pointer */
+ size_t iov_len;
+};
+
/*
* Total number of bytes covered by an iovec.
*
@@ -53,5 +51,6 @@ static inline size_t iov_length(const struct iovec *iov, unsigned long nr_segs)
}
unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to);
+#endif
#endif
--
1.6.3.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists