aboutsummaryrefslogtreecommitdiff
path: root/console-tools/setlogcons.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2017-08-22 14:56:12 +0100
committerRon Yorston <rmy@pobox.com>2017-08-22 14:56:12 +0100
commitce9af1cc5ea23f754587448cf35b5120c77bfeef (patch)
tree69e5eaba5e75ab909ed92d5045393471b8ff3c13 /console-tools/setlogcons.c
parentc170026700eabb10147dd848c45c06995b43a32e (diff)
parente837a0dbbebf4229306df98fe9ee3b9bb30630c4 (diff)
downloadbusybox-w32-ce9af1cc5ea23f754587448cf35b5120c77bfeef.tar.gz
busybox-w32-ce9af1cc5ea23f754587448cf35b5120c77bfeef.tar.bz2
busybox-w32-ce9af1cc5ea23f754587448cf35b5120c77bfeef.zip
Merge branch 'busybox' into merge
Diffstat (limited to 'console-tools/setlogcons.c')
-rw-r--r--console-tools/setlogcons.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/console-tools/setlogcons.c b/console-tools/setlogcons.c
index 1b5814eee..6778a4d2b 100644
--- a/console-tools/setlogcons.c
+++ b/console-tools/setlogcons.c
@@ -15,14 +15,26 @@
15//config: help 15//config: help
16//config: This program redirects the output console of kernel messages. 16//config: This program redirects the output console of kernel messages.
17 17
18//applet:IF_SETLOGCONS(APPLET(setlogcons, BB_DIR_USR_SBIN, BB_SUID_DROP)) 18//applet:IF_SETLOGCONS(APPLET_NOEXEC(setlogcons, setlogcons, BB_DIR_USR_SBIN, BB_SUID_DROP, setlogcons))
19 19
20//kbuild:lib-$(CONFIG_SETLOGCONS) += setlogcons.o 20//kbuild:lib-$(CONFIG_SETLOGCONS) += setlogcons.o
21 21
22//usage:#define setlogcons_trivial_usage 22//usage:#define setlogcons_trivial_usage
23//usage: "[N]" 23//usage: "[N]"
24//usage:#define setlogcons_full_usage "\n\n" 24//usage:#define setlogcons_full_usage "\n\n"
25//usage: "Redirect the kernel output to console N. Default:0 (current console)" 25//usage: "Pin kernel output to VT console N. Default:0 (do not pin)"
26
27// Comment from kernel source:
28/* ...
29 * By default, the kernel messages are always printed on the current virtual
30 * console. However, the user may modify that default with the
31 * TIOCL_SETKMSGREDIRECT ioctl call.
32 *
33 * This function sets the kernel message console to be @new. It returns the old
34 * virtual console number. The virtual terminal number 0 (both as parameter and
35 * return value) means no redirection (i.e. always printed on the currently
36 * active console).
37 */
26 38
27#include "libbb.h" 39#include "libbb.h"
28 40
@@ -33,8 +45,8 @@ int setlogcons_main(int argc UNUSED_PARAM, char **argv)
33 char fn; 45 char fn;
34 char subarg; 46 char subarg;
35 } arg = { 47 } arg = {
36 11, /* redirect kernel messages */ 48 11, /* redirect kernel messages (TIOCL_SETKMSGREDIRECT) */
37 0 /* to specified console (current as default) */ 49 0
38 }; 50 };
39 51
40 if (argv[1]) 52 if (argv[1])