mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-09 23:39:18 +00:00
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>
This commit is contained in:
parent
0f05058531
commit
5d0bb2c423
@ -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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user