lkml.org 
[lkml]   [2010]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH]kernel.h Move warning message about using kernel headers for userspace to types.h
Date
Hopefully correct, as request move the function that checks
if userspace is using kernel headers, from kernel.h to types.h.
(Please check.)

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>

---
include/linux/kernel.h | 6 ------
include/linux/types.h | 6 ++++++
2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 8317ec4..bd8501a 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -728,12 +728,6 @@ extern int do_sysinfo(struct sysinfo *info);

#endif /* __KERNEL__ */

-#ifndef __EXPORTED_HEADERS__
-#ifndef __KERNEL__
-#warning Attempt to use kernel headers from user space, see http://kernelnewbies.org/KernelHeaders
-#endif /* __KERNEL__ */
-#endif /* __EXPORTED_HEADERS__ */
-
#define SI_LOAD_SHIFT 16
struct sysinfo {
long uptime; /* Seconds since boot */
diff --git a/include/linux/types.h b/include/linux/types.h
index 23d237a..41fe43d 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -179,6 +179,12 @@ typedef __u32 __bitwise __wsum;
typedef unsigned __bitwise__ gfp_t;
typedef unsigned __bitwise__ fmode_t;

+#ifndef __EXPORTED_HEADERS__
+#ifndef __KERNEL__
+#warning "Attempt to use kernel headers from user space, see http://kernelnewbies.org/KernelHeaders"
+#endif /* __KERNEL__ */
+#endif /* __EXPORTED_HEADERS__ */
+
#ifdef CONFIG_PHYS_ADDR_T_64BIT
typedef u64 phys_addr_t;
#else
--
1.6.5.2.180.gc5b3e


\
 
 \ /
  Last update: 2010-07-01 00:11    [W:0.052 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site