summaryrefslogtreecommitdiffhomepage
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)
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 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+
+//usage:#define chvt_trivial_usage
+//usage: "N"
+//usage:#define chvt_full_usage "\n\n"
+//usage: "Change the foreground virtual terminal to /dev/ttyN"
+
#include "libbb.h"
int 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 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+
+//usage:#define clear_trivial_usage
+//usage: ""
+//usage:#define clear_full_usage "\n\n"
+//usage: "Clear screen"
+
#include "libbb.h"
int 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 @@
/* no options, no getopt */
+//usage:#define deallocvt_trivial_usage
+//usage: "[N]"
+//usage:#define deallocvt_full_usage "\n\n"
+//usage: "Deallocate unused virtual terminal /dev/ttyN"
+
#include "libbb.h"
/* 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 @@
*/
/* no options, no getopt */
+//usage:#define dumpkmap_trivial_usage
+//usage: "> keymap"
+//usage:#define dumpkmap_full_usage "\n\n"
+//usage: "Print a binary keyboard translation table to stdout"
+//usage:
+//usage:#define dumpkmap_example_usage
+//usage: "$ dumpkmap > keymap\n"
+
#include "libbb.h"
/* 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 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//usage:#define fgconsole_trivial_usage
+//usage: ""
+//usage:#define fgconsole_full_usage "\n\n"
+//usage: "Get active console"
+
#include "libbb.h"
/* 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 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+
+//usage:#define kbd_mode_trivial_usage
+//usage: "[-a|k|s|u] [-C TTY]"
+//usage:#define kbd_mode_full_usage "\n\n"
+//usage: "Report or set the keyboard mode\n"
+//usage: "\nOptions:"
+//usage: "\n -a Default (ASCII)"
+//usage: "\n -k Medium-raw (keyboard)"
+//usage: "\n -s Raw (scancode)"
+//usage: "\n -u Unicode (utf-8)"
+//usage: "\n -C TTY Affect TTY instead of /dev/tty"
+
#include "libbb.h"
#include <linux/kd.h>
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 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
+
+//usage:#define loadfont_trivial_usage
+//usage: "< font"
+//usage:#define loadfont_full_usage "\n\n"
+//usage: "Load a console font from stdin"
+/* //usage: "\n -C TTY Affect TTY instead of /dev/tty" */
+//usage:
+//usage:#define loadfont_example_usage
+//usage: "$ loadfont < /etc/i18n/fontname\n"
+
#include "libbb.h"
#include <sys/kd.h>
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 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+
+//usage:#define loadkmap_trivial_usage
+//usage: "< keymap"
+//usage:#define loadkmap_full_usage "\n\n"
+//usage: "Load a binary keyboard translation table from stdin\n"
+/* //usage: "\n -C TTY Affect TTY instead of /dev/tty" */
+//usage:
+//usage:#define loadkmap_example_usage
+//usage: "$ loadkmap < /etc/i18n/lang-keymap\n"
+
#include "libbb.h"
#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 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//usage:#define openvt_trivial_usage
+//usage: "[-c N] [-sw] [PROG ARGS]"
+//usage:#define openvt_full_usage "\n\n"
+//usage: "Start PROG on a new virtual terminal\n"
+//usage: "\nOptions:"
+//usage: "\n -c N Use specified VT"
+//usage: "\n -s Switch to the VT"
+/* //usage: "\n -l Run PROG as login shell (by prepending '-')" */
+//usage: "\n -w Wait for PROG to exit"
+//usage:
+//usage:#define openvt_example_usage
+//usage: "openvt 2 /bin/ash\n"
+
#include <linux/vt.h>
#include "libbb.h"
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 @@
/* BTW, which "standard" package has this utility? It doesn't seem
* to be ncurses, coreutils, console-tools... then what? */
+//usage:#define reset_trivial_usage
+//usage: ""
+//usage:#define reset_full_usage "\n\n"
+//usage: "Reset the screen"
+
#include "libbb.h"
#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 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
/* no options, no getopt */
+
+//usage:#define resize_trivial_usage
+//usage: ""
+//usage:#define resize_full_usage "\n\n"
+//usage: "Resize the screen"
+
#include "libbb.h"
#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 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//usage:#define setconsole_trivial_usage
+//usage: "[-r" IF_FEATURE_SETCONSOLE_LONG_OPTIONS("|--reset") "] [DEVICE]"
+//usage:#define setconsole_full_usage "\n\n"
+//usage: "Redirect system console output to DEVICE (default: /dev/tty)\n"
+//usage: "\nOptions:"
+//usage: "\n -r Reset output to /dev/console"
+
#include "libbb.h"
int 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 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+
+//usage:#define setkeycodes_trivial_usage
+//usage: "SCANCODE KEYCODE..."
+//usage:#define setkeycodes_full_usage "\n\n"
+//usage: "Set entries into the kernel's scancode-to-keycode map,\n"
+//usage: "allowing unusual keyboards to generate usable keycodes.\n\n"
+//usage: "SCANCODE may be either xx or e0xx (hexadecimal),\n"
+//usage: "and KEYCODE is given in decimal."
+//usage:
+//usage:#define setkeycodes_example_usage
+//usage: "$ setkeycodes e030 127\n"
+
#include "libbb.h"
/* 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 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//usage:#define setlogcons_trivial_usage
+//usage: "N"
+//usage:#define setlogcons_full_usage "\n\n"
+//usage: "Redirect the kernel output to console N (0 for current)"
+
#include "libbb.h"
int 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 @@
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
+//usage:#define showkey_trivial_usage
+//usage: "[-a | -k | -s]"
+//usage:#define showkey_full_usage "\n\n"
+//usage: "Show keys pressed\n"
+//usage: "\nOptions:"
+//usage: "\n -a Display decimal/octal/hex values of the keys"
+//usage: "\n -k Display interpreted keycodes (default)"
+//usage: "\n -s Display raw scan-codes"
+
#include "libbb.h"
#include <linux/kd.h>