diff options
-rw-r--r-- | console-tools/Config.src | 166 | ||||
-rw-r--r-- | console-tools/Kbuild.src | 16 | ||||
-rw-r--r-- | console-tools/chvt.c | 11 | ||||
-rw-r--r-- | console-tools/clear.c | 9 | ||||
-rw-r--r-- | console-tools/deallocvt.c | 10 | ||||
-rw-r--r-- | console-tools/dumpkmap.c | 12 | ||||
-rw-r--r-- | console-tools/fgconsole.c | 10 | ||||
-rw-r--r-- | console-tools/kbd_mode.c | 10 | ||||
-rw-r--r-- | console-tools/loadfont.c | 51 | ||||
-rw-r--r-- | console-tools/loadkmap.c | 11 | ||||
-rw-r--r-- | console-tools/openvt.c | 11 | ||||
-rw-r--r-- | console-tools/reset.c | 13 | ||||
-rw-r--r-- | console-tools/resize.c | 21 | ||||
-rw-r--r-- | console-tools/setconsole.c | 18 | ||||
-rw-r--r-- | console-tools/setkeycodes.c | 11 | ||||
-rw-r--r-- | console-tools/setlogcons.c | 10 | ||||
-rw-r--r-- | console-tools/showkey.c | 10 | ||||
-rw-r--r-- | include/applets.src.h | 16 |
18 files changed, 213 insertions, 203 deletions
diff --git a/console-tools/Config.src b/console-tools/Config.src index c65704478..e6587ade4 100644 --- a/console-tools/Config.src +++ b/console-tools/Config.src | |||
@@ -7,170 +7,4 @@ menu "Console Utilities" | |||
7 | 7 | ||
8 | INSERT | 8 | INSERT |
9 | 9 | ||
10 | config CHVT | ||
11 | bool "chvt" | ||
12 | default y | ||
13 | select PLATFORM_LINUX | ||
14 | help | ||
15 | This program is used to change to another terminal. | ||
16 | Example: chvt 4 (change to terminal /dev/tty4) | ||
17 | |||
18 | config FGCONSOLE | ||
19 | bool "fgconsole" | ||
20 | default y | ||
21 | select PLATFORM_LINUX | ||
22 | help | ||
23 | This program prints active (foreground) console number. | ||
24 | |||
25 | config CLEAR | ||
26 | bool "clear" | ||
27 | default y | ||
28 | help | ||
29 | This program clears the terminal screen. | ||
30 | |||
31 | config DEALLOCVT | ||
32 | bool "deallocvt" | ||
33 | default y | ||
34 | select PLATFORM_LINUX | ||
35 | help | ||
36 | This program deallocates unused virtual consoles. | ||
37 | |||
38 | config DUMPKMAP | ||
39 | bool "dumpkmap" | ||
40 | default y | ||
41 | select PLATFORM_LINUX | ||
42 | help | ||
43 | This program dumps the kernel's keyboard translation table to | ||
44 | stdout, in binary format. You can then use loadkmap to load it. | ||
45 | |||
46 | config KBD_MODE | ||
47 | bool "kbd_mode" | ||
48 | default y | ||
49 | select PLATFORM_LINUX | ||
50 | help | ||
51 | This program reports and sets keyboard mode. | ||
52 | |||
53 | config LOADFONT | ||
54 | bool "loadfont" | ||
55 | default y | ||
56 | select PLATFORM_LINUX | ||
57 | help | ||
58 | This program loads a console font from standard input. | ||
59 | |||
60 | config LOADKMAP | ||
61 | bool "loadkmap" | ||
62 | default y | ||
63 | select PLATFORM_LINUX | ||
64 | help | ||
65 | This program loads a keyboard translation table from | ||
66 | standard input. | ||
67 | |||
68 | config OPENVT | ||
69 | bool "openvt" | ||
70 | default y | ||
71 | select PLATFORM_LINUX | ||
72 | help | ||
73 | This program is used to start a command on an unused | ||
74 | virtual terminal. | ||
75 | |||
76 | config RESET | ||
77 | bool "reset" | ||
78 | default y | ||
79 | help | ||
80 | This program is used to reset the terminal screen, if it | ||
81 | gets messed up. | ||
82 | |||
83 | config RESIZE | ||
84 | bool "resize" | ||
85 | default y | ||
86 | help | ||
87 | This program is used to (re)set the width and height of your current | ||
88 | terminal. | ||
89 | |||
90 | config FEATURE_RESIZE_PRINT | ||
91 | bool "Print environment variables" | ||
92 | default y | ||
93 | depends on RESIZE | ||
94 | help | ||
95 | Prints the newly set size (number of columns and rows) of | ||
96 | the terminal. | ||
97 | E.g.: | ||
98 | COLUMNS=80;LINES=44;export COLUMNS LINES; | ||
99 | |||
100 | config SETCONSOLE | ||
101 | bool "setconsole" | ||
102 | default y | ||
103 | select PLATFORM_LINUX | ||
104 | help | ||
105 | This program redirects the system console to another device, | ||
106 | like the current tty while logged in via telnet. | ||
107 | |||
108 | config FEATURE_SETCONSOLE_LONG_OPTIONS | ||
109 | bool "Enable long options" | ||
110 | default y | ||
111 | depends on SETCONSOLE && LONG_OPTS | ||
112 | help | ||
113 | Support long options for the setconsole applet. | ||
114 | |||
115 | config SETFONT | ||
116 | bool "setfont" | ||
117 | default y | ||
118 | select PLATFORM_LINUX | ||
119 | help | ||
120 | Allows to load console screen map. Useful for i18n. | ||
121 | |||
122 | config FEATURE_SETFONT_TEXTUAL_MAP | ||
123 | bool "Support reading textual screen maps" | ||
124 | default y | ||
125 | depends on SETFONT | ||
126 | help | ||
127 | Support reading textual screen maps. | ||
128 | |||
129 | config DEFAULT_SETFONT_DIR | ||
130 | string "Default directory for console-tools files" | ||
131 | default "" | ||
132 | depends on SETFONT | ||
133 | help | ||
134 | Directory to use if setfont's params are simple filenames | ||
135 | (not /path/to/file or ./file). Default is "" (no default directory). | ||
136 | |||
137 | config SETKEYCODES | ||
138 | bool "setkeycodes" | ||
139 | default y | ||
140 | select PLATFORM_LINUX | ||
141 | help | ||
142 | This program loads entries into the kernel's scancode-to-keycode | ||
143 | map, allowing unusual keyboards to generate usable keycodes. | ||
144 | |||
145 | config SETLOGCONS | ||
146 | bool "setlogcons" | ||
147 | default y | ||
148 | select PLATFORM_LINUX | ||
149 | help | ||
150 | This program redirects the output console of kernel messages. | ||
151 | |||
152 | config SHOWKEY | ||
153 | bool "showkey" | ||
154 | default y | ||
155 | select PLATFORM_LINUX | ||
156 | help | ||
157 | Shows keys pressed. | ||
158 | |||
159 | comment "Common options for loadfont and setfont" | ||
160 | depends on LOADFONT || SETFONT | ||
161 | |||
162 | config FEATURE_LOADFONT_PSF2 | ||
163 | bool "Support for PSF2 console fonts" | ||
164 | default y | ||
165 | depends on LOADFONT || SETFONT | ||
166 | help | ||
167 | Support PSF2 console fonts. | ||
168 | |||
169 | config FEATURE_LOADFONT_RAW | ||
170 | bool "Support for old (raw) console fonts" | ||
171 | default y | ||
172 | depends on LOADFONT || SETFONT | ||
173 | help | ||
174 | Support old (raw) console fonts. | ||
175 | |||
176 | endmenu | 10 | endmenu |
diff --git a/console-tools/Kbuild.src b/console-tools/Kbuild.src index 94de9ad9f..6b4fb7470 100644 --- a/console-tools/Kbuild.src +++ b/console-tools/Kbuild.src | |||
@@ -7,19 +7,3 @@ | |||
7 | lib-y:= | 7 | lib-y:= |
8 | 8 | ||
9 | INSERT | 9 | INSERT |
10 | lib-$(CONFIG_CHVT) += chvt.o | ||
11 | lib-$(CONFIG_FGCONSOLE) += fgconsole.o | ||
12 | lib-$(CONFIG_CLEAR) += clear.o | ||
13 | lib-$(CONFIG_DEALLOCVT) += deallocvt.o | ||
14 | lib-$(CONFIG_DUMPKMAP) += dumpkmap.o | ||
15 | lib-$(CONFIG_SETCONSOLE) += setconsole.o | ||
16 | lib-$(CONFIG_KBD_MODE) += kbd_mode.o | ||
17 | lib-$(CONFIG_LOADFONT) += loadfont.o | ||
18 | lib-$(CONFIG_LOADKMAP) += loadkmap.o | ||
19 | lib-$(CONFIG_OPENVT) += openvt.o | ||
20 | lib-$(CONFIG_RESET) += reset.o | ||
21 | lib-$(CONFIG_RESIZE) += resize.o | ||
22 | lib-$(CONFIG_SETFONT) += loadfont.o | ||
23 | lib-$(CONFIG_SETKEYCODES) += setkeycodes.o | ||
24 | lib-$(CONFIG_SETLOGCONS) += setlogcons.o | ||
25 | lib-$(CONFIG_SHOWKEY) += showkey.o | ||
diff --git a/console-tools/chvt.c b/console-tools/chvt.c index b9c974f4a..2b993eb62 100644 --- a/console-tools/chvt.c +++ b/console-tools/chvt.c | |||
@@ -6,6 +6,17 @@ | |||
6 | * | 6 | * |
7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
8 | */ | 8 | */ |
9 | //config:config CHVT | ||
10 | //config: bool "chvt" | ||
11 | //config: default y | ||
12 | //config: select PLATFORM_LINUX | ||
13 | //config: help | ||
14 | //config: This program is used to change to another terminal. | ||
15 | //config: Example: chvt 4 (change to terminal /dev/tty4) | ||
16 | |||
17 | //applet:IF_CHVT(APPLET(chvt, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
18 | |||
19 | //kbuild:lib-$(CONFIG_CHVT) += chvt.o | ||
9 | 20 | ||
10 | //usage:#define chvt_trivial_usage | 21 | //usage:#define chvt_trivial_usage |
11 | //usage: "N" | 22 | //usage: "N" |
diff --git a/console-tools/clear.c b/console-tools/clear.c index ac22b787e..b360d34d9 100644 --- a/console-tools/clear.c +++ b/console-tools/clear.c | |||
@@ -6,6 +6,15 @@ | |||
6 | * | 6 | * |
7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
8 | */ | 8 | */ |
9 | //config:config CLEAR | ||
10 | //config: bool "clear" | ||
11 | //config: default y | ||
12 | //config: help | ||
13 | //config: This program clears the terminal screen. | ||
14 | |||
15 | //applet:IF_CLEAR(APPLET(clear, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
16 | |||
17 | //kbuild:lib-$(CONFIG_CLEAR) += clear.o | ||
9 | 18 | ||
10 | //usage:#define clear_trivial_usage | 19 | //usage:#define clear_trivial_usage |
11 | //usage: "" | 20 | //usage: "" |
diff --git a/console-tools/deallocvt.c b/console-tools/deallocvt.c index b131c0a64..37c966af3 100644 --- a/console-tools/deallocvt.c +++ b/console-tools/deallocvt.c | |||
@@ -7,8 +7,16 @@ | |||
7 | * | 7 | * |
8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
9 | */ | 9 | */ |
10 | //config:config DEALLOCVT | ||
11 | //config: bool "deallocvt" | ||
12 | //config: default y | ||
13 | //config: select PLATFORM_LINUX | ||
14 | //config: help | ||
15 | //config: This program deallocates unused virtual consoles. | ||
10 | 16 | ||
11 | /* no options, no getopt */ | 17 | //applet:IF_DEALLOCVT(APPLET(deallocvt, BB_DIR_USR_BIN, BB_SUID_DROP)) |
18 | |||
19 | //kbuild:lib-$(CONFIG_DEALLOCVT) += deallocvt.o | ||
12 | 20 | ||
13 | //usage:#define deallocvt_trivial_usage | 21 | //usage:#define deallocvt_trivial_usage |
14 | //usage: "[N]" | 22 | //usage: "[N]" |
diff --git a/console-tools/dumpkmap.c b/console-tools/dumpkmap.c index b6fd466dc..4a249868a 100644 --- a/console-tools/dumpkmap.c +++ b/console-tools/dumpkmap.c | |||
@@ -7,7 +7,17 @@ | |||
7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
8 | * | 8 | * |
9 | */ | 9 | */ |
10 | /* no options, no getopt */ | 10 | //config:config DUMPKMAP |
11 | //config: bool "dumpkmap" | ||
12 | //config: default y | ||
13 | //config: select PLATFORM_LINUX | ||
14 | //config: help | ||
15 | //config: This program dumps the kernel's keyboard translation table to | ||
16 | //config: stdout, in binary format. You can then use loadkmap to load it. | ||
17 | |||
18 | //applet:IF_DUMPKMAP(APPLET(dumpkmap, BB_DIR_BIN, BB_SUID_DROP)) | ||
19 | |||
20 | //kbuild:lib-$(CONFIG_DUMPKMAP) += dumpkmap.o | ||
11 | 21 | ||
12 | //usage:#define dumpkmap_trivial_usage | 22 | //usage:#define dumpkmap_trivial_usage |
13 | //usage: "> keymap" | 23 | //usage: "> keymap" |
diff --git a/console-tools/fgconsole.c b/console-tools/fgconsole.c index 54355bee6..019761726 100644 --- a/console-tools/fgconsole.c +++ b/console-tools/fgconsole.c | |||
@@ -6,6 +6,16 @@ | |||
6 | * | 6 | * |
7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
8 | */ | 8 | */ |
9 | //config:config FGCONSOLE | ||
10 | //config: bool "fgconsole" | ||
11 | //config: default y | ||
12 | //config: select PLATFORM_LINUX | ||
13 | //config: help | ||
14 | //config: This program prints active (foreground) console number. | ||
15 | |||
16 | //applet:IF_FGCONSOLE(APPLET(fgconsole, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
17 | |||
18 | //kbuild:lib-$(CONFIG_FGCONSOLE) += fgconsole.o | ||
9 | 19 | ||
10 | //usage:#define fgconsole_trivial_usage | 20 | //usage:#define fgconsole_trivial_usage |
11 | //usage: "" | 21 | //usage: "" |
diff --git a/console-tools/kbd_mode.c b/console-tools/kbd_mode.c index 138536721..f1238c6b4 100644 --- a/console-tools/kbd_mode.c +++ b/console-tools/kbd_mode.c | |||
@@ -8,6 +8,16 @@ | |||
8 | * | 8 | * |
9 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 9 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
10 | */ | 10 | */ |
11 | //config:config KBD_MODE | ||
12 | //config: bool "kbd_mode" | ||
13 | //config: default y | ||
14 | //config: select PLATFORM_LINUX | ||
15 | //config: help | ||
16 | //config: This program reports and sets keyboard mode. | ||
17 | |||
18 | //applet:IF_KBD_MODE(APPLET(kbd_mode, BB_DIR_BIN, BB_SUID_DROP)) | ||
19 | |||
20 | //kbuild:lib-$(CONFIG_KBD_MODE) += kbd_mode.o | ||
11 | 21 | ||
12 | //usage:#define kbd_mode_trivial_usage | 22 | //usage:#define kbd_mode_trivial_usage |
13 | //usage: "[-a|k|s|u] [-C TTY]" | 23 | //usage: "[-a|k|s|u] [-C TTY]" |
diff --git a/console-tools/loadfont.c b/console-tools/loadfont.c index 58073e0dc..52605baa1 100644 --- a/console-tools/loadfont.c +++ b/console-tools/loadfont.c | |||
@@ -9,6 +9,57 @@ | |||
9 | * | 9 | * |
10 | * Licensed under GPLv2, see file LICENSE in this source tree. | 10 | * Licensed under GPLv2, see file LICENSE in this source tree. |
11 | */ | 11 | */ |
12 | //config:config LOADFONT | ||
13 | //config: bool "loadfont" | ||
14 | //config: default y | ||
15 | //config: select PLATFORM_LINUX | ||
16 | //config: help | ||
17 | //config: This program loads a console font from standard input. | ||
18 | //config: | ||
19 | //config:config SETFONT | ||
20 | //config: bool "setfont" | ||
21 | //config: default y | ||
22 | //config: select PLATFORM_LINUX | ||
23 | //config: help | ||
24 | //config: Allows to load console screen map. Useful for i18n. | ||
25 | //config: | ||
26 | //config:config FEATURE_SETFONT_TEXTUAL_MAP | ||
27 | //config: bool "Support reading textual screen maps" | ||
28 | //config: default y | ||
29 | //config: depends on SETFONT | ||
30 | //config: help | ||
31 | //config: Support reading textual screen maps. | ||
32 | //config: | ||
33 | //config:config DEFAULT_SETFONT_DIR | ||
34 | //config: string "Default directory for console-tools files" | ||
35 | //config: default "" | ||
36 | //config: depends on SETFONT | ||
37 | //config: help | ||
38 | //config: Directory to use if setfont's params are simple filenames | ||
39 | //config: (not /path/to/file or ./file). Default is "" (no default directory). | ||
40 | //config: | ||
41 | //config:comment "Common options for loadfont and setfont" | ||
42 | //config: depends on LOADFONT || SETFONT | ||
43 | //config: | ||
44 | //config:config FEATURE_LOADFONT_PSF2 | ||
45 | //config: bool "Support for PSF2 console fonts" | ||
46 | //config: default y | ||
47 | //config: depends on LOADFONT || SETFONT | ||
48 | //config: help | ||
49 | //config: Support PSF2 console fonts. | ||
50 | //config: | ||
51 | //config:config FEATURE_LOADFONT_RAW | ||
52 | //config: bool "Support for old (raw) console fonts" | ||
53 | //config: default y | ||
54 | //config: depends on LOADFONT || SETFONT | ||
55 | //config: help | ||
56 | //config: Support old (raw) console fonts. | ||
57 | |||
58 | //applet:IF_LOADFONT(APPLET(loadfont, BB_DIR_USR_SBIN, BB_SUID_DROP)) | ||
59 | //applet:IF_SETFONT(APPLET(setfont, BB_DIR_USR_SBIN, BB_SUID_DROP)) | ||
60 | |||
61 | //kbuild:lib-$(CONFIG_LOADFONT) += loadfont.o | ||
62 | //kbuild:lib-$(CONFIG_SETFONT) += loadfont.o | ||
12 | 63 | ||
13 | //usage:#define loadfont_trivial_usage | 64 | //usage:#define loadfont_trivial_usage |
14 | //usage: "< font" | 65 | //usage: "< font" |
diff --git a/console-tools/loadkmap.c b/console-tools/loadkmap.c index f525ee5d1..70ab55a8e 100644 --- a/console-tools/loadkmap.c +++ b/console-tools/loadkmap.c | |||
@@ -6,6 +6,17 @@ | |||
6 | * | 6 | * |
7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
8 | */ | 8 | */ |
9 | //config:config LOADKMAP | ||
10 | //config: bool "loadkmap" | ||
11 | //config: default y | ||
12 | //config: select PLATFORM_LINUX | ||
13 | //config: help | ||
14 | //config: This program loads a keyboard translation table from | ||
15 | //config: standard input. | ||
16 | |||
17 | //applet:IF_LOADKMAP(APPLET(loadkmap, BB_DIR_SBIN, BB_SUID_DROP)) | ||
18 | |||
19 | //kbuild:lib-$(CONFIG_LOADKMAP) += loadkmap.o | ||
9 | 20 | ||
10 | //usage:#define loadkmap_trivial_usage | 21 | //usage:#define loadkmap_trivial_usage |
11 | //usage: "< keymap" | 22 | //usage: "< keymap" |
diff --git a/console-tools/openvt.c b/console-tools/openvt.c index e52356692..5cbc717ec 100644 --- a/console-tools/openvt.c +++ b/console-tools/openvt.c | |||
@@ -7,6 +7,17 @@ | |||
7 | * | 7 | * |
8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
9 | */ | 9 | */ |
10 | //config:config OPENVT | ||
11 | //config: bool "openvt" | ||
12 | //config: default y | ||
13 | //config: select PLATFORM_LINUX | ||
14 | //config: help | ||
15 | //config: This program is used to start a command on an unused | ||
16 | //config: virtual terminal. | ||
17 | |||
18 | //applet:IF_OPENVT(APPLET(openvt, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
19 | |||
20 | //kbuild:lib-$(CONFIG_OPENVT) += openvt.o | ||
10 | 21 | ||
11 | //usage:#define openvt_trivial_usage | 22 | //usage:#define openvt_trivial_usage |
12 | //usage: "[-c N] [-sw] [PROG ARGS]" | 23 | //usage: "[-c N] [-sw] [PROG ARGS]" |
diff --git a/console-tools/reset.c b/console-tools/reset.c index 65940bdec..57cebb4ea 100644 --- a/console-tools/reset.c +++ b/console-tools/reset.c | |||
@@ -7,9 +7,18 @@ | |||
7 | * | 7 | * |
8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
9 | */ | 9 | */ |
10 | /* "Standard" version of this tool is in ncurses package */ | ||
10 | 11 | ||
11 | /* BTW, which "standard" package has this utility? It doesn't seem | 12 | //config:config RESET |
12 | * to be ncurses, coreutils, console-tools... then what? */ | 13 | //config: bool "reset" |
14 | //config: default y | ||
15 | //config: help | ||
16 | //config: This program is used to reset the terminal screen, if it | ||
17 | //config: gets messed up. | ||
18 | |||
19 | //applet:IF_RESET(APPLET(reset, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
20 | |||
21 | //kbuild:lib-$(CONFIG_RESET) += reset.o | ||
13 | 22 | ||
14 | //usage:#define reset_trivial_usage | 23 | //usage:#define reset_trivial_usage |
15 | //usage: "" | 24 | //usage: "" |
diff --git a/console-tools/resize.c b/console-tools/resize.c index a3342a195..567086f09 100644 --- a/console-tools/resize.c +++ b/console-tools/resize.c | |||
@@ -6,7 +6,26 @@ | |||
6 | * | 6 | * |
7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
8 | */ | 8 | */ |
9 | /* no options, no getopt */ | 9 | //config:config RESIZE |
10 | //config: bool "resize" | ||
11 | //config: default y | ||
12 | //config: help | ||
13 | //config: This program is used to (re)set the width and height of your current | ||
14 | //config: terminal. | ||
15 | //config: | ||
16 | //config:config FEATURE_RESIZE_PRINT | ||
17 | //config: bool "Print environment variables" | ||
18 | //config: default y | ||
19 | //config: depends on RESIZE | ||
20 | //config: help | ||
21 | //config: Prints the newly set size (number of columns and rows) of | ||
22 | //config: the terminal. | ||
23 | //config: E.g.: | ||
24 | //config: COLUMNS=80;LINES=44;export COLUMNS LINES; | ||
25 | |||
26 | //applet:IF_RESIZE(APPLET(resize, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
27 | |||
28 | //kbuild:lib-$(CONFIG_RESIZE) += resize.o | ||
10 | 29 | ||
11 | //usage:#define resize_trivial_usage | 30 | //usage:#define resize_trivial_usage |
12 | //usage: "" | 31 | //usage: "" |
diff --git a/console-tools/setconsole.c b/console-tools/setconsole.c index c0051dcc8..58057268d 100644 --- a/console-tools/setconsole.c +++ b/console-tools/setconsole.c | |||
@@ -7,6 +7,24 @@ | |||
7 | * | 7 | * |
8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 8 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
9 | */ | 9 | */ |
10 | //config:config SETCONSOLE | ||
11 | //config: bool "setconsole" | ||
12 | //config: default y | ||
13 | //config: select PLATFORM_LINUX | ||
14 | //config: help | ||
15 | //config: This program redirects the system console to another device, | ||
16 | //config: like the current tty while logged in via telnet. | ||
17 | //config: | ||
18 | //config:config FEATURE_SETCONSOLE_LONG_OPTIONS | ||
19 | //config: bool "Enable long options" | ||
20 | //config: default y | ||
21 | //config: depends on SETCONSOLE && LONG_OPTS | ||
22 | //config: help | ||
23 | //config: Support long options for the setconsole applet. | ||
24 | |||
25 | //applet:IF_SETCONSOLE(APPLET(setconsole, BB_DIR_SBIN, BB_SUID_DROP)) | ||
26 | |||
27 | //kbuild:lib-$(CONFIG_SETCONSOLE) += setconsole.o | ||
10 | 28 | ||
11 | //usage:#define setconsole_trivial_usage | 29 | //usage:#define setconsole_trivial_usage |
12 | //usage: "[-r" IF_FEATURE_SETCONSOLE_LONG_OPTIONS("|--reset") "] [DEVICE]" | 30 | //usage: "[-r" IF_FEATURE_SETCONSOLE_LONG_OPTIONS("|--reset") "] [DEVICE]" |
diff --git a/console-tools/setkeycodes.c b/console-tools/setkeycodes.c index a6a7c2374..11fc37ae9 100644 --- a/console-tools/setkeycodes.c +++ b/console-tools/setkeycodes.c | |||
@@ -8,6 +8,17 @@ | |||
8 | * | 8 | * |
9 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 9 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
10 | */ | 10 | */ |
11 | //config:config SETKEYCODES | ||
12 | //config: bool "setkeycodes" | ||
13 | //config: default y | ||
14 | //config: select PLATFORM_LINUX | ||
15 | //config: help | ||
16 | //config: This program loads entries into the kernel's scancode-to-keycode | ||
17 | //config: map, allowing unusual keyboards to generate usable keycodes. | ||
18 | |||
19 | //applet:IF_SETKEYCODES(APPLET(setkeycodes, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
20 | |||
21 | //kbuild:lib-$(CONFIG_SETKEYCODES) += setkeycodes.o | ||
11 | 22 | ||
12 | //usage:#define setkeycodes_trivial_usage | 23 | //usage:#define setkeycodes_trivial_usage |
13 | //usage: "SCANCODE KEYCODE..." | 24 | //usage: "SCANCODE KEYCODE..." |
diff --git a/console-tools/setlogcons.c b/console-tools/setlogcons.c index 2a11da329..2ea36f039 100644 --- a/console-tools/setlogcons.c +++ b/console-tools/setlogcons.c | |||
@@ -8,6 +8,16 @@ | |||
8 | * | 8 | * |
9 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 9 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
10 | */ | 10 | */ |
11 | //config:config SETLOGCONS | ||
12 | //config: bool "setlogcons" | ||
13 | //config: default y | ||
14 | //config: select PLATFORM_LINUX | ||
15 | //config: help | ||
16 | //config: This program redirects the output console of kernel messages. | ||
17 | |||
18 | //applet:IF_SETLOGCONS(APPLET(setlogcons, BB_DIR_USR_SBIN, BB_SUID_DROP)) | ||
19 | |||
20 | //kbuild:lib-$(CONFIG_SETLOGCONS) += setlogcons.o | ||
11 | 21 | ||
12 | //usage:#define setlogcons_trivial_usage | 22 | //usage:#define setlogcons_trivial_usage |
13 | //usage: "[N]" | 23 | //usage: "[N]" |
diff --git a/console-tools/showkey.c b/console-tools/showkey.c index b7b4c32a8..c2447b887 100644 --- a/console-tools/showkey.c +++ b/console-tools/showkey.c | |||
@@ -6,6 +6,16 @@ | |||
6 | * | 6 | * |
7 | * Licensed under GPLv2, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2, see file LICENSE in this source tree. |
8 | */ | 8 | */ |
9 | //config:config SHOWKEY | ||
10 | //config: bool "showkey" | ||
11 | //config: default y | ||
12 | //config: select PLATFORM_LINUX | ||
13 | //config: help | ||
14 | //config: Shows keys pressed. | ||
15 | |||
16 | //applet:IF_SHOWKEY(APPLET(showkey, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
17 | |||
18 | //kbuild:lib-$(CONFIG_SHOWKEY) += showkey.o | ||
9 | 19 | ||
10 | //usage:#define showkey_trivial_usage | 20 | //usage:#define showkey_trivial_usage |
11 | //usage: "[-a | -k | -s]" | 21 | //usage: "[-a | -k | -s]" |
diff --git a/include/applets.src.h b/include/applets.src.h index 83f6237b2..adce804e5 100644 --- a/include/applets.src.h +++ b/include/applets.src.h | |||
@@ -86,21 +86,17 @@ IF_CHGRP(APPLET_NOEXEC(chgrp, chgrp, BB_DIR_BIN, BB_SUID_DROP, chgrp)) | |||
86 | IF_CHMOD(APPLET_NOEXEC(chmod, chmod, BB_DIR_BIN, BB_SUID_DROP, chmod)) | 86 | IF_CHMOD(APPLET_NOEXEC(chmod, chmod, BB_DIR_BIN, BB_SUID_DROP, chmod)) |
87 | IF_CHOWN(APPLET_NOEXEC(chown, chown, BB_DIR_BIN, BB_SUID_DROP, chown)) | 87 | IF_CHOWN(APPLET_NOEXEC(chown, chown, BB_DIR_BIN, BB_SUID_DROP, chown)) |
88 | IF_CHROOT(APPLET(chroot, BB_DIR_USR_SBIN, BB_SUID_DROP)) | 88 | IF_CHROOT(APPLET(chroot, BB_DIR_USR_SBIN, BB_SUID_DROP)) |
89 | IF_CHVT(APPLET(chvt, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
90 | IF_CKSUM(APPLET_NOEXEC(cksum, cksum, BB_DIR_USR_BIN, BB_SUID_DROP, cksum)) | 89 | IF_CKSUM(APPLET_NOEXEC(cksum, cksum, BB_DIR_USR_BIN, BB_SUID_DROP, cksum)) |
91 | IF_CLEAR(APPLET(clear, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
92 | IF_COMM(APPLET(comm, BB_DIR_USR_BIN, BB_SUID_DROP)) | 90 | IF_COMM(APPLET(comm, BB_DIR_USR_BIN, BB_SUID_DROP)) |
93 | IF_CP(APPLET_NOEXEC(cp, cp, BB_DIR_BIN, BB_SUID_DROP, cp)) | 91 | IF_CP(APPLET_NOEXEC(cp, cp, BB_DIR_BIN, BB_SUID_DROP, cp)) |
94 | IF_CUT(APPLET_NOEXEC(cut, cut, BB_DIR_USR_BIN, BB_SUID_DROP, cut)) | 92 | IF_CUT(APPLET_NOEXEC(cut, cut, BB_DIR_USR_BIN, BB_SUID_DROP, cut)) |
95 | IF_DD(APPLET_NOEXEC(dd, dd, BB_DIR_BIN, BB_SUID_DROP, dd)) | 93 | IF_DD(APPLET_NOEXEC(dd, dd, BB_DIR_BIN, BB_SUID_DROP, dd)) |
96 | IF_DEALLOCVT(APPLET(deallocvt, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
97 | IF_DF(APPLET(df, BB_DIR_BIN, BB_SUID_DROP)) | 94 | IF_DF(APPLET(df, BB_DIR_BIN, BB_SUID_DROP)) |
98 | IF_DHCPRELAY(APPLET(dhcprelay, BB_DIR_USR_SBIN, BB_SUID_DROP)) | 95 | IF_DHCPRELAY(APPLET(dhcprelay, BB_DIR_USR_SBIN, BB_SUID_DROP)) |
99 | IF_DIRNAME(APPLET_NOFORK(dirname, dirname, BB_DIR_USR_BIN, BB_SUID_DROP, dirname)) | 96 | IF_DIRNAME(APPLET_NOFORK(dirname, dirname, BB_DIR_USR_BIN, BB_SUID_DROP, dirname)) |
100 | IF_DMESG(APPLET(dmesg, BB_DIR_BIN, BB_SUID_DROP)) | 97 | IF_DMESG(APPLET(dmesg, BB_DIR_BIN, BB_SUID_DROP)) |
101 | IF_DOS2UNIX(APPLET_NOEXEC(dos2unix, dos2unix, BB_DIR_USR_BIN, BB_SUID_DROP, dos2unix)) | 98 | IF_DOS2UNIX(APPLET_NOEXEC(dos2unix, dos2unix, BB_DIR_USR_BIN, BB_SUID_DROP, dos2unix)) |
102 | IF_DU(APPLET(du, BB_DIR_USR_BIN, BB_SUID_DROP)) | 99 | IF_DU(APPLET(du, BB_DIR_USR_BIN, BB_SUID_DROP)) |
103 | IF_DUMPKMAP(APPLET(dumpkmap, BB_DIR_BIN, BB_SUID_DROP)) | ||
104 | IF_DUMPLEASES(APPLET(dumpleases, BB_DIR_USR_BIN, BB_SUID_DROP)) | 100 | IF_DUMPLEASES(APPLET(dumpleases, BB_DIR_USR_BIN, BB_SUID_DROP)) |
105 | //IF_E2FSCK(APPLET(e2fsck, BB_DIR_SBIN, BB_SUID_DROP)) | 101 | //IF_E2FSCK(APPLET(e2fsck, BB_DIR_SBIN, BB_SUID_DROP)) |
106 | //IF_E2LABEL(APPLET_ODDNAME(e2label, tune2fs, BB_DIR_SBIN, BB_SUID_DROP, e2label)) | 102 | //IF_E2LABEL(APPLET_ODDNAME(e2label, tune2fs, BB_DIR_SBIN, BB_SUID_DROP, e2label)) |
@@ -113,7 +109,6 @@ IF_FBSET(APPLET(fbset, BB_DIR_USR_SBIN, BB_SUID_DROP)) | |||
113 | IF_FDFLUSH(APPLET_ODDNAME(fdflush, freeramdisk, BB_DIR_BIN, BB_SUID_DROP, fdflush)) | 109 | IF_FDFLUSH(APPLET_ODDNAME(fdflush, freeramdisk, BB_DIR_BIN, BB_SUID_DROP, fdflush)) |
114 | IF_FDFORMAT(APPLET(fdformat, BB_DIR_USR_SBIN, BB_SUID_DROP)) | 110 | IF_FDFORMAT(APPLET(fdformat, BB_DIR_USR_SBIN, BB_SUID_DROP)) |
115 | IF_FDISK(APPLET(fdisk, BB_DIR_SBIN, BB_SUID_DROP)) | 111 | IF_FDISK(APPLET(fdisk, BB_DIR_SBIN, BB_SUID_DROP)) |
116 | IF_FGCONSOLE(APPLET(fgconsole, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
117 | /* Benefits from suid root: better access to /dev/BLOCKDEVs: */ | 112 | /* Benefits from suid root: better access to /dev/BLOCKDEVs: */ |
118 | IF_FINDFS(APPLET(findfs, BB_DIR_SBIN, BB_SUID_MAYBE)) | 113 | IF_FINDFS(APPLET(findfs, BB_DIR_SBIN, BB_SUID_MAYBE)) |
119 | IF_FLOCK(APPLET(flock, BB_DIR_USR_BIN, BB_SUID_DROP)) | 114 | IF_FLOCK(APPLET(flock, BB_DIR_USR_BIN, BB_SUID_DROP)) |
@@ -133,12 +128,9 @@ IF_HWCLOCK(APPLET(hwclock, BB_DIR_SBIN, BB_SUID_DROP)) | |||
133 | IF_INSTALL(APPLET(install, BB_DIR_USR_BIN, BB_SUID_DROP)) | 128 | IF_INSTALL(APPLET(install, BB_DIR_USR_BIN, BB_SUID_DROP)) |
134 | IF_IPCRM(APPLET(ipcrm, BB_DIR_USR_BIN, BB_SUID_DROP)) | 129 | IF_IPCRM(APPLET(ipcrm, BB_DIR_USR_BIN, BB_SUID_DROP)) |
135 | IF_IPCS(APPLET(ipcs, BB_DIR_USR_BIN, BB_SUID_DROP)) | 130 | IF_IPCS(APPLET(ipcs, BB_DIR_USR_BIN, BB_SUID_DROP)) |
136 | IF_KBD_MODE(APPLET(kbd_mode, BB_DIR_BIN, BB_SUID_DROP)) | ||
137 | //IF_LENGTH(APPLET_NOFORK(length, length, BB_DIR_USR_BIN, BB_SUID_DROP, length)) | 131 | //IF_LENGTH(APPLET_NOFORK(length, length, BB_DIR_USR_BIN, BB_SUID_DROP, length)) |
138 | IF_LN(APPLET_NOEXEC(ln, ln, BB_DIR_BIN, BB_SUID_DROP, ln)) | 132 | IF_LN(APPLET_NOEXEC(ln, ln, BB_DIR_BIN, BB_SUID_DROP, ln)) |
139 | IF_LOAD_POLICY(APPLET(load_policy, BB_DIR_USR_SBIN, BB_SUID_DROP)) | 133 | IF_LOAD_POLICY(APPLET(load_policy, BB_DIR_USR_SBIN, BB_SUID_DROP)) |
140 | IF_LOADFONT(APPLET(loadfont, BB_DIR_USR_SBIN, BB_SUID_DROP)) | ||
141 | IF_LOADKMAP(APPLET(loadkmap, BB_DIR_SBIN, BB_SUID_DROP)) | ||
142 | IF_LOGNAME(APPLET_NOFORK(logname, logname, BB_DIR_USR_BIN, BB_SUID_DROP, logname)) | 134 | IF_LOGNAME(APPLET_NOFORK(logname, logname, BB_DIR_USR_BIN, BB_SUID_DROP, logname)) |
143 | IF_LOSETUP(APPLET(losetup, BB_DIR_SBIN, BB_SUID_DROP)) | 135 | IF_LOSETUP(APPLET(losetup, BB_DIR_SBIN, BB_SUID_DROP)) |
144 | IF_LS(APPLET_NOEXEC(ls, ls, BB_DIR_BIN, BB_SUID_DROP, ls)) | 136 | IF_LS(APPLET_NOEXEC(ls, ls, BB_DIR_BIN, BB_SUID_DROP, ls)) |
@@ -161,7 +153,6 @@ IF_MV(APPLET(mv, BB_DIR_BIN, BB_SUID_DROP)) | |||
161 | IF_NICE(APPLET(nice, BB_DIR_BIN, BB_SUID_DROP)) | 153 | IF_NICE(APPLET(nice, BB_DIR_BIN, BB_SUID_DROP)) |
162 | IF_NOHUP(APPLET(nohup, BB_DIR_USR_BIN, BB_SUID_DROP)) | 154 | IF_NOHUP(APPLET(nohup, BB_DIR_USR_BIN, BB_SUID_DROP)) |
163 | IF_OD(APPLET(od, BB_DIR_USR_BIN, BB_SUID_DROP)) | 155 | IF_OD(APPLET(od, BB_DIR_USR_BIN, BB_SUID_DROP)) |
164 | IF_OPENVT(APPLET(openvt, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
165 | //IF_PARSE(APPLET(parse, BB_DIR_USR_BIN, BB_SUID_DROP)) | 156 | //IF_PARSE(APPLET(parse, BB_DIR_USR_BIN, BB_SUID_DROP)) |
166 | IF_PIVOT_ROOT(APPLET(pivot_root, BB_DIR_SBIN, BB_SUID_DROP)) | 157 | IF_PIVOT_ROOT(APPLET(pivot_root, BB_DIR_SBIN, BB_SUID_DROP)) |
167 | IF_PRINTENV(APPLET_NOFORK(printenv, printenv, BB_DIR_BIN, BB_SUID_DROP, printenv)) | 158 | IF_PRINTENV(APPLET_NOFORK(printenv, printenv, BB_DIR_BIN, BB_SUID_DROP, printenv)) |
@@ -172,8 +163,6 @@ IF_RDEV(APPLET(rdev, BB_DIR_USR_SBIN, BB_SUID_DROP)) | |||
172 | IF_READLINK(APPLET(readlink, BB_DIR_USR_BIN, BB_SUID_DROP)) | 163 | IF_READLINK(APPLET(readlink, BB_DIR_USR_BIN, BB_SUID_DROP)) |
173 | IF_READPROFILE(APPLET(readprofile, BB_DIR_USR_SBIN, BB_SUID_DROP)) | 164 | IF_READPROFILE(APPLET(readprofile, BB_DIR_USR_SBIN, BB_SUID_DROP)) |
174 | IF_REALPATH(APPLET(realpath, BB_DIR_USR_BIN, BB_SUID_DROP)) | 165 | IF_REALPATH(APPLET(realpath, BB_DIR_USR_BIN, BB_SUID_DROP)) |
175 | IF_RESET(APPLET(reset, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
176 | IF_RESIZE(APPLET(resize, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
177 | IF_RESTORECON(APPLET_ODDNAME(restorecon, setfiles, BB_DIR_SBIN, BB_SUID_DROP, restorecon)) | 166 | IF_RESTORECON(APPLET_ODDNAME(restorecon, setfiles, BB_DIR_SBIN, BB_SUID_DROP, restorecon)) |
178 | IF_RM(APPLET_NOFORK(rm, rm, BB_DIR_BIN, BB_SUID_DROP, rm)) | 167 | IF_RM(APPLET_NOFORK(rm, rm, BB_DIR_BIN, BB_SUID_DROP, rm)) |
179 | IF_RMDIR(APPLET_NOFORK(rmdir, rmdir, BB_DIR_BIN, BB_SUID_DROP, rmdir)) | 168 | IF_RMDIR(APPLET_NOFORK(rmdir, rmdir, BB_DIR_BIN, BB_SUID_DROP, rmdir)) |
@@ -184,14 +173,9 @@ IF_SCRIPTREPLAY(APPLET(scriptreplay, BB_DIR_BIN, BB_SUID_DROP)) | |||
184 | IF_SELINUXENABLED(APPLET(selinuxenabled, BB_DIR_USR_SBIN, BB_SUID_DROP)) | 173 | IF_SELINUXENABLED(APPLET(selinuxenabled, BB_DIR_USR_SBIN, BB_SUID_DROP)) |
185 | IF_SEQ(APPLET_NOFORK(seq, seq, BB_DIR_USR_BIN, BB_SUID_DROP, seq)) | 174 | IF_SEQ(APPLET_NOFORK(seq, seq, BB_DIR_USR_BIN, BB_SUID_DROP, seq)) |
186 | IF_SESTATUS(APPLET(sestatus, BB_DIR_USR_SBIN, BB_SUID_DROP)) | 175 | IF_SESTATUS(APPLET(sestatus, BB_DIR_USR_SBIN, BB_SUID_DROP)) |
187 | IF_SETCONSOLE(APPLET(setconsole, BB_DIR_SBIN, BB_SUID_DROP)) | ||
188 | IF_SETENFORCE(APPLET(setenforce, BB_DIR_USR_SBIN, BB_SUID_DROP)) | 176 | IF_SETENFORCE(APPLET(setenforce, BB_DIR_USR_SBIN, BB_SUID_DROP)) |
189 | IF_SETFILES(APPLET(setfiles, BB_DIR_SBIN, BB_SUID_DROP)) | 177 | IF_SETFILES(APPLET(setfiles, BB_DIR_SBIN, BB_SUID_DROP)) |
190 | IF_SETFONT(APPLET(setfont, BB_DIR_USR_SBIN, BB_SUID_DROP)) | ||
191 | IF_SETKEYCODES(APPLET(setkeycodes, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
192 | IF_SETLOGCONS(APPLET(setlogcons, BB_DIR_USR_SBIN, BB_SUID_DROP)) | ||
193 | IF_SETSEBOOL(APPLET(setsebool, BB_DIR_USR_SBIN, BB_SUID_DROP)) | 178 | IF_SETSEBOOL(APPLET(setsebool, BB_DIR_USR_SBIN, BB_SUID_DROP)) |
194 | IF_SHOWKEY(APPLET(showkey, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
195 | /* Do not make this applet NOFORK. It breaks ^C-ing of pauses in shells: */ | 179 | /* Do not make this applet NOFORK. It breaks ^C-ing of pauses in shells: */ |
196 | IF_SLEEP(APPLET(sleep, BB_DIR_BIN, BB_SUID_DROP)) | 180 | IF_SLEEP(APPLET(sleep, BB_DIR_BIN, BB_SUID_DROP)) |
197 | IF_SORT(APPLET_NOEXEC(sort, sort, BB_DIR_USR_BIN, BB_SUID_DROP, sort)) | 181 | IF_SORT(APPLET_NOEXEC(sort, sort, BB_DIR_USR_BIN, BB_SUID_DROP, sort)) |