aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--console-tools/setconsole.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/console-tools/setconsole.c b/console-tools/setconsole.c
index ad0f756ca..fa5269ebb 100644
--- a/console-tools/setconsole.c
+++ b/console-tools/setconsole.c
@@ -25,11 +25,15 @@
25//kbuild:lib-$(CONFIG_SETCONSOLE) += setconsole.o 25//kbuild:lib-$(CONFIG_SETCONSOLE) += setconsole.o
26 26
27//usage:#define setconsole_trivial_usage 27//usage:#define setconsole_trivial_usage
28//usage: "[-r" IF_FEATURE_SETCONSOLE_LONG_OPTIONS("|--reset") "] [DEVICE]" 28//usage: "[-r] [DEVICE]"
29//usage:#define setconsole_full_usage "\n\n" 29//usage:#define setconsole_full_usage "\n\n"
30//usage: "Redirect system console output to DEVICE (default: /dev/tty)\n" 30//usage: "Redirect system console output to DEVICE (default: /dev/tty)\n"
31//usage: "\n -r Reset output to /dev/console" 31//usage: "\n -r Reset output to /dev/console"
32 32
33/* It was a bbox-specific invention, but SUSE does have a similar utility.
34 * SUSE has no -r option, though.
35 */
36
33#include "libbb.h" 37#include "libbb.h"
34 38
35int setconsole_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 39int setconsole_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
@@ -38,12 +42,6 @@ int setconsole_main(int argc UNUSED_PARAM, char **argv)
38 const char *device = CURRENT_TTY; 42 const char *device = CURRENT_TTY;
39 bool reset; 43 bool reset;
40 44
41#if ENABLE_FEATURE_SETCONSOLE_LONG_OPTIONS
42 static const char setconsole_longopts[] ALIGN1 =
43 "reset\0" No_argument "r"
44 ;
45 applet_long_options = setconsole_longopts;
46#endif
47 /* at most one non-option argument */ 45 /* at most one non-option argument */
48 opt_complementary = "?1"; 46 opt_complementary = "?1";
49 reset = getopt32(argv, "r"); 47 reset = getopt32(argv, "r");