aboutsummaryrefslogtreecommitdiff
path: root/console-tools
diff options
context:
space:
mode:
authorPere Orga <gotrunks@gmail.com>2011-03-27 23:42:28 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2011-03-28 02:51:01 +0200
commit55068c478ee8e8c058b0c9e37ce0ca57612c95b1 (patch)
tree31db732832446b4c231ecb2752279728ae9b9824 /console-tools
parent6ec1510f719ad7463d76eea9284428cc605d6b38 (diff)
downloadbusybox-w32-55068c478ee8e8c058b0c9e37ce0ca57612c95b1.tar.gz
busybox-w32-55068c478ee8e8c058b0c9e37ce0ca57612c95b1.tar.bz2
busybox-w32-55068c478ee8e8c058b0c9e37ce0ca57612c95b1.zip
move help text from include/usage.src.h to console-tools/*.c
Signed-off-by: Pere Orga <gotrunks@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'console-tools')
-rw-r--r--console-tools/chvt.c6
-rw-r--r--console-tools/clear.c6
-rw-r--r--console-tools/deallocvt.c5
-rw-r--r--console-tools/dumpkmap.c8
-rw-r--r--console-tools/fgconsole.c5
-rw-r--r--console-tools/kbd_mode.c12
-rw-r--r--console-tools/loadfont.c10
-rw-r--r--console-tools/loadkmap.c10
-rw-r--r--console-tools/openvt.c13
-rw-r--r--console-tools/reset.c5
-rw-r--r--console-tools/resize.c6
-rw-r--r--console-tools/setconsole.c7
-rw-r--r--console-tools/setkeycodes.c12
-rw-r--r--console-tools/setlogcons.c5
-rw-r--r--console-tools/showkey.c9
15 files changed, 119 insertions, 0 deletions
diff --git a/console-tools/chvt.c b/console-tools/chvt.c
index 07e58c3b8..b9c974f4a 100644
--- a/console-tools/chvt.c
+++ b/console-tools/chvt.c
@@ -6,6 +6,12 @@
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
10//usage:#define chvt_trivial_usage
11//usage: "N"
12//usage:#define chvt_full_usage "\n\n"
13//usage: "Change the foreground virtual terminal to /dev/ttyN"
14
9#include "libbb.h" 15#include "libbb.h"
10 16
11int chvt_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 17int chvt_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
diff --git a/console-tools/clear.c b/console-tools/clear.c
index dcb9bfb02..ac22b787e 100644
--- a/console-tools/clear.c
+++ b/console-tools/clear.c
@@ -6,6 +6,12 @@
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
10//usage:#define clear_trivial_usage
11//usage: ""
12//usage:#define clear_full_usage "\n\n"
13//usage: "Clear screen"
14
9#include "libbb.h" 15#include "libbb.h"
10 16
11int clear_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 17int clear_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
diff --git a/console-tools/deallocvt.c b/console-tools/deallocvt.c
index 6a1d13d14..b131c0a64 100644
--- a/console-tools/deallocvt.c
+++ b/console-tools/deallocvt.c
@@ -10,6 +10,11 @@
10 10
11/* no options, no getopt */ 11/* no options, no getopt */
12 12
13//usage:#define deallocvt_trivial_usage
14//usage: "[N]"
15//usage:#define deallocvt_full_usage "\n\n"
16//usage: "Deallocate unused virtual terminal /dev/ttyN"
17
13#include "libbb.h" 18#include "libbb.h"
14 19
15/* From <linux/vt.h> */ 20/* From <linux/vt.h> */
diff --git a/console-tools/dumpkmap.c b/console-tools/dumpkmap.c
index 301a90674..6b923d2d4 100644
--- a/console-tools/dumpkmap.c
+++ b/console-tools/dumpkmap.c
@@ -9,6 +9,14 @@
9 */ 9 */
10/* no options, no getopt */ 10/* no options, no getopt */
11 11
12//usage:#define dumpkmap_trivial_usage
13//usage: "> keymap"
14//usage:#define dumpkmap_full_usage "\n\n"
15//usage: "Print a binary keyboard translation table to stdout"
16//usage:
17//usage:#define dumpkmap_example_usage
18//usage: "$ dumpkmap > keymap\n"
19
12#include "libbb.h" 20#include "libbb.h"
13 21
14/* From <linux/kd.h> */ 22/* From <linux/kd.h> */
diff --git a/console-tools/fgconsole.c b/console-tools/fgconsole.c
index e2dba4860..54355bee6 100644
--- a/console-tools/fgconsole.c
+++ b/console-tools/fgconsole.c
@@ -7,6 +7,11 @@
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//usage:#define fgconsole_trivial_usage
11//usage: ""
12//usage:#define fgconsole_full_usage "\n\n"
13//usage: "Get active console"
14
10#include "libbb.h" 15#include "libbb.h"
11 16
12/* From <linux/vt.h> */ 17/* From <linux/vt.h> */
diff --git a/console-tools/kbd_mode.c b/console-tools/kbd_mode.c
index 1481d0dbb..221a9f782 100644
--- a/console-tools/kbd_mode.c
+++ b/console-tools/kbd_mode.c
@@ -8,6 +8,18 @@
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
12//usage:#define kbd_mode_trivial_usage
13//usage: "[-a|k|s|u] [-C TTY]"
14//usage:#define kbd_mode_full_usage "\n\n"
15//usage: "Report or set the keyboard mode\n"
16//usage: "\nOptions:"
17//usage: "\n -a Default (ASCII)"
18//usage: "\n -k Medium-raw (keyboard)"
19//usage: "\n -s Raw (scancode)"
20//usage: "\n -u Unicode (utf-8)"
21//usage: "\n -C TTY Affect TTY instead of /dev/tty"
22
11#include "libbb.h" 23#include "libbb.h"
12#include <linux/kd.h> 24#include <linux/kd.h>
13 25
diff --git a/console-tools/loadfont.c b/console-tools/loadfont.c
index 079626c20..588322b05 100644
--- a/console-tools/loadfont.c
+++ b/console-tools/loadfont.c
@@ -9,6 +9,16 @@
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
13//usage:#define loadfont_trivial_usage
14//usage: "< font"
15//usage:#define loadfont_full_usage "\n\n"
16//usage: "Load a console font from stdin"
17/* //usage: "\n -C TTY Affect TTY instead of /dev/tty" */
18//usage:
19//usage:#define loadfont_example_usage
20//usage: "$ loadfont < /etc/i18n/fontname\n"
21
12#include "libbb.h" 22#include "libbb.h"
13#include <sys/kd.h> 23#include <sys/kd.h>
14 24
diff --git a/console-tools/loadkmap.c b/console-tools/loadkmap.c
index 2d1c9e284..bcffe16b1 100644
--- a/console-tools/loadkmap.c
+++ b/console-tools/loadkmap.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
10//usage:#define loadkmap_trivial_usage
11//usage: "< keymap"
12//usage:#define loadkmap_full_usage "\n\n"
13//usage: "Load a binary keyboard translation table from stdin\n"
14/* //usage: "\n -C TTY Affect TTY instead of /dev/tty" */
15//usage:
16//usage:#define loadkmap_example_usage
17//usage: "$ loadkmap < /etc/i18n/lang-keymap\n"
18
9#include "libbb.h" 19#include "libbb.h"
10 20
11#define BINARY_KEYMAP_MAGIC "bkeymap" 21#define BINARY_KEYMAP_MAGIC "bkeymap"
diff --git a/console-tools/openvt.c b/console-tools/openvt.c
index 56f50c6cd..de5cf93fe 100644
--- a/console-tools/openvt.c
+++ b/console-tools/openvt.c
@@ -8,6 +8,19 @@
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 10
11//usage:#define openvt_trivial_usage
12//usage: "[-c N] [-sw] [PROG ARGS]"
13//usage:#define openvt_full_usage "\n\n"
14//usage: "Start PROG on a new virtual terminal\n"
15//usage: "\nOptions:"
16//usage: "\n -c N Use specified VT"
17//usage: "\n -s Switch to the VT"
18/* //usage: "\n -l Run PROG as login shell (by prepending '-')" */
19//usage: "\n -w Wait for PROG to exit"
20//usage:
21//usage:#define openvt_example_usage
22//usage: "openvt 2 /bin/ash\n"
23
11#include <linux/vt.h> 24#include <linux/vt.h>
12#include "libbb.h" 25#include "libbb.h"
13 26
diff --git a/console-tools/reset.c b/console-tools/reset.c
index a23e4f408..65940bdec 100644
--- a/console-tools/reset.c
+++ b/console-tools/reset.c
@@ -11,6 +11,11 @@
11/* BTW, which "standard" package has this utility? It doesn't seem 11/* BTW, which "standard" package has this utility? It doesn't seem
12 * to be ncurses, coreutils, console-tools... then what? */ 12 * to be ncurses, coreutils, console-tools... then what? */
13 13
14//usage:#define reset_trivial_usage
15//usage: ""
16//usage:#define reset_full_usage "\n\n"
17//usage: "Reset the screen"
18
14#include "libbb.h" 19#include "libbb.h"
15 20
16#define ESC "\033" 21#define ESC "\033"
diff --git a/console-tools/resize.c b/console-tools/resize.c
index ee0728b71..4b0d63a03 100644
--- a/console-tools/resize.c
+++ b/console-tools/resize.c
@@ -7,6 +7,12 @@
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/* no options, no getopt */
10
11//usage:#define resize_trivial_usage
12//usage: ""
13//usage:#define resize_full_usage "\n\n"
14//usage: "Resize the screen"
15
10#include "libbb.h" 16#include "libbb.h"
11 17
12#define ESC "\033" 18#define ESC "\033"
diff --git a/console-tools/setconsole.c b/console-tools/setconsole.c
index 87265baf8..59c83361c 100644
--- a/console-tools/setconsole.c
+++ b/console-tools/setconsole.c
@@ -8,6 +8,13 @@
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 10
11//usage:#define setconsole_trivial_usage
12//usage: "[-r" IF_FEATURE_SETCONSOLE_LONG_OPTIONS("|--reset") "] [DEVICE]"
13//usage:#define setconsole_full_usage "\n\n"
14//usage: "Redirect system console output to DEVICE (default: /dev/tty)\n"
15//usage: "\nOptions:"
16//usage: "\n -r Reset output to /dev/console"
17
11#include "libbb.h" 18#include "libbb.h"
12 19
13int setconsole_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 20int setconsole_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
diff --git a/console-tools/setkeycodes.c b/console-tools/setkeycodes.c
index ca8cd21c2..a6a7c2374 100644
--- a/console-tools/setkeycodes.c
+++ b/console-tools/setkeycodes.c
@@ -8,6 +8,18 @@
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
12//usage:#define setkeycodes_trivial_usage
13//usage: "SCANCODE KEYCODE..."
14//usage:#define setkeycodes_full_usage "\n\n"
15//usage: "Set entries into the kernel's scancode-to-keycode map,\n"
16//usage: "allowing unusual keyboards to generate usable keycodes.\n\n"
17//usage: "SCANCODE may be either xx or e0xx (hexadecimal),\n"
18//usage: "and KEYCODE is given in decimal."
19//usage:
20//usage:#define setkeycodes_example_usage
21//usage: "$ setkeycodes e030 127\n"
22
11#include "libbb.h" 23#include "libbb.h"
12 24
13/* From <linux/kd.h> */ 25/* From <linux/kd.h> */
diff --git a/console-tools/setlogcons.c b/console-tools/setlogcons.c
index 52d2608aa..83a895407 100644
--- a/console-tools/setlogcons.c
+++ b/console-tools/setlogcons.c
@@ -9,6 +9,11 @@
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 11
12//usage:#define setlogcons_trivial_usage
13//usage: "N"
14//usage:#define setlogcons_full_usage "\n\n"
15//usage: "Redirect the kernel output to console N (0 for current)"
16
12#include "libbb.h" 17#include "libbb.h"
13 18
14int setlogcons_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 19int setlogcons_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
diff --git a/console-tools/showkey.c b/console-tools/showkey.c
index 06df68bfd..2c832c92c 100644
--- a/console-tools/showkey.c
+++ b/console-tools/showkey.c
@@ -7,6 +7,15 @@
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 9
10//usage:#define showkey_trivial_usage
11//usage: "[-a | -k | -s]"
12//usage:#define showkey_full_usage "\n\n"
13//usage: "Show keys pressed\n"
14//usage: "\nOptions:"
15//usage: "\n -a Display decimal/octal/hex values of the keys"
16//usage: "\n -k Display interpreted keycodes (default)"
17//usage: "\n -s Display raw scan-codes"
18
10#include "libbb.h" 19#include "libbb.h"
11#include <linux/kd.h> 20#include <linux/kd.h>
12 21