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 5ada918b82 ("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>
This commit is contained in:
Bernhard Walle 2009-12-17 15:27:11 -08:00 коммит произвёл Linus Torvalds
Родитель 0f05058531
Коммит 5d0bb2c423
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -84,6 +84,8 @@ struct vt_setactivate {
#define VT_SETACTIVATE 0x560F /* Activate and set the mode of a console */
#ifdef __KERNEL__
#ifdef CONFIG_VT_CONSOLE
extern int vt_kmsg_redirect(int new);
@ -97,6 +99,8 @@ static inline int vt_kmsg_redirect(int new)
#endif
#endif /* __KERNEL__ */
#define vt_get_kmsg_redirect() vt_kmsg_redirect(-1)
#endif /* _LINUX_VT_H */