Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo commit in src/patchsets/gentoo-headers/2.6.28: 0004-linux-uio.h-cleanup-for-userspace.patch
Date: Mon, 29 Dec 2008 20:33:11
Message-Id: E1LHOnV-0000gj-2T@stork.gentoo.org
1 vapier 08/12/29 20:33:09
2
3 Modified: 0004-linux-uio.h-cleanup-for-userspace.patch
4 Log:
5 refine uio.h patch based on lkml feedback
6
7 Revision Changes Path
8 1.2 src/patchsets/gentoo-headers/2.6.28/0004-linux-uio.h-cleanup-for-userspace.patch
9
10 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gentoo-headers/2.6.28/0004-linux-uio.h-cleanup-for-userspace.patch?rev=1.2&view=markup
11 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gentoo-headers/2.6.28/0004-linux-uio.h-cleanup-for-userspace.patch?rev=1.2&content-type=text/plain
12 diff : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gentoo-headers/2.6.28/0004-linux-uio.h-cleanup-for-userspace.patch?r1=1.1&r2=1.2
13
14 Index: 0004-linux-uio.h-cleanup-for-userspace.patch
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo/src/patchsets/gentoo-headers/2.6.28/0004-linux-uio.h-cleanup-for-userspace.patch,v
17 retrieving revision 1.1
18 retrieving revision 1.2
19 diff -u -r1.1 -r1.2
20 --- 0004-linux-uio.h-cleanup-for-userspace.patch 29 Dec 2008 13:00:17 -0000 1.1
21 +++ 0004-linux-uio.h-cleanup-for-userspace.patch 29 Dec 2008 20:33:08 -0000 1.2
22 @@ -1,41 +1,56 @@
23 -From dda9c6313a67d097283afde7b6b608b3c0920302 Mon Sep 17 00:00:00 2001
24 +From 9efc6c29b9bed6c054978068c078dc142b90609a Mon Sep 17 00:00:00 2001
25 From: Mike Frysinger <vapier@g.o>
26 Date: Sat, 27 Dec 2008 01:11:46 -0500
27 -Subject: [PATCH v3] linux/uio.h: cleanup for userspace
28 +Subject: [PATCH] linux/uio.h: cleanup for userspace
29
30 Hide iov_shorten() behind __KERNEL__ since it's a prototype only. Use the
31 __inline__ form for iov_length() since it's usable by userspace.
32
33 Signed-off-by: Mike Frysinger <vapier@g.o>
34 ---
35 -v3
36 - - keep all __KERNEL__ stuff in one place
37 -v2
38 - - drop inline conversion stuff
39 -
40 - include/linux/uio.h | 4 ++--
41 - 1 files changed, 2 insertions(+), 2 deletions(-)
42 + include/linux/uio.h | 18 +++++++++---------
43 + 1 files changed, 9 insertions(+), 9 deletions(-)
44
45 diff --git a/include/linux/uio.h b/include/linux/uio.h
46 -index b7fe138..3debd89 100644
47 +index b7fe138..31d75cd 100644
48 --- a/include/linux/uio.h
49 +++ b/include/linux/uio.h
50 -@@ -26,6 +26,8 @@ struct kvec {
51 - size_t iov_len;
52 +@@ -19,6 +19,13 @@ struct iovec
53 + __kernel_size_t iov_len; /* Must be size_t (1003.1g) */
54 };
55
56 -+unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to);
57 ++/*
58 ++ * UIO_MAXIOV shall be at least 16 1003.1g (5.4.1.1)
59 ++ */
60 +
61 - #endif
62 ++#define UIO_FASTIOV 8
63 ++#define UIO_MAXIOV 1024
64 ++
65 + #ifdef __KERNEL__
66
67 - /*
68 -@@ -52,6 +54,4 @@ static inline size_t iov_length(const struct iovec *iov, unsigned long nr_segs)
69 - return ret;
70 - }
71 + struct kvec {
72 +@@ -26,15 +33,6 @@ struct kvec {
73 + size_t iov_len;
74 + };
75
76 --unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to);
77 +-#endif
78 +-
79 +-/*
80 +- * UIO_MAXIOV shall be at least 16 1003.1g (5.4.1.1)
81 +- */
82 +-
83 +-#define UIO_FASTIOV 8
84 +-#define UIO_MAXIOV 1024
85 -
86 + /*
87 + * Total number of bytes covered by an iovec.
88 + *
89 +@@ -55,3 +53,5 @@ static inline size_t iov_length(const struct iovec *iov, unsigned long nr_segs)
90 + unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to);
91 +
92 #endif
93 ++
94 ++#endif
95 --
96 1.6.0.6