summaryrefslogtreecommitdiffhomepage
path: root/miscutils
diff options
context:
space:
mode:
authorPere Orga <gotrunks@gmail.com>2011-04-11 03:29:49 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2011-04-11 03:29:49 +0200
commit5bc8c005a8e15c43285bc595a8d404de67a482ac (patch)
tree98f2d35d1db26f4d8cba5f095ff63bf8e2e8d980 /miscutils
parent73ef15cf3894716c1393ed21dee6e6bb2cdbc90f (diff)
move remaining help text from include/usage.src.h
Signed-off-by: Pere Orga <gotrunks@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/adjtimex.c12
-rw-r--r--miscutils/bbconfig.c6
-rw-r--r--miscutils/beep.c11
-rw-r--r--miscutils/chat.c9
-rw-r--r--miscutils/chrt.c17
-rw-r--r--miscutils/crond.c13
-rw-r--r--miscutils/crontab.c10
-rw-r--r--miscutils/devfsd.c16
-rw-r--r--miscutils/devmem.c8
-rw-r--r--miscutils/eject.c11
-rw-r--r--miscutils/fbsplash.c13
-rw-r--r--miscutils/flash_eraseall.c8
-rw-r--r--miscutils/flash_lock_unlock.c12
-rw-r--r--miscutils/flashcp.c7
-rw-r--r--miscutils/hdparm.c52
-rw-r--r--miscutils/inotifyd.c27
-rw-r--r--miscutils/ionice.c8
-rw-r--r--miscutils/last.c11
-rw-r--r--miscutils/less.c12
-rw-r--r--miscutils/makedevs.c60
-rw-r--r--miscutils/man.c8
-rw-r--r--miscutils/microcom.c12
-rw-r--r--miscutils/mountpoint.c16
-rw-r--r--miscutils/mt.c12
-rw-r--r--miscutils/raidautorun.c8
-rw-r--r--miscutils/readahead.c5
-rw-r--r--miscutils/rfkill.c13
-rw-r--r--miscutils/runlevel.c13
-rw-r--r--miscutils/rx.c8
-rw-r--r--miscutils/setsid.c7
-rw-r--r--miscutils/strings.c10
-rw-r--r--miscutils/taskset.c18
-rw-r--r--miscutils/time.c7
-rw-r--r--miscutils/timeout.c6
-rw-r--r--miscutils/ttysize.c6
-rw-r--r--miscutils/volname.c6
-rw-r--r--miscutils/wall.c9
-rw-r--r--miscutils/watchdog.c11
38 files changed, 498 insertions, 0 deletions
diff --git a/miscutils/adjtimex.c b/miscutils/adjtimex.c
index 8e8ff8c0a..e1edbbebc 100644
--- a/miscutils/adjtimex.c
+++ b/miscutils/adjtimex.c
@@ -11,6 +11,18 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//usage:#define adjtimex_trivial_usage
+//usage: "[-q] [-o OFF] [-f FREQ] [-p TCONST] [-t TICK]"
+//usage:#define adjtimex_full_usage "\n\n"
+//usage: "Read and optionally set system timebase parameters. See adjtimex(2)\n"
+//usage: "\nOptions:"
+//usage: "\n -q Quiet"
+//usage: "\n -o OFF Time offset, microseconds"
+//usage: "\n -f FREQ Frequency adjust, integer kernel units (65536 is 1ppm)"
+//usage: "\n (positive values make clock run faster)"
+//usage: "\n -t TICK Microseconds per tick, usually 10000"
+//usage: "\n -p TCONST"
+
#include "libbb.h"
#include <sys/timex.h>
diff --git a/miscutils/bbconfig.c b/miscutils/bbconfig.c
index 7c30669a3..e8be81352 100644
--- a/miscutils/bbconfig.c
+++ b/miscutils/bbconfig.c
@@ -1,6 +1,12 @@
/* vi: set sw=4 ts=4: */
/* This file was released into the public domain by Paul Fox.
*/
+
+//usage:#define bbconfig_trivial_usage
+//usage: ""
+//usage:#define bbconfig_full_usage "\n\n"
+//usage: "Print the config file used by busybox build"
+
#include "libbb.h"
#include "bbconfigopts.h"
#if ENABLE_FEATURE_COMPRESS_BBCONFIG
diff --git a/miscutils/beep.c b/miscutils/beep.c
index 013a72543..c7699ffe1 100644
--- a/miscutils/beep.c
+++ b/miscutils/beep.c
@@ -7,6 +7,17 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*
*/
+
+//usage:#define beep_trivial_usage
+//usage: "-f FREQ -l LEN -d DELAY -r COUNT -n"
+//usage:#define beep_full_usage "\n\n"
+//usage: "Options:"
+//usage: "\n -f Frequency in Hz"
+//usage: "\n -l Length in ms"
+//usage: "\n -d Delay in ms"
+//usage: "\n -r Repetitions"
+//usage: "\n -n Start new tone"
+
#include "libbb.h"
#include <linux/kd.h>
diff --git a/miscutils/chat.c b/miscutils/chat.c
index d8370a963..ce994f870 100644
--- a/miscutils/chat.c
+++ b/miscutils/chat.c
@@ -7,6 +7,15 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
+
+//usage:#define chat_trivial_usage
+//usage: "EXPECT [SEND [EXPECT [SEND...]]]"
+//usage:#define chat_full_usage "\n\n"
+//usage: "Useful for interacting with a modem connected to stdin/stdout.\n"
+//usage: "A script consists of one or more \"expect-send\" pairs of strings,\n"
+//usage: "each pair is a pair of arguments. Example:\n"
+//usage: "chat '' ATZ OK ATD123456 CONNECT '' ogin: pppuser word: ppppass '~'"
+
#include "libbb.h"
// default timeout: 45 sec
diff --git a/miscutils/chrt.c b/miscutils/chrt.c
index 1c6737a3c..7e40b9f13 100644
--- a/miscutils/chrt.c
+++ b/miscutils/chrt.c
@@ -5,6 +5,23 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+
+//usage:#define chrt_trivial_usage
+//usage: "[-prfom] [PRIO] [PID | PROG ARGS]"
+//usage:#define chrt_full_usage "\n\n"
+//usage: "Change scheduling priority and class for a process\n"
+//usage: "\nOptions:"
+//usage: "\n -p Operate on PID"
+//usage: "\n -r Set SCHED_RR class"
+//usage: "\n -f Set SCHED_FIFO class"
+//usage: "\n -o Set SCHED_OTHER class"
+//usage: "\n -m Show min/max priorities"
+//usage:
+//usage:#define chrt_example_usage
+//usage: "$ chrt -r 4 sleep 900; x=$!\n"
+//usage: "$ chrt -f -p 3 $x\n"
+//usage: "You need CAP_SYS_NICE privileges to set scheduling attributes of a process"
+
#include <sched.h>
#include "libbb.h"
#ifndef _POSIX_PRIORITY_SCHEDULING
diff --git a/miscutils/crond.c b/miscutils/crond.c
index 5bf053609..014016fb6 100644
--- a/miscutils/crond.c
+++ b/miscutils/crond.c
@@ -11,6 +11,19 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//usage:#define crond_trivial_usage
+//usage: "-fbS -l N " IF_FEATURE_CROND_D("-d N ") "-L LOGFILE -c DIR"
+//usage:#define crond_full_usage "\n\n"
+//usage: " -f Foreground"
+//usage: "\n -b Background (default)"
+//usage: "\n -S Log to syslog (default)"
+//usage: "\n -l Set log level. 0 is the most verbose, default 8"
+//usage: IF_FEATURE_CROND_D(
+//usage: "\n -d Set log level, log to stderr"
+//usage: )
+//usage: "\n -L Log to file"
+//usage: "\n -c Working dir"
+
#include "libbb.h"
#include <syslog.h>
diff --git a/miscutils/crontab.c b/miscutils/crontab.c
index 16d7fdf69..4731d8da6 100644
--- a/miscutils/crontab.c
+++ b/miscutils/crontab.c
@@ -10,6 +10,16 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//usage:#define crontab_trivial_usage
+//usage: "[-c DIR] [-u USER] [-ler]|[FILE]"
+//usage:#define crontab_full_usage "\n\n"
+//usage: " -c Crontab directory"
+//usage: "\n -u User"
+//usage: "\n -l List crontab"
+//usage: "\n -e Edit crontab"
+//usage: "\n -r Delete crontab"
+//usage: "\n FILE Replace crontab by FILE ('-': stdin)"
+
#include "libbb.h"
#define CRONTABS CONFIG_FEATURE_CROND_DIR "/crontabs"
diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c
index 35e431951..706276015 100644
--- a/miscutils/devfsd.c
+++ b/miscutils/devfsd.c
@@ -53,6 +53,22 @@
The postal address is:
Richard Gooch, c/o ATNF, P. O. Box 76, Epping, N.S.W., 2121, Australia.
*/
+
+//usage:#define devfsd_trivial_usage
+//usage: "mntpnt [-v]" IF_DEVFSD_FG_NP("[-fg][-np]")
+//usage:#define devfsd_full_usage "\n\n"
+//usage: "Manage devfs permissions and old device name symlinks\n"
+//usage: "\nOptions:"
+//usage: "\n mntpnt The mount point where devfs is mounted"
+//usage: "\n -v Print the protocol version numbers for devfsd"
+//usage: "\n and the kernel-side protocol version and exit"
+//usage: IF_DEVFSD_FG_NP(
+//usage: "\n -fg Run in foreground"
+//usage: "\n -np Exit after parsing the configuration file"
+//usage: "\n and processing synthetic REGISTER events,"
+//usage: "\n don't poll for events"
+//usage: )
+
#include "libbb.h"
#include "xregex.h"
#include <syslog.h>
diff --git a/miscutils/devmem.c b/miscutils/devmem.c
index 7a9f533af..786a21bee 100644
--- a/miscutils/devmem.c
+++ b/miscutils/devmem.c
@@ -4,6 +4,14 @@
* Copyright (C) 2008, BusyBox Team. -solar 4/26/08
*/
+//usage:#define devmem_trivial_usage
+//usage: "ADDRESS [WIDTH [VALUE]]"
+//usage:#define devmem_full_usage "\n\n"
+//usage: "Read/write from physical address\n"
+//usage: "\n ADDRESS Address to act upon"
+//usage: "\n WIDTH Width (8/16/...)"
+//usage: "\n VALUE Data to be written"
+
#include "libbb.h"
int devmem_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
diff --git a/miscutils/eject.c b/miscutils/eject.c
index 63d20d3ad..184ccc5d7 100644
--- a/miscutils/eject.c
+++ b/miscutils/eject.c
@@ -13,6 +13,17 @@
* Most of the dirty work blatantly ripped off from cat.c =)
*/
+//usage:#define eject_trivial_usage
+//usage: "[-t] [-T] [DEVICE]"
+//usage:#define eject_full_usage "\n\n"
+//usage: "Eject DEVICE or default /dev/cdrom\n"
+//usage: "\nOptions:"
+//usage: IF_FEATURE_EJECT_SCSI(
+//usage: "\n -s SCSI device"
+//usage: )
+//usage: "\n -t Close tray"
+//usage: "\n -T Open/close tray (toggle)"
+
#include <sys/mount.h>
#include "libbb.h"
/* Must be after libbb.h: they need size_t */
diff --git a/miscutils/fbsplash.c b/miscutils/fbsplash.c
index 770e70026..c761a88ca 100644
--- a/miscutils/fbsplash.c
+++ b/miscutils/fbsplash.c
@@ -21,6 +21,19 @@
* "exit" (or just close fifo) - well you guessed it.
*/
+//usage:#define fbsplash_trivial_usage
+//usage: "-s IMGFILE [-c] [-d DEV] [-i INIFILE] [-f CMD]"
+//usage:#define fbsplash_full_usage "\n\n"
+//usage: "Options:"
+//usage: "\n -s Image"
+//usage: "\n -c Hide cursor"
+//usage: "\n -d Framebuffer device (default /dev/fb0)"
+//usage: "\n -i Config file (var=value):"
+//usage: "\n BAR_LEFT,BAR_TOP,BAR_WIDTH,BAR_HEIGHT"
+//usage: "\n BAR_R,BAR_G,BAR_B"
+//usage: "\n -f Control pipe (else exit after drawing image)"
+//usage: "\n commands: 'NN' (% for progress bar) or 'exit'"
+
#include "libbb.h"
#include <linux/fb.h>
diff --git a/miscutils/flash_eraseall.c b/miscutils/flash_eraseall.c
index 68596e11b..33803f87d 100644
--- a/miscutils/flash_eraseall.c
+++ b/miscutils/flash_eraseall.c
@@ -10,6 +10,14 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//usage:#define flash_eraseall_trivial_usage
+//usage: "[-jq] MTD_DEVICE"
+//usage:#define flash_eraseall_full_usage "\n\n"
+//usage: "Erase an MTD device\n"
+//usage: "\nOptions:"
+//usage: "\n -j Format the device for jffs2"
+//usage: "\n -q Don't display progress messages"
+
#include "libbb.h"
#include <mtd/mtd-user.h>
#include <linux/jffs2.h>
diff --git a/miscutils/flash_lock_unlock.c b/miscutils/flash_lock_unlock.c
index fcb836b07..1fefd95f9 100644
--- a/miscutils/flash_lock_unlock.c
+++ b/miscutils/flash_lock_unlock.c
@@ -3,6 +3,18 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
+
+//usage:#define flash_lock_trivial_usage
+//usage: "MTD_DEVICE OFFSET SECTORS"
+//usage:#define flash_lock_full_usage "\n\n"
+//usage: "Lock part or all of an MTD device. If SECTORS is -1, then all sectors\n"
+//usage: "will be locked, regardless of the value of OFFSET"
+//usage:
+//usage:#define flash_unlock_trivial_usage
+//usage: "MTD_DEVICE"
+//usage:#define flash_unlock_full_usage "\n\n"
+//usage: "Unlock an MTD device"
+
#include "libbb.h"
#include <mtd/mtd-user.h>
diff --git a/miscutils/flashcp.c b/miscutils/flashcp.c
index fe37c3913..e4bb3a902 100644
--- a/miscutils/flashcp.c
+++ b/miscutils/flashcp.c
@@ -7,6 +7,13 @@
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
+//usage:#define flashcp_trivial_usage
+//usage: "-v FILE MTD_DEVICE"
+//usage:#define flashcp_full_usage "\n\n"
+//usage: "Copy an image to MTD device\n"
+//usage: "\nOptions:"
+//usage: "\n -v Verbose"
+
#include "libbb.h"
#include <mtd/mtd-user.h>
diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c
index 38b265d60..7608408dd 100644
--- a/miscutils/hdparm.c
+++ b/miscutils/hdparm.c
@@ -11,6 +11,58 @@
* hdparm.c - Command line interface to get/set hard disk parameters
* - by Mark Lord (C) 1994-2002 -- freely distributable
*/
+
+//usage:#define hdparm_trivial_usage
+//usage: "[OPTIONS] [DEVICE]"
+//usage:#define hdparm_full_usage "\n\n"
+//usage: "Options:"
+//usage: "\n -a Get/set fs readahead"
+//usage: "\n -A Set drive read-lookahead flag (0/1)"
+//usage: "\n -b Get/set bus state (0 == off, 1 == on, 2 == tristate)"
+//usage: "\n -B Set Advanced Power Management setting (1-255)"
+//usage: "\n -c Get/set IDE 32-bit IO setting"
+//usage: "\n -C Check IDE power mode status"
+//usage: IF_FEATURE_HDPARM_HDIO_GETSET_DMA(
+//usage: "\n -d Get/set using_dma flag")
+//usage: "\n -D Enable/disable drive defect-mgmt"
+//usage: "\n -f Flush buffer cache for device on exit"
+//usage: "\n -g Display drive geometry"
+//usage: "\n -h Display terse usage information"
+//usage: IF_FEATURE_HDPARM_GET_IDENTITY(
+//usage: "\n -i Display drive identification")
+//usage: IF_FEATURE_HDPARM_GET_IDENTITY(
+//usage: "\n -I Detailed/current information directly from drive")
+//usage: "\n -k Get/set keep_settings_over_reset flag (0/1)"
+//usage: "\n -K Set drive keep_features_over_reset flag (0/1)"
+//usage: "\n -L Set drive doorlock (0/1) (removable harddisks only)"
+//usage: "\n -m Get/set multiple sector count"
+//usage: "\n -n Get/set ignore-write-errors flag (0/1)"
+//usage: "\n -p Set PIO mode on IDE interface chipset (0,1,2,3,4,...)"
+//usage: "\n -P Set drive prefetch count"
+/* //usage: "\n -q Change next setting quietly" - not supported ib bbox */
+//usage: "\n -Q Get/set DMA tagged-queuing depth (if supported)"
+//usage: "\n -r Get/set readonly flag (DANGEROUS to set)"
+//usage: IF_FEATURE_HDPARM_HDIO_SCAN_HWIF(
+//usage: "\n -R Register an IDE interface (DANGEROUS)")
+//usage: "\n -S Set standby (spindown) timeout"
+//usage: "\n -t Perform device read timings"
+//usage: "\n -T Perform cache read timings"
+//usage: "\n -u Get/set unmaskirq flag (0/1)"
+//usage: IF_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF(
+//usage: "\n -U Unregister an IDE interface (DANGEROUS)")
+//usage: "\n -v Defaults; same as -mcudkrag for IDE drives"
+//usage: "\n -V Display program version and exit immediately"
+//usage: IF_FEATURE_HDPARM_HDIO_DRIVE_RESET(
+//usage: "\n -w Perform device reset (DANGEROUS)")
+//usage: "\n -W Set drive write-caching flag (0/1) (DANGEROUS)"
+//usage: IF_FEATURE_HDPARM_HDIO_TRISTATE_HWIF(
+//usage: "\n -x Tristate device for hotswap (0/1) (DANGEROUS)")
+//usage: "\n -X Set IDE xfer mode (DANGEROUS)"
+//usage: "\n -y Put IDE drive in standby mode"
+//usage: "\n -Y Put IDE drive to sleep"
+//usage: "\n -Z Disable Seagate auto-powersaving mode"
+//usage: "\n -z Reread partition table"
+
#include "libbb.h"
/* must be _after_ libbb.h: */
#include <linux/hdreg.h>
diff --git a/miscutils/inotifyd.c b/miscutils/inotifyd.c
index fe429b636..b64e0abb9 100644
--- a/miscutils/inotifyd.c
+++ b/miscutils/inotifyd.c
@@ -27,6 +27,33 @@
* See below for mask names explanation.
*/
+//usage:#define inotifyd_trivial_usage
+//usage: "PROG FILE1[:MASK]..."
+//usage:#define inotifyd_full_usage "\n\n"
+//usage: "Run PROG on filesystem changes."
+//usage: "\nWhen a filesystem event matching MASK occurs on FILEn,"
+//usage: "\nPROG ACTUAL_EVENTS FILEn [SUBFILE] is run."
+//usage: "\nEvents:"
+//usage: "\n a File is accessed"
+//usage: "\n c File is modified"
+//usage: "\n e Metadata changed"
+//usage: "\n w Writable file is closed"
+//usage: "\n 0 Unwritable file is closed"
+//usage: "\n r File is opened"
+//usage: "\n D File is deleted"
+//usage: "\n M File is moved"
+//usage: "\n u Backing fs is unmounted"
+//usage: "\n o Event queue overflowed"
+//usage: "\n x File can't be watched anymore"
+//usage: "\nIf watching a directory:"
+//usage: "\n m Subfile is moved into dir"
+//usage: "\n y Subfile is moved out of dir"
+//usage: "\n n Subfile is created"
+//usage: "\n d Subfile is deleted"
+//usage: "\n"
+//usage: "\ninotifyd waits for PROG to exit."
+//usage: "\nWhen x event happens for all FILEs, inotifyd exits."
+
#include "libbb.h"
#include <sys/inotify.h>
diff --git a/miscutils/ionice.c b/miscutils/ionice.c
index 481a738ee..2bc83c5eb 100644
--- a/miscutils/ionice.c
+++ b/miscutils/ionice.c
@@ -7,6 +7,14 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//usage:#define ionice_trivial_usage
+//usage: "[-c 1-3] [-n 0-7] [-p PID] [PROG]"
+//usage:#define ionice_full_usage "\n\n"
+//usage: "Change I/O priority and class\n"
+//usage: "\nOptions:"
+//usage: "\n -c Class. 1:realtime 2:best-effort 3:idle"
+//usage: "\n -n Priority"
+
#include <sys/syscall.h>
#include <asm/unistd.h>
#include "libbb.h"
diff --git a/miscutils/last.c b/miscutils/last.c
index 12457b157..27f5a35ce 100644
--- a/miscutils/last.c
+++ b/miscutils/last.c
@@ -7,6 +7,17 @@
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
+//usage:#define last_trivial_usage
+//usage: ""IF_FEATURE_LAST_FANCY("[-HW] [-f FILE]")
+//usage:#define last_full_usage "\n\n"
+//usage: "Show listing of the last users that logged into the system"
+//usage: IF_FEATURE_LAST_FANCY( "\n"
+//usage: "\nOptions:"
+/* //usage: "\n -H Show header line" */
+//usage: "\n -W Display with no host column truncation"
+//usage: "\n -f FILE Read from FILE instead of /var/log/wtmp"
+//usage: )
+
#include "libbb.h"
/* NB: ut_name and ut_user are the same field, use only one name (ut_user)
diff --git a/miscutils/less.c b/miscutils/less.c
index 9e12c11a7..77fd5a8de 100644
--- a/miscutils/less.c
+++ b/miscutils/less.c
@@ -21,6 +21,18 @@
* redirected input has been read from stdin
*/
+//usage:#define less_trivial_usage
+//usage: "[-EMNmh~I?] [FILE]..."
+//usage:#define less_full_usage "\n\n"
+//usage: "View FILE (or stdin) one screenful at a time\n"
+//usage: "\nOptions:"
+//usage: "\n -E Quit once the end of a file is reached"
+//usage: "\n -M,-m Display status line with line numbers"
+//usage: "\n and percentage through the file"
+//usage: "\n -N Prefix line number to each line"
+//usage: "\n -I Ignore case in all searches"
+//usage: "\n -~ Suppress ~s displayed past the end of the file"
+
#include <sched.h> /* sched_yield() */
#include "libbb.h"
diff --git a/miscutils/makedevs.c b/miscutils/makedevs.c
index e74c47c35..8cca83882 100644
--- a/miscutils/makedevs.c
+++ b/miscutils/makedevs.c
@@ -7,6 +7,66 @@
* known bugs: can't deal with alpha ranges
*/
+//usage:#if ENABLE_FEATURE_MAKEDEVS_LEAF
+//usage:#define makedevs_trivial_usage
+//usage: "NAME TYPE MAJOR MINOR FIRST LAST [s]"
+//usage:#define makedevs_full_usage "\n\n"
+//usage: "Create a range of block or character special files"
+//usage: "\n"
+//usage: "\nTYPE is:"
+//usage: "\n b Block device"
+//usage: "\n c Character device"
+//usage: "\n f FIFO, MAJOR and MINOR are ignored"
+//usage: "\n"
+//usage: "\nFIRST..LAST specify numbers appended to NAME."
+//usage: "\nIf 's' is the last argument, the base device is created as well."
+//usage: "\n"
+//usage: "\nExamples:"
+//usage: "\n makedevs /dev/ttyS c 4 66 2 63 -> ttyS2-ttyS63"
+//usage: "\n makedevs /dev/hda b 3 0 0 8 s -> hda,hda1-hda8"
+//usage:
+//usage:#define makedevs_example_usage
+//usage: "# makedevs /dev/ttyS c 4 66 2 63\n"
+//usage: "[creates ttyS2-ttyS63]\n"
+//usage: "# makedevs /dev/hda b 3 0 0 8 s\n"
+//usage: "[creates hda,hda1-hda8]\n"
+//usage:#endif
+//usage:
+//usage:#if ENABLE_FEATURE_MAKEDEVS_TABLE
+//usage:#define makedevs_trivial_usage
+//usage: "[-d device_table] rootdir"
+//usage:#define makedevs_full_usage "\n\n"
+//usage: "Create a range of special files as specified in a device table.\n"
+//usage: "Device table entries take the form of:\n"
+//usage: "<type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count>\n"
+//usage: "Where name is the file name, type can be one of:\n"
+//usage: " f Regular file\n"
+//usage: " d Directory\n"
+//usage: " c Character device\n"
+//usage: " b Block device\n"
+//usage: " p Fifo (named pipe)\n"
+//usage: "uid is the user id for the target file, gid is the group id for the\n"
+//usage: "target file. The rest of the entries (major, minor, etc) apply to\n"
+//usage: "to device special files. A '-' may be used for blank entries."
+//usage:
+//usage:#define makedevs_example_usage
+//usage: "For example:\n"
+//usage: "<name> <type> <mode><uid><gid><major><minor><start><inc><count>\n"
+//usage: "/dev d 755 0 0 - - - - -\n"
+//usage: "/dev/console c 666 0 0 5 1 - - -\n"
+//usage: "/dev/null c 666 0 0 1 3 0 0 -\n"
+//usage: "/dev/zero c 666 0 0 1 5 0 0 -\n"
+//usage: "/dev/hda b 640 0 0 3 0 0 0 -\n"
+//usage: "/dev/hda b 640 0 0 3 1 1 1 15\n\n"
+//usage: "Will Produce:\n"
+//usage: "/dev\n"
+//usage: "/dev/console\n"
+//usage: "/dev/null\n"
+//usage: "/dev/zero\n"
+//usage: "/dev/hda\n"
+//usage: "/dev/hda[0-15]\n"
+//usage:#endif
+
#include "libbb.h"
#if ENABLE_FEATURE_MAKEDEVS_LEAF
diff --git a/miscutils/man.c b/miscutils/man.c
index b356e726f..2c6b25ceb 100644
--- a/miscutils/man.c
+++ b/miscutils/man.c
@@ -3,6 +3,14 @@
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
+//usage:#define man_trivial_usage
+//usage: "[-aw] [MANPAGE]..."
+//usage:#define man_full_usage "\n\n"
+//usage: "Format and display manual page\n"
+//usage: "\nOptions:"
+//usage: "\n -a Display all pages"
+//usage: "\n -w Show page locations"
+
#include "libbb.h"
enum {
diff --git a/miscutils/microcom.c b/miscutils/microcom.c
index 3acbe3023..edaeb6fa5 100644
--- a/miscutils/microcom.c
+++ b/miscutils/microcom.c
@@ -7,6 +7,18 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
+
+//usage:#define microcom_trivial_usage
+//usage: "[-d DELAY] [-t TIMEOUT] [-s SPEED] [-X] TTY"
+//usage:#define microcom_full_usage "\n\n"
+//usage: "Copy bytes for stdin to TTY and from TTY to stdout\n"
+//usage: "\nOptions:"
+//usage: "\n -d Wait up to DELAY ms for TTY output before sending every"
+//usage: "\n next byte to it"
+//usage: "\n -t Exit if both stdin and TTY are silent for TIMEOUT ms"
+//usage: "\n -s Set serial line to SPEED"
+//usage: "\n -X Disable special meaning of NUL and Ctrl-X from stdin"
+
#include "libbb.h"
// set raw tty mode
diff --git a/miscutils/mountpoint.c b/miscutils/mountpoint.c
index 784c3cbfc..a1a5b396a 100644
--- a/miscutils/mountpoint.c
+++ b/miscutils/mountpoint.c
@@ -9,6 +9,22 @@
* Based on sysvinit's mountpoint
*/
+//usage:#define mountpoint_trivial_usage
+//usage: "[-q] <[-dn] DIR | -x DEVICE>"
+//usage:#define mountpoint_full_usage "\n\n"
+//usage: "Check if the directory is a mountpoint\n"
+//usage: "\nOptions:"
+//usage: "\n -q Quiet"
+//usage: "\n -d Print major/minor device number of the filesystem"
+//usage: "\n -n Print device name of the filesystem"
+//usage: "\n -x Print major/minor device number of the blockdevice"
+//usage:
+//usage:#define mountpoint_example_usage
+//usage: "$ mountpoint /proc\n"
+//usage: "/proc is not a mountpoint\n"
+//usage: "$ mountpoint /sys\n"
+//usage: "/sys is a mountpoint\n"
+
#include "libbb.h"
int mountpoint_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
diff --git a/miscutils/mt.c b/miscutils/mt.c
index 142901bb0..20afd3a50 100644
--- a/miscutils/mt.c
+++ b/miscutils/mt.c
@@ -3,6 +3,18 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//usage:#define mt_trivial_usage
+//usage: "[-f device] opcode value"
+//usage:#define mt_full_usage "\n\n"
+//usage: "Control magnetic tape drive operation\n"
+//usage: "\n"
+//usage: "Available Opcodes:\n"
+//usage: "\n"
+//usage: "bsf bsfm bsr bss datacompression drvbuffer eof eom erase\n"
+//usage: "fsf fsfm fsr fss load lock mkpart nop offline ras1 ras2\n"
+//usage: "ras3 reset retension rewind rewoffline seek setblk setdensity\n"
+//usage: "setpart tell unload unlock weof wset"
+
#include "libbb.h"
#include <sys/mtio.h>
diff --git a/miscutils/raidautorun.c b/miscutils/raidautorun.c
index bbfa8577c..b72d89058 100644
--- a/miscutils/raidautorun.c
+++ b/miscutils/raidautorun.c
@@ -8,6 +8,14 @@
*
*/
+//usage:#define raidautorun_trivial_usage
+//usage: "DEVICE"
+//usage:#define raidautorun_full_usage "\n\n"
+//usage: "Tell the kernel to automatically search and start RAID arrays"
+//usage:
+//usage:#define raidautorun_example_usage
+//usage: "$ raidautorun /dev/md0"
+
#include "libbb.h"
#include <linux/major.h>
diff --git a/miscutils/readahead.c b/miscutils/readahead.c
index dd6de7c45..e22aaa468 100644
--- a/miscutils/readahead.c
+++ b/miscutils/readahead.c
@@ -10,6 +10,11 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//usage:#define readahead_trivial_usage
+//usage: "[FILE]..."
+//usage:#define readahead_full_usage "\n\n"
+//usage: "Preload FILEs to RAM"
+
#include "libbb.h"
int readahead_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
diff --git a/miscutils/rfkill.c b/miscutils/rfkill.c
index b150b2cae..467197371 100644
--- a/miscutils/rfkill.c
+++ b/miscutils/rfkill.c
@@ -6,6 +6,19 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+
+//usage:#define rfkill_trivial_usage
+//usage: "COMMAND [INDEX|TYPE]"
+//usage:#define rfkill_full_usage "\n\n"
+//usage: "Enable/disable wireless devices\n"
+//usage: "\nCommands:"
+//usage: "\n list [INDEX|TYPE] List current state"
+//usage: "\n block INDEX|TYPE Disable device"
+//usage: "\n unblock INDEX|TYPE Enable device"
+//usage: "\n"
+//usage: "\n TYPE: all, wlan(wifi), bluetooth, uwb(ultrawideband),"
+//usage: "\n wimax, wwan, gps, fm"
+
#include "libbb.h"
#include <linux/rfkill.h>
diff --git a/miscutils/runlevel.c b/miscutils/runlevel.c
index 7024361e7..9d38b791f 100644
--- a/miscutils/runlevel.c
+++ b/miscutils/runlevel.c
@@ -11,6 +11,19 @@
*
* initially busyboxified by Bernhard Reutner-Fischer
*/
+
+//usage:#define runlevel_trivial_usage
+//usage: "[FILE]"
+//usage:#define runlevel_full_usage "\n\n"
+//usage: "Find the current and previous system runlevel\n"
+//usage: "\n"
+//usage: "If no utmp FILE exists or if no runlevel record can be found,\n"
+//usage: "print \"unknown\""
+//usage:
+//usage:#define runlevel_example_usage
+//usage: "$ runlevel /var/run/utmp\n"
+//usage: "N 2"
+
#include "libbb.h"
int runlevel_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
diff --git a/miscutils/rx.c b/miscutils/rx.c
index de785d53c..e1225779e 100644
--- a/miscutils/rx.c
+++ b/miscutils/rx.c
@@ -15,6 +15,14 @@
* This was originally written for blob and then adapted for busybox.
*/
+//usage:#define rx_trivial_usage
+//usage: "FILE"
+//usage:#define rx_full_usage "\n\n"
+//usage: "Receive a file using the xmodem protocol"
+//usage:
+//usage:#define rx_example_usage
+//usage: "$ rx /tmp/foo\n"
+
#include "libbb.h"
#define SOH 0x01
diff --git a/miscutils/setsid.c b/miscutils/setsid.c
index c573fae34..ad2c8a4de 100644
--- a/miscutils/setsid.c
+++ b/miscutils/setsid.c
@@ -14,6 +14,13 @@
* - busyboxed
*/
+//usage:#define setsid_trivial_usage
+//usage: "PROG ARGS"
+//usage:#define setsid_full_usage "\n\n"
+//usage: "Run PROG in a new session. PROG will have no controlling terminal\n"
+//usage: "and will not be affected by keyboard signals (Ctrl-C etc).\n"
+//usage: "See setsid(2) for details."
+
#include "libbb.h"
int setsid_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
diff --git a/miscutils/strings.c b/miscutils/strings.c
index 7ab0e227c..6e8b9aefc 100644
--- a/miscutils/strings.c
+++ b/miscutils/strings.c
@@ -7,6 +7,16 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//usage:#define strings_trivial_usage
+//usage: "[-afo] [-n LEN] [FILE]..."
+//usage:#define strings_full_usage "\n\n"
+//usage: "Display printable strings in a binary file\n"
+//usage: "\nOptions:"
+//usage: "\n -a Scan whole file (default)"
+//usage: "\n -f Precede strings with filenames"
+//usage: "\n -n LEN At least LEN characters form a string (default 4)"
+//usage: "\n -o Precede strings with decimal offsets"
+
#include "libbb.h"
#define WHOLE_FILE 1
diff --git a/miscutils/taskset.c b/miscutils/taskset.c
index 389ef43e4..77fc8643d 100644
--- a/miscutils/taskset.c
+++ b/miscutils/taskset.c
@@ -6,6 +6,24 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//usage:#define taskset_trivial_usage
+//usage: "[-p] [MASK] [PID | PROG ARGS]"
+//usage:#define taskset_full_usage "\n\n"
+//usage: "Set or get CPU affinity\n"
+//usage: "\nOptions:"
+//usage: "\n -p Operate on an existing PID"
+//usage:
+//usage:#define taskset_example_usage
+//usage: "$ taskset 0x7 ./dgemm_test&\n"
+//usage: "$ taskset -p 0x1 $!\n"
+//usage: "pid 4790's current affinity mask: 7\n"
+//usage: "pid 4790's new affinity mask: 1\n"
+//usage: "$ taskset 0x7 /bin/sh -c './taskset -p 0x1 $$'\n"
+//usage: "pid 6671's current affinity mask: 1\n"
+//usage: "pid 6671's new affinity mask: 1\n"
+//usage: "$ taskset -p 1\n"
+//usage: "pid 1's current affinity mask: 3\n"
+
#include <sched.h>
#include "libbb.h"
diff --git a/miscutils/time.c b/miscutils/time.c
index 6b1c3c42c..dcd89f8fc 100644
--- a/miscutils/time.c
+++ b/miscutils/time.c
@@ -9,6 +9,13 @@
Heavily modified for busybox by Erik Andersen <andersen@codepoet.org>
*/
+//usage:#define time_trivial_usage
+//usage: "[-v] PROG ARGS"
+//usage:#define time_full_usage "\n\n"
+//usage: "Run PROG, display resource usage when it exits\n"
+//usage: "\nOptions:"
+//usage: "\n -v Verbose"
+
#include "libbb.h"
/* Information on the resources used by a child process. */
diff --git a/miscutils/timeout.c b/miscutils/timeout.c
index 841669416..9d56593ba 100644
--- a/miscutils/timeout.c
+++ b/miscutils/timeout.c
@@ -28,6 +28,12 @@
* rewrite 14-11-2008 vda
*/
+//usage:#define timeout_trivial_usage
+//usage: "[-t SECS] [-s SIG] PROG ARGS"
+//usage:#define timeout_full_usage "\n\n"
+//usage: "Runs PROG. Sends SIG to it if it is not gone in SECS seconds.\n"
+//usage: "Defaults: SECS: 10, SIG: TERM."
+
#include "libbb.h"
int timeout_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
diff --git a/miscutils/ttysize.c b/miscutils/ttysize.c
index f93a506a2..d2d48d0a9 100644
--- a/miscutils/ttysize.c
+++ b/miscutils/ttysize.c
@@ -9,6 +9,12 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
+
+//usage:#define ttysize_trivial_usage
+//usage: "[w] [h]"
+//usage:#define ttysize_full_usage "\n\n"
+//usage: "Print dimension(s) of stdin's terminal, on error return 80x25"
+
#include "libbb.h"
int ttysize_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
diff --git a/miscutils/volname.c b/miscutils/volname.c
index 6e8615617..b50e79573 100644
--- a/miscutils/volname.c
+++ b/miscutils/volname.c
@@ -27,6 +27,12 @@
* mods from distributed source (eject-2.0.13) are by
* Matthew Stoltenberg <d3matt@gmail.com>
*/
+
+//usage:#define volname_trivial_usage
+//usage: "[DEVICE]"
+//usage:#define volname_full_usage "\n\n"
+//usage: "Show CD volume name of the DEVICE (default /dev/cdrom)"
+
#include "libbb.h"
int volname_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
diff --git a/miscutils/wall.c b/miscutils/wall.c
index 0a2b89e5e..762f53b72 100644
--- a/miscutils/wall.c
+++ b/miscutils/wall.c
@@ -6,6 +6,15 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//usage:#define wall_trivial_usage
+//usage: "[FILE]"
+//usage:#define wall_full_usage "\n\n"
+//usage: "Write content of FILE or stdin to all logged-in users"
+//usage:
+//usage:#define wall_sample_usage
+//usage: "echo foo | wall\n"
+//usage: "wall ./mymessage"
+
#include "libbb.h"
int wall_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
diff --git a/miscutils/watchdog.c b/miscutils/watchdog.c
index 630782660..b24dd4b82 100644
--- a/miscutils/watchdog.c
+++ b/miscutils/watchdog.c
@@ -9,6 +9,17 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//usage:#define watchdog_trivial_usage
+//usage: "[-t N[ms]] [-T N[ms]] [-F] DEV"
+//usage:#define watchdog_full_usage "\n\n"
+//usage: "Periodically write to watchdog device DEV\n"
+//usage: "\nOptions:"
+//usage: "\n -T N Reboot after N seconds if not reset (default 60)"
+//usage: "\n -t N Reset every N seconds (default 30)"
+//usage: "\n -F Run in foreground"
+//usage: "\n"
+//usage: "\nUse 500ms to specify period in milliseconds"
+
#include "libbb.h"
#include "linux/types.h" /* for __u32 */
#include "linux/watchdog.h"