diff options
author | Bernhard Walle <bernhard@bwalle.de> | 2009-12-17 18:27:11 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-17 18:45:30 -0500 |
commit | 5d0bb2c4238e333ae18c5cd23f75e02a3dac3519 (patch) | |
tree | 17c755c117384b3ed568c5f04ec603be9b206198 | |
parent | 0f05058531330854ff383237e1547044c67e5740 (diff) |
vt: don't export vt_kmsg_redirect() to userspace
Fix following warning in linux-next by guarding the function definition
(both the "extern" and the inline) with #ifdef __KERNEL__.
usr/include/linux/vt.h:89: userspace cannot call function or variable defined in
the kernel
Introduced by commit 5ada918b82399eef3afd6a71e3637697d6bd719f ("vt:
introduce and use vt_kmsg_redirect() function").
Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | include/linux/vt.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/vt.h b/include/linux/vt.h index 3fb9944e50a6..d5dd0bc408fd 100644 --- a/include/linux/vt.h +++ b/include/linux/vt.h | |||
@@ -84,6 +84,8 @@ struct vt_setactivate { | |||
84 | 84 | ||
85 | #define VT_SETACTIVATE 0x560F /* Activate and set the mode of a console */ | 85 | #define VT_SETACTIVATE 0x560F /* Activate and set the mode of a console */ |
86 | 86 | ||
87 | #ifdef __KERNEL__ | ||
88 | |||
87 | #ifdef CONFIG_VT_CONSOLE | 89 | #ifdef CONFIG_VT_CONSOLE |
88 | 90 | ||
89 | extern int vt_kmsg_redirect(int new); | 91 | extern int vt_kmsg_redirect(int new); |
@@ -97,6 +99,8 @@ static inline int vt_kmsg_redirect(int new) | |||
97 | 99 | ||
98 | #endif | 100 | #endif |
99 | 101 | ||
102 | #endif /* __KERNEL__ */ | ||
103 | |||
100 | #define vt_get_kmsg_redirect() vt_kmsg_redirect(-1) | 104 | #define vt_get_kmsg_redirect() vt_kmsg_redirect(-1) |
101 | 105 | ||
102 | #endif /* _LINUX_VT_H */ | 106 | #endif /* _LINUX_VT_H */ |