mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
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@gmail.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: Christoph Hellwig <hch@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
8da14b5fc3
commit
812ed032cd
1 changed files with 8 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue