blob: 46994582670ee593d7dc0fa6fb1a9f2f542ab515 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
From dda9c6313a67d097283afde7b6b608b3c0920302 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Sat, 27 Dec 2008 01:11:46 -0500
Subject: [PATCH v3] linux/uio.h: cleanup for userspace
Hide iov_shorten() behind __KERNEL__ since it's a prototype only. Use the
__inline__ form for iov_length() since it's usable by userspace.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
v3
- keep all __KERNEL__ stuff in one place
v2
- drop inline conversion stuff
include/linux/uio.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/uio.h b/include/linux/uio.h
index b7fe138..3debd89 100644
--- a/include/linux/uio.h
+++ b/include/linux/uio.h
@@ -26,6 +26,8 @@ struct kvec {
size_t iov_len;
};
+unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to);
+
#endif
/*
@@ -52,6 +54,4 @@ static inline size_t iov_length(const struct iovec *iov, unsigned long nr_segs)
return ret;
}
-unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to);
-
#endif
--
1.6.0.6
|