Skip to content

Commit

Permalink
vt: don't export vt_kmsg_redirect() to userspace
Browse files Browse the repository at this point in the history
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 5ada918 ("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>
  • Loading branch information
Bernhard Walle authored and Linus Torvalds committed Dec 17, 2009
1 parent 0f05058 commit 5d0bb2c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/linux/vt.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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 */

0 comments on commit 5d0bb2c

Please sign in to comment.