From fb4da167114e96d7f20ef97474f976f8ffa604e7 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 22 Nov 2016 23:14:24 +0100 Subject: [PATCH] Split miscutils/Config.src items into miscutils/*.c files Signed-off-by: Denys Vlasenko --- miscutils/Config.src | 524 ---------------------------------- miscutils/adjtimex.c | 7 + miscutils/bbconfig.c | 20 ++ miscutils/beep.c | 22 ++ miscutils/chat.c | 66 +++++ miscutils/chrt.c | 6 + miscutils/conspy.c | 9 +- miscutils/crontab.c | 8 + miscutils/dc.c | 22 +- miscutils/devfsd.c | 56 ++++ miscutils/devmem.c | 6 + miscutils/eject.c | 14 + miscutils/fbsplash.c | 21 ++ miscutils/flash_eraseall.c | 6 + miscutils/flash_lock_unlock.c | 13 + miscutils/flashcp.c | 6 + miscutils/hdparm.c | 58 ++++ miscutils/inotifyd.c | 6 + miscutils/ionice.c | 7 + miscutils/last.c | 14 + miscutils/makedevs.c | 31 ++ miscutils/man.c | 5 + miscutils/microcom.c | 5 + miscutils/mountpoint.c | 5 + miscutils/mt.c | 7 + miscutils/raidautorun.c | 7 + miscutils/readahead.c | 17 ++ miscutils/runlevel.c | 9 + miscutils/rx.c | 6 + miscutils/setsid.c | 5 + miscutils/strings.c | 6 + miscutils/time.c | 7 + miscutils/timeout.c | 6 + miscutils/ttysize.c | 8 + miscutils/volname.c | 5 + miscutils/watchdog.c | 11 + 36 files changed, 498 insertions(+), 533 deletions(-) diff --git a/miscutils/Config.src b/miscutils/Config.src index 06f1c52ba..7325fb8fa 100644 --- a/miscutils/Config.src +++ b/miscutils/Config.src @@ -7,528 +7,4 @@ menu "Miscellaneous Utilities" INSERT -config ADJTIMEX - bool "adjtimex" - default y - select PLATFORM_LINUX - help - Adjtimex reads and optionally sets adjustment parameters for - the Linux clock adjustment algorithm. - -config BBCONFIG - bool "bbconfig" - default n - help - The bbconfig applet will print the config file with which - busybox was built. - -config FEATURE_COMPRESS_BBCONFIG - bool "Compress bbconfig data" - default y - depends on BBCONFIG - help - Store bbconfig data in compressed form, uncompress them on-the-fly - before output. - - If you have a really tiny busybox with few applets enabled (and - bunzip2 isn't one of them), the overhead of the decompressor might - be noticeable. Also, if you run executables directly from ROM - and have very little memory, this might not be a win. Otherwise, - you probably want this. - -config BEEP - bool "beep" - default y - select PLATFORM_LINUX - help - The beep applets beeps in a given freq/Hz. - -config FEATURE_BEEP_FREQ - int "default frequency" - range 0 2147483647 - default 4000 - depends on BEEP - help - Frequency for default beep. - -config FEATURE_BEEP_LENGTH_MS - int "default length" - range 0 2147483647 - default 30 - depends on BEEP - help - Length in ms for default beep. - -config CHAT - bool "chat" - default y - help - Simple chat utility. - -config FEATURE_CHAT_NOFAIL - bool "Enable NOFAIL expect strings" - depends on CHAT - default y - help - When enabled expect strings which are started with a dash trigger - no-fail mode. That is when expectation is not met within timeout - the script is not terminated but sends next SEND string and waits - for next EXPECT string. This allows to compose far more flexible - scripts. - -config FEATURE_CHAT_TTY_HIFI - bool "Force STDIN to be a TTY" - depends on CHAT - default n - help - Original chat always treats STDIN as a TTY device and sets for it - so-called raw mode. This option turns on such behaviour. - -config FEATURE_CHAT_IMPLICIT_CR - bool "Enable implicit Carriage Return" - depends on CHAT - default y - help - When enabled make chat to terminate all SEND strings with a "\r" - unless "\c" is met anywhere in the string. - -config FEATURE_CHAT_SWALLOW_OPTS - bool "Swallow options" - depends on CHAT - default y - help - Busybox chat require no options. To make it not fail when used - in place of original chat (which has a bunch of options) turn - this on. - -config FEATURE_CHAT_SEND_ESCAPES - bool "Support weird SEND escapes" - depends on CHAT - default y - help - Original chat uses some escape sequences in SEND arguments which - are not sent to device but rather performs special actions. - E.g. "\K" means to send a break sequence to device. - "\d" delays execution for a second, "\p" -- for a 1/100 of second. - Before turning this option on think twice: do you really need them? - -config FEATURE_CHAT_VAR_ABORT_LEN - bool "Support variable-length ABORT conditions" - depends on CHAT - default y - help - Original chat uses fixed 50-bytes length ABORT conditions. Say N here. - -config FEATURE_CHAT_CLR_ABORT - bool "Support revoking of ABORT conditions" - depends on CHAT - default y - help - Support CLR_ABORT directive. - -config CHRT - bool "chrt" - default y - help - manipulate real-time attributes of a process. - This requires sched_{g,s}etparam support in your libc. - -config CRONTAB - bool "crontab" - default y - help - Crontab manipulates the crontab for a particular user. Only - the superuser may specify a different user and/or crontab directory. - Note that Busybox binary must be setuid root for this applet to - work properly. - -config DC - bool "dc" - default y - help - Dc is a reverse-polish desk calculator which supports unlimited - precision arithmetic. - -config FEATURE_DC_LIBM - bool "Enable power and exp functions (requires libm)" - default y - depends on DC - help - Enable power and exp functions. - NOTE: This will require libm to be present for linking. - -config DEVFSD - bool "devfsd (obsolete)" - default n - select PLATFORM_LINUX - select FEATURE_SYSLOG - help - This is deprecated and should NOT be used anymore. - Use linux >= 2.6 (optionally with hotplug) and mdev instead! - See docs/mdev.txt for detailed instructions on how to use mdev - instead. - - Provides compatibility with old device names on a devfs systems. - You should set it to true if you have devfs enabled. - The following keywords in devsfd.conf are supported: - "CLEAR_CONFIG", "INCLUDE", "OPTIONAL_INCLUDE", "RESTORE", - "PERMISSIONS", "EXECUTE", "COPY", "IGNORE", - "MKOLDCOMPAT", "MKNEWCOMPAT","RMOLDCOMPAT", "RMNEWCOMPAT". - - But only if they are written UPPERCASE!!!!!!!! - -config DEVFSD_MODLOAD - bool "Adds support for MODLOAD keyword in devsfd.conf" - default y - depends on DEVFSD - help - This actually doesn't work with busybox modutils but needs - the external modutils. - -config DEVFSD_FG_NP - bool "Enables the -fg and -np options" - default y - depends on DEVFSD - help - -fg Run the daemon in the foreground. - -np Exit after parsing the configuration file. - Do not poll for events. - -config DEVFSD_VERBOSE - bool "Increases logging (and size)" - default y - depends on DEVFSD - help - Increases logging to stderr or syslog. - -config FEATURE_DEVFS - bool "Use devfs names for all devices (obsolete)" - default n - select PLATFORM_LINUX - help - This is obsolete and should NOT be used anymore. - Use linux >= 2.6 (optionally with hotplug) and mdev instead! - - For legacy systems -- if there is no way around devfsd -- this - tells busybox to look for names like /dev/loop/0 instead of - /dev/loop0. If your /dev directory has normal names instead of - devfs names, you don't want this. - -config DEVMEM - bool "devmem" - default y - help - devmem is a small program that reads and writes from physical - memory using /dev/mem. - -config EJECT - bool "eject" - default y - select PLATFORM_LINUX - help - Used to eject cdroms. (defaults to /dev/cdrom) - -config FEATURE_EJECT_SCSI - bool "SCSI support" - default y - depends on EJECT - help - Add the -s option to eject, this allows to eject SCSI-Devices and - usb-storage devices. - -config FBSPLASH - bool "fbsplash" - default y - select PLATFORM_LINUX - help - Shows splash image and progress bar on framebuffer device. - Can be used during boot phase of an embedded device. ~2kb. - Usage: - - use kernel option 'vga=xxx' or otherwise enable fb device. - - put somewhere fbsplash.cfg file and an image in .ppm format. - - $ setsid fbsplash [params] & - -c: hide cursor - -d /dev/fbN: framebuffer device (if not /dev/fb0) - -s path_to_image_file (can be "-" for stdin) - -i path_to_cfg_file (can be "-" for stdin) - -f path_to_fifo (can be "-" for stdin) - - if you want to run it only in presence of kernel parameter: - grep -q "fbsplash=on" = 2.6.13 - -config INOTIFYD - bool "inotifyd" - default n # doesn't build on Knoppix 5 - help - Simple inotify daemon. Reports filesystem changes. Requires - kernel >= 2.6.13 - -config LAST - bool "last" - default y - depends on FEATURE_WTMP - help - 'last' displays a list of the last users that logged into the system. - -config FEATURE_LAST_FANCY - bool "Turn on output of extra information" - default y - depends on LAST - help - 'last' displays detailed information about the last users that - logged into the system (mimics sysvinit last). +900 bytes. - -config HDPARM - bool "hdparm" - default y - select PLATFORM_LINUX - help - Get/Set hard drive parameters. Primarily intended for ATA - drives. Adds about 13k (or around 30k if you enable the - FEATURE_HDPARM_GET_IDENTITY option).... - -config FEATURE_HDPARM_GET_IDENTITY - bool "Support obtaining detailed information directly from drives" - default y - depends on HDPARM - help - Enables the -I and -i options to obtain detailed information - directly from drives about their capabilities and supported ATA - feature set. If no device name is specified, hdparm will read - identify data from stdin. Enabling this option will add about 16k... - -config FEATURE_HDPARM_HDIO_SCAN_HWIF - bool "Register an IDE interface (DANGEROUS)" - default y - depends on HDPARM - help - Enables the 'hdparm -R' option to register an IDE interface. - This is dangerous stuff, so you should probably say N. - -config FEATURE_HDPARM_HDIO_UNREGISTER_HWIF - bool "Un-register an IDE interface (DANGEROUS)" - default y - depends on HDPARM - help - Enables the 'hdparm -U' option to un-register an IDE interface. - This is dangerous stuff, so you should probably say N. - -config FEATURE_HDPARM_HDIO_DRIVE_RESET - bool "Perform device reset (DANGEROUS)" - default y - depends on HDPARM - help - Enables the 'hdparm -w' option to perform a device reset. - This is dangerous stuff, so you should probably say N. - -config FEATURE_HDPARM_HDIO_TRISTATE_HWIF - bool "Tristate device for hotswap (DANGEROUS)" - default y - depends on HDPARM - help - Enables the 'hdparm -x' option to tristate device for hotswap, - and the '-b' option to get/set bus state. This is dangerous - stuff, so you should probably say N. - -config FEATURE_HDPARM_HDIO_GETSET_DMA - bool "Get/set using_dma flag" - default y - depends on HDPARM - help - Enables the 'hdparm -d' option to get/set using_dma flag. - -config MAKEDEVS - bool "makedevs" - default y - help - 'makedevs' is a utility used to create a batch of devices with - one command. - - There are two choices for command line behaviour, the interface - as used by LEAF/Linux Router Project, or a device table file. - - 'leaf' is traditionally what busybox follows, it allows multiple - devices of a particluar type to be created per command. - e.g. /dev/hda[0-9] - Device properties are passed as command line arguments. - - 'table' reads device properties from a file or stdin, allowing - a batch of unrelated devices to be made with one command. - User/group names are allowed as an alternative to uid/gid. - -choice - prompt "Choose makedevs behaviour" - depends on MAKEDEVS - default FEATURE_MAKEDEVS_TABLE - -config FEATURE_MAKEDEVS_LEAF - bool "leaf" - -config FEATURE_MAKEDEVS_TABLE - bool "table" - -endchoice - -config MAN - bool "man" - default y - help - Format and display manual pages. - -config MICROCOM - bool "microcom" - default y - help - The poor man's minicom utility for chatting with serial port devices. - -config MOUNTPOINT - bool "mountpoint" - default y - help - mountpoint checks if the directory is a mountpoint. - -config MT - bool "mt" - default y - help - mt is used to control tape devices. You can use the mt utility - to advance or rewind a tape past a specified number of archive - files on the tape. - -config RAIDAUTORUN - bool "raidautorun" - default y - select PLATFORM_LINUX - help - raidautorun tells the kernel md driver to - search and start RAID arrays. - -config READAHEAD - bool "readahead" - default y - depends on LFS - select PLATFORM_LINUX - help - Preload the files listed on the command line into RAM cache so that - subsequent reads on these files will not block on disk I/O. - - This applet just calls the readahead(2) system call on each file. - It is mainly useful in system startup scripts to preload files - or executables before they are used. When used at the right time - (in particular when a CPU bound process is running) it can - significantly speed up system startup. - - As readahead(2) blocks until each file has been read, it is best to - run this applet as a background job. - -config RUNLEVEL - bool "runlevel" - default y - depends on FEATURE_UTMP - help - find the current and previous system runlevel. - - This applet uses utmp but does not rely on busybox supporing - utmp on purpose. It is used by e.g. emdebian via /etc/init.d/rc. - -config RX - bool "rx" - default y - select PLATFORM_LINUX - help - Receive files using the Xmodem protocol. - -config SETSID - bool "setsid" - default y - help - setsid runs a program in a new session - -config STRINGS - bool "strings" - default y - help - strings prints the printable character sequences for each file - specified. - -config TIME - bool "time" - default y - help - The time command runs the specified program with the given arguments. - When the command finishes, time writes a message to standard output - giving timing statistics about this program run. - -config TIMEOUT - bool "timeout" - default y - help - Runs a program and watches it. If it does not terminate in - specified number of seconds, it is sent a signal. - -config TTYSIZE - bool "ttysize" - default y - help - A replacement for "stty size". Unlike stty, can report only width, - only height, or both, in any order. It also does not complain on - error, but returns default 80x24. - Usage in shell scripts: width=`ttysize w`. - -config VOLNAME - bool "volname" - default y - help - Prints a CD-ROM volume name. - -config WATCHDOG - bool "watchdog" - default y - select PLATFORM_LINUX - help - The watchdog utility is used with hardware or software watchdog - device drivers. It opens the specified watchdog device special file - and periodically writes a magic character to the device. If the - watchdog applet ever fails to write the magic character within a - certain amount of time, the watchdog device assumes the system has - hung, and will cause the hardware to reboot. - endmenu diff --git a/miscutils/adjtimex.c b/miscutils/adjtimex.c index 058aa9a5c..f9d7c949d 100644 --- a/miscutils/adjtimex.c +++ b/miscutils/adjtimex.c @@ -10,6 +10,13 @@ * * Licensed under GPLv2 or later, see file LICENSE in this source tree. */ +//config:config ADJTIMEX +//config: bool "adjtimex" +//config: default y +//config: select PLATFORM_LINUX +//config: help +//config: Adjtimex reads and optionally sets adjustment parameters for +//config: the Linux clock adjustment algorithm. //usage:#define adjtimex_trivial_usage //usage: "[-q] [-o OFF] [-f FREQ] [-p TCONST] [-t TICK]" diff --git a/miscutils/bbconfig.c b/miscutils/bbconfig.c index e5f4eb379..8a709f9d3 100644 --- a/miscutils/bbconfig.c +++ b/miscutils/bbconfig.c @@ -1,6 +1,26 @@ /* vi: set sw=4 ts=4: */ /* This file was released into the public domain by Paul Fox. */ +//config:config BBCONFIG +//config: bool "bbconfig" +//config: default n +//config: help +//config: The bbconfig applet will print the config file with which +//config: busybox was built. +//config: +//config:config FEATURE_COMPRESS_BBCONFIG +//config: bool "Compress bbconfig data" +//config: default y +//config: depends on BBCONFIG +//config: help +//config: Store bbconfig data in compressed form, uncompress them on-the-fly +//config: before output. +//config: +//config: If you have a really tiny busybox with few applets enabled (and +//config: bunzip2 isn't one of them), the overhead of the decompressor might +//config: be noticeable. Also, if you run executables directly from ROM +//config: and have very little memory, this might not be a win. Otherwise, +//config: you probably want this. //usage:#define bbconfig_trivial_usage //usage: "" diff --git a/miscutils/beep.c b/miscutils/beep.c index 18b160cc4..f6fa8348d 100644 --- a/miscutils/beep.c +++ b/miscutils/beep.c @@ -7,6 +7,28 @@ * Licensed under GPLv2 or later, see file LICENSE in this source tree. * */ +//config:config BEEP +//config: bool "beep" +//config: default y +//config: select PLATFORM_LINUX +//config: help +//config: The beep applets beeps in a given freq/Hz. +//config: +//config:config FEATURE_BEEP_FREQ +//config: int "default frequency" +//config: range 0 2147483647 +//config: default 4000 +//config: depends on BEEP +//config: help +//config: Frequency for default beep. +//config: +//config:config FEATURE_BEEP_LENGTH_MS +//config: int "default length" +//config: range 0 2147483647 +//config: default 30 +//config: depends on BEEP +//config: help +//config: Length in ms for default beep. //usage:#define beep_trivial_usage //usage: "-f FREQ -l LEN -d DELAY -r COUNT -n" diff --git a/miscutils/chat.c b/miscutils/chat.c index 6b429f2a6..92a23441c 100644 --- a/miscutils/chat.c +++ b/miscutils/chat.c @@ -7,6 +7,72 @@ * * Licensed under GPLv2, see file LICENSE in this source tree. */ +//config:config CHAT +//config: bool "chat" +//config: default y +//config: help +//config: Simple chat utility. +//config: +//config:config FEATURE_CHAT_NOFAIL +//config: bool "Enable NOFAIL expect strings" +//config: depends on CHAT +//config: default y +//config: help +//config: When enabled expect strings which are started with a dash trigger +//config: no-fail mode. That is when expectation is not met within timeout +//config: the script is not terminated but sends next SEND string and waits +//config: for next EXPECT string. This allows to compose far more flexible +//config: scripts. +//config: +//config:config FEATURE_CHAT_TTY_HIFI +//config: bool "Force STDIN to be a TTY" +//config: depends on CHAT +//config: default n +//config: help +//config: Original chat always treats STDIN as a TTY device and sets for it +//config: so-called raw mode. This option turns on such behaviour. +//config: +//config:config FEATURE_CHAT_IMPLICIT_CR +//config: bool "Enable implicit Carriage Return" +//config: depends on CHAT +//config: default y +//config: help +//config: When enabled make chat to terminate all SEND strings with a "\r" +//config: unless "\c" is met anywhere in the string. +//config: +//config:config FEATURE_CHAT_SWALLOW_OPTS +//config: bool "Swallow options" +//config: depends on CHAT +//config: default y +//config: help +//config: Busybox chat require no options. To make it not fail when used +//config: in place of original chat (which has a bunch of options) turn +//config: this on. +//config: +//config:config FEATURE_CHAT_SEND_ESCAPES +//config: bool "Support weird SEND escapes" +//config: depends on CHAT +//config: default y +//config: help +//config: Original chat uses some escape sequences in SEND arguments which +//config: are not sent to device but rather performs special actions. +//config: E.g. "\K" means to send a break sequence to device. +//config: "\d" delays execution for a second, "\p" -- for a 1/100 of second. +//config: Before turning this option on think twice: do you really need them? +//config: +//config:config FEATURE_CHAT_VAR_ABORT_LEN +//config: bool "Support variable-length ABORT conditions" +//config: depends on CHAT +//config: default y +//config: help +//config: Original chat uses fixed 50-bytes length ABORT conditions. Say N here. +//config: +//config:config FEATURE_CHAT_CLR_ABORT +//config: bool "Support revoking of ABORT conditions" +//config: depends on CHAT +//config: default y +//config: help +//config: Support CLR_ABORT directive. //usage:#define chat_trivial_usage //usage: "EXPECT [SEND [EXPECT [SEND...]]]" diff --git a/miscutils/chrt.c b/miscutils/chrt.c index f2f559fd7..d76c0d152 100644 --- a/miscutils/chrt.c +++ b/miscutils/chrt.c @@ -5,6 +5,12 @@ * * Licensed under GPLv2 or later, see file LICENSE in this source tree. */ +//config:config CHRT +//config: bool "chrt" +//config: default y +//config: help +//config: manipulate real-time attributes of a process. +//config: This requires sched_{g,s}etparam support in your libc. //usage:#define chrt_trivial_usage //usage: "[-prfom] [PRIO] [PID | PROG ARGS]" diff --git a/miscutils/conspy.c b/miscutils/conspy.c index e80158e39..d9d09d482 100644 --- a/miscutils/conspy.c +++ b/miscutils/conspy.c @@ -9,11 +9,6 @@ * * Licensed under GPLv2 or later, see file LICENSE in this source tree. */ - -//applet:IF_CONSPY(APPLET(conspy, BB_DIR_BIN, BB_SUID_DROP)) - -//kbuild:lib-$(CONFIG_CONSPY) += conspy.o - //config:config CONSPY //config: bool "conspy" //config: default y @@ -24,6 +19,10 @@ //config: or conspy -nd NUM screenshot of console num //config: or conspy -cs NUM poor man's GNU screen like +//applet:IF_CONSPY(APPLET(conspy, BB_DIR_BIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_CONSPY) += conspy.o + //usage:#define conspy_trivial_usage //usage: "[-vcsndfFQ] [-x COL] [-y LINE] [CONSOLE_NO]" //usage:#define conspy_full_usage "\n\n" diff --git a/miscutils/crontab.c b/miscutils/crontab.c index 85c6623b2..bcd2eab33 100644 --- a/miscutils/crontab.c +++ b/miscutils/crontab.c @@ -9,6 +9,14 @@ * * Licensed under GPLv2 or later, see file LICENSE in this source tree. */ +//config:config CRONTAB +//config: bool "crontab" +//config: default y +//config: help +//config: Crontab manipulates the crontab for a particular user. Only +//config: the superuser may specify a different user and/or crontab directory. +//config: Note that Busybox binary must be setuid root for this applet to +//config: work properly. //usage:#define crontab_trivial_usage //usage: "[-c DIR] [-u USER] [-ler]|[FILE]" diff --git a/miscutils/dc.c b/miscutils/dc.c index 4d92bc3d0..2b77cd614 100644 --- a/miscutils/dc.c +++ b/miscutils/dc.c @@ -2,10 +2,20 @@ /* * Licensed under GPLv2 or later, see file LICENSE in this source tree. */ - -#include "libbb.h" -#include "common_bufsiz.h" -#include +//config:config DC +//config: bool "dc" +//config: default y +//config: help +//config: Dc is a reverse-polish desk calculator which supports unlimited +//config: precision arithmetic. +//config: +//config:config FEATURE_DC_LIBM +//config: bool "Enable power and exp functions (requires libm)" +//config: default y +//config: depends on DC +//config: help +//config: Enable power and exp functions. +//config: NOTE: This will require libm to be present for linking. //usage:#define dc_trivial_usage //usage: "EXPRESSION..." @@ -30,6 +40,10 @@ //usage: "$ echo 72 9 div 8 mul p | dc\n" //usage: "64\n" +#include "libbb.h" +#include "common_bufsiz.h" +#include + #if 0 typedef unsigned data_t; #define DATA_FMT "" diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c index 6217918da..361f3666f 100644 --- a/miscutils/devfsd.c +++ b/miscutils/devfsd.c @@ -53,6 +53,62 @@ The postal address is: Richard Gooch, c/o ATNF, P. O. Box 76, Epping, N.S.W., 2121, Australia. */ +//config:config DEVFSD +//config: bool "devfsd (obsolete)" +//config: default n +//config: select PLATFORM_LINUX +//config: select FEATURE_SYSLOG +//config: help +//config: This is deprecated and should NOT be used anymore. +//config: Use linux >= 2.6 (optionally with hotplug) and mdev instead! +//config: See docs/mdev.txt for detailed instructions on how to use mdev +//config: instead. +//config: +//config: Provides compatibility with old device names on a devfs systems. +//config: You should set it to true if you have devfs enabled. +//config: The following keywords in devsfd.conf are supported: +//config: "CLEAR_CONFIG", "INCLUDE", "OPTIONAL_INCLUDE", "RESTORE", +//config: "PERMISSIONS", "EXECUTE", "COPY", "IGNORE", +//config: "MKOLDCOMPAT", "MKNEWCOMPAT","RMOLDCOMPAT", "RMNEWCOMPAT". +//config: +//config: But only if they are written UPPERCASE!!!!!!!! +//config: +//config:config DEVFSD_MODLOAD +//config: bool "Adds support for MODLOAD keyword in devsfd.conf" +//config: default y +//config: depends on DEVFSD +//config: help +//config: This actually doesn't work with busybox modutils but needs +//config: the external modutils. +//config: +//config:config DEVFSD_FG_NP +//config: bool "Enables the -fg and -np options" +//config: default y +//config: depends on DEVFSD +//config: help +//config: -fg Run the daemon in the foreground. +//config: -np Exit after parsing the configuration file. +//config: Do not poll for events. +//config: +//config:config DEVFSD_VERBOSE +//config: bool "Increases logging (and size)" +//config: default y +//config: depends on DEVFSD +//config: help +//config: Increases logging to stderr or syslog. +//config: +//config:config FEATURE_DEVFS +//config: bool "Use devfs names for all devices (obsolete)" +//config: default n +//config: select PLATFORM_LINUX +//config: help +//config: This is obsolete and should NOT be used anymore. +//config: Use linux >= 2.6 (optionally with hotplug) and mdev instead! +//config: +//config: For legacy systems -- if there is no way around devfsd -- this +//config: tells busybox to look for names like /dev/loop/0 instead of +//config: /dev/loop0. If your /dev directory has normal names instead of +//config: devfs names, you don't want this. //usage:#define devfsd_trivial_usage //usage: "mntpnt [-v]" IF_DEVFSD_FG_NP("[-fg][-np]") diff --git a/miscutils/devmem.c b/miscutils/devmem.c index 786a21bee..dd6574e93 100644 --- a/miscutils/devmem.c +++ b/miscutils/devmem.c @@ -3,6 +3,12 @@ * Copyright (C) 2000, Jan-Derk Bakker (J.D.Bakker@its.tudelft.nl) * Copyright (C) 2008, BusyBox Team. -solar 4/26/08 */ +//config:config DEVMEM +//config: bool "devmem" +//config: default y +//config: help +//config: devmem is a small program that reads and writes from physical +//config: memory using /dev/mem. //usage:#define devmem_trivial_usage //usage: "ADDRESS [WIDTH [VALUE]]" diff --git a/miscutils/eject.c b/miscutils/eject.c index 16ae250ff..d271066ad 100644 --- a/miscutils/eject.c +++ b/miscutils/eject.c @@ -12,6 +12,20 @@ * This is a simple hack of eject based on something Erik posted in #uclibc. * Most of the dirty work blatantly ripped off from cat.c =) */ +//config:config EJECT +//config: bool "eject" +//config: default y +//config: select PLATFORM_LINUX +//config: help +//config: Used to eject cdroms. (defaults to /dev/cdrom) +//config: +//config:config FEATURE_EJECT_SCSI +//config: bool "SCSI support" +//config: default y +//config: depends on EJECT +//config: help +//config: Add the -s option to eject, this allows to eject SCSI-Devices and +//config: usb-storage devices. //usage:#define eject_trivial_usage //usage: "[-t] [-T] [DEVICE]" diff --git a/miscutils/fbsplash.c b/miscutils/fbsplash.c index 3ddf8a242..93fd9412b 100644 --- a/miscutils/fbsplash.c +++ b/miscutils/fbsplash.c @@ -20,6 +20,27 @@ * "NN" (ASCII decimal number) - percentage to show on progress bar. * "exit" (or just close fifo) - well you guessed it. */ +//config:config FBSPLASH +//config: bool "fbsplash" +//config: default y +//config: select PLATFORM_LINUX +//config: help +//config: Shows splash image and progress bar on framebuffer device. +//config: Can be used during boot phase of an embedded device. ~2kb. +//config: Usage: +//config: - use kernel option 'vga=xxx' or otherwise enable fb device. +//config: - put somewhere fbsplash.cfg file and an image in .ppm format. +//config: - $ setsid fbsplash [params] & +//config: -c: hide cursor +//config: -d /dev/fbN: framebuffer device (if not /dev/fb0) +//config: -s path_to_image_file (can be "-" for stdin) +//config: -i path_to_cfg_file (can be "-" for stdin) +//config: -f path_to_fifo (can be "-" for stdin) +//config: - if you want to run it only in presence of kernel parameter: +//config: grep -q "fbsplash=on" = 2.6.13 //usage:#define inotifyd_trivial_usage //usage: "PROG FILE1[:MASK]..." diff --git a/miscutils/ionice.c b/miscutils/ionice.c index 5fcb653a8..1e1a5861c 100644 --- a/miscutils/ionice.c +++ b/miscutils/ionice.c @@ -6,6 +6,13 @@ * * Licensed under GPLv2 or later, see file LICENSE in this source tree. */ +//config:config IONICE +//config: bool "ionice" +//config: default y +//config: select PLATFORM_LINUX +//config: help +//config: Set/set program io scheduling class and priority +//config: Requires kernel >= 2.6.13 //usage:#define ionice_trivial_usage //usage: "[-c 1-3] [-n 0-7] [-p PID] [PROG]" diff --git a/miscutils/last.c b/miscutils/last.c index f8f34371a..2b7060c53 100644 --- a/miscutils/last.c +++ b/miscutils/last.c @@ -6,6 +6,20 @@ * * Licensed under GPLv2, see file LICENSE in this source tree. */ +//config:config LAST +//config: bool "last" +//config: default y +//config: depends on FEATURE_WTMP +//config: help +//config: 'last' displays a list of the last users that logged into the system. +//config: +//config:config FEATURE_LAST_FANCY +//config: bool "Turn on output of extra information" +//config: default y +//config: depends on LAST +//config: help +//config: 'last' displays detailed information about the last users that +//config: logged into the system (mimics sysvinit last). +900 bytes. //usage:#define last_trivial_usage //usage: ""IF_FEATURE_LAST_FANCY("[-HW] [-f FILE]") diff --git a/miscutils/makedevs.c b/miscutils/makedevs.c index c945a1352..cbdb0e3a1 100644 --- a/miscutils/makedevs.c +++ b/miscutils/makedevs.c @@ -6,6 +6,37 @@ * Make ranges of device files quickly. * known bugs: can't deal with alpha ranges */ +//config:config MAKEDEVS +//config: bool "makedevs" +//config: default y +//config: help +//config: 'makedevs' is a utility used to create a batch of devices with +//config: one command. +//config: +//config: There are two choices for command line behaviour, the interface +//config: as used by LEAF/Linux Router Project, or a device table file. +//config: +//config: 'leaf' is traditionally what busybox follows, it allows multiple +//config: devices of a particluar type to be created per command. +//config: e.g. /dev/hda[0-9] +//config: Device properties are passed as command line arguments. +//config: +//config: 'table' reads device properties from a file or stdin, allowing +//config: a batch of unrelated devices to be made with one command. +//config: User/group names are allowed as an alternative to uid/gid. +//config: +//config:choice +//config: prompt "Choose makedevs behaviour" +//config: depends on MAKEDEVS +//config: default FEATURE_MAKEDEVS_TABLE +//config: +//config:config FEATURE_MAKEDEVS_LEAF +//config: bool "leaf" +//config: +//config:config FEATURE_MAKEDEVS_TABLE +//config: bool "table" +//config: +//config:endchoice //usage:#if ENABLE_FEATURE_MAKEDEVS_LEAF //usage:#define makedevs_trivial_usage diff --git a/miscutils/man.c b/miscutils/man.c index 932f0b794..cded6ebee 100644 --- a/miscutils/man.c +++ b/miscutils/man.c @@ -2,6 +2,11 @@ * Copyright (C) 2008 Denys Vlasenko * Licensed under GPLv2, see file LICENSE in this source tree. */ +//config:config MAN +//config: bool "man" +//config: default y +//config: help +//config: Format and display manual pages. //usage:#define man_trivial_usage //usage: "[-aw] [MANPAGE]..." diff --git a/miscutils/microcom.c b/miscutils/microcom.c index dfc9771d8..c6ba476db 100644 --- a/miscutils/microcom.c +++ b/miscutils/microcom.c @@ -7,6 +7,11 @@ * * Licensed under GPLv2, see file LICENSE in this source tree. */ +//config:config MICROCOM +//config: bool "microcom" +//config: default y +//config: help +//config: The poor man's minicom utility for chatting with serial port devices. //usage:#define microcom_trivial_usage //usage: "[-d DELAY] [-t TIMEOUT] [-s SPEED] [-X] TTY" diff --git a/miscutils/mountpoint.c b/miscutils/mountpoint.c index 7041f7c59..12af2ca9a 100644 --- a/miscutils/mountpoint.c +++ b/miscutils/mountpoint.c @@ -8,6 +8,11 @@ * * Based on sysvinit's mountpoint */ +//config:config MOUNTPOINT +//config: bool "mountpoint" +//config: default y +//config: help +//config: mountpoint checks if the directory is a mountpoint. //usage:#define mountpoint_trivial_usage //usage: "[-q] <[-dn] DIR | -x DEVICE>" diff --git a/miscutils/mt.c b/miscutils/mt.c index 20afd3a50..75a09b662 100644 --- a/miscutils/mt.c +++ b/miscutils/mt.c @@ -2,6 +2,13 @@ /* * Licensed under GPLv2 or later, see file LICENSE in this source tree. */ +//config:config MT +//config: bool "mt" +//config: default y +//config: help +//config: mt is used to control tape devices. You can use the mt utility +//config: to advance or rewind a tape past a specified number of archive +//config: files on the tape. //usage:#define mt_trivial_usage //usage: "[-f device] opcode value" diff --git a/miscutils/raidautorun.c b/miscutils/raidautorun.c index b72d89058..578b2cf52 100644 --- a/miscutils/raidautorun.c +++ b/miscutils/raidautorun.c @@ -7,6 +7,13 @@ * Licensed under GPLv2 or later, see file LICENSE in this source tree. * */ +//config:config RAIDAUTORUN +//config: bool "raidautorun" +//config: default y +//config: select PLATFORM_LINUX +//config: help +//config: raidautorun tells the kernel md driver to +//config: search and start RAID arrays. //usage:#define raidautorun_trivial_usage //usage: "DEVICE" diff --git a/miscutils/readahead.c b/miscutils/readahead.c index e22aaa468..0b502f88c 100644 --- a/miscutils/readahead.c +++ b/miscutils/readahead.c @@ -9,6 +9,23 @@ * * Licensed under GPLv2 or later, see file LICENSE in this source tree. */ +//config:config READAHEAD +//config: bool "readahead" +//config: default y +//config: depends on LFS +//config: select PLATFORM_LINUX +//config: help +//config: Preload the files listed on the command line into RAM cache so that +//config: subsequent reads on these files will not block on disk I/O. +//config: +//config: This applet just calls the readahead(2) system call on each file. +//config: It is mainly useful in system startup scripts to preload files +//config: or executables before they are used. When used at the right time +//config: (in particular when a CPU bound process is running) it can +//config: significantly speed up system startup. +//config: +//config: As readahead(2) blocks until each file has been read, it is best to +//config: run this applet as a background job. //usage:#define readahead_trivial_usage //usage: "[FILE]..." diff --git a/miscutils/runlevel.c b/miscutils/runlevel.c index 8558db862..7c07a72e2 100644 --- a/miscutils/runlevel.c +++ b/miscutils/runlevel.c @@ -11,6 +11,15 @@ * * initially busyboxified by Bernhard Reutner-Fischer */ +//config:config RUNLEVEL +//config: bool "runlevel" +//config: default y +//config: depends on FEATURE_UTMP +//config: help +//config: find the current and previous system runlevel. +//config: +//config: This applet uses utmp but does not rely on busybox supporing +//config: utmp on purpose. It is used by e.g. emdebian via /etc/init.d/rc. //usage:#define runlevel_trivial_usage //usage: "[FILE]" diff --git a/miscutils/rx.c b/miscutils/rx.c index 1dffb593a..359ad5046 100644 --- a/miscutils/rx.c +++ b/miscutils/rx.c @@ -14,6 +14,12 @@ * * This was originally written for blob and then adapted for busybox. */ +//config:config RX +//config: bool "rx" +//config: default y +//config: select PLATFORM_LINUX +//config: help +//config: Receive files using the Xmodem protocol. //usage:#define rx_trivial_usage //usage: "FILE" diff --git a/miscutils/setsid.c b/miscutils/setsid.c index 9bddc2fcf..f0ec04a0b 100644 --- a/miscutils/setsid.c +++ b/miscutils/setsid.c @@ -13,6 +13,11 @@ * 2004-11-12 Paul Fox * - busyboxed */ +//config:config SETSID +//config: bool "setsid" +//config: default y +//config: help +//config: setsid runs a program in a new session //usage:#define setsid_trivial_usage //usage: "[-c] PROG ARGS" diff --git a/miscutils/strings.c b/miscutils/strings.c index ee6649625..d0e637987 100644 --- a/miscutils/strings.c +++ b/miscutils/strings.c @@ -6,6 +6,12 @@ * * Licensed under GPLv2 or later, see file LICENSE in this source tree. */ +//config:config STRINGS +//config: bool "strings" +//config: default y +//config: help +//config: strings prints the printable character sequences for each file +//config: specified. //usage:#define strings_trivial_usage //usage: "[-fo] [-t o/d/x] [-n LEN] [FILE]..." diff --git a/miscutils/time.c b/miscutils/time.c index 19b0b44c9..90d2ab67c 100644 --- a/miscutils/time.c +++ b/miscutils/time.c @@ -8,6 +8,13 @@ Heavily modified by David MacKenzie . Heavily modified for busybox by Erik Andersen */ +//config:config TIME +//config: bool "time" +//config: default y +//config: help +//config: The time command runs the specified program with the given arguments. +//config: When the command finishes, time writes a message to standard output +//config: giving timing statistics about this program run. //usage:#define time_trivial_usage //usage: "[-v] PROG ARGS" diff --git a/miscutils/timeout.c b/miscutils/timeout.c index 8df9ff0fd..4d598ead2 100644 --- a/miscutils/timeout.c +++ b/miscutils/timeout.c @@ -27,6 +27,12 @@ * splitszf 12-05-2006 by Roberto A. Foglietta * rewrite 14-11-2008 vda */ +//config:config TIMEOUT +//config: bool "timeout" +//config: default y +//config: help +//config: Runs a program and watches it. If it does not terminate in +//config: specified number of seconds, it is sent a signal. //usage:#define timeout_trivial_usage //usage: "[-t SECS] [-s SIG] PROG ARGS" diff --git a/miscutils/ttysize.c b/miscutils/ttysize.c index d2d48d0a9..a63b731d2 100644 --- a/miscutils/ttysize.c +++ b/miscutils/ttysize.c @@ -9,6 +9,14 @@ * * Licensed under GPLv2, see file LICENSE in this source tree. */ +//config:config TTYSIZE +//config: bool "ttysize" +//config: default y +//config: help +//config: A replacement for "stty size". Unlike stty, can report only width, +//config: only height, or both, in any order. It also does not complain on +//config: error, but returns default 80x24. +//config: Usage in shell scripts: width=`ttysize w`. //usage:#define ttysize_trivial_usage //usage: "[w] [h]" diff --git a/miscutils/volname.c b/miscutils/volname.c index b50e79573..855f2206a 100644 --- a/miscutils/volname.c +++ b/miscutils/volname.c @@ -27,6 +27,11 @@ * mods from distributed source (eject-2.0.13) are by * Matthew Stoltenberg */ +//config:config VOLNAME +//config: bool "volname" +//config: default y +//config: help +//config: Prints a CD-ROM volume name. //usage:#define volname_trivial_usage //usage: "[DEVICE]" diff --git a/miscutils/watchdog.c b/miscutils/watchdog.c index d3a76edf0..7a743ef1b 100644 --- a/miscutils/watchdog.c +++ b/miscutils/watchdog.c @@ -8,6 +8,17 @@ * * Licensed under GPLv2 or later, see file LICENSE in this source tree. */ +//config:config WATCHDOG +//config: bool "watchdog" +//config: default y +//config: select PLATFORM_LINUX +//config: help +//config: The watchdog utility is used with hardware or software watchdog +//config: device drivers. It opens the specified watchdog device special file +//config: and periodically writes a magic character to the device. If the +//config: watchdog applet ever fails to write the magic character within a +//config: certain amount of time, the watchdog device assumes the system has +//config: hung, and will cause the hardware to reboot. //usage:#define watchdog_trivial_usage //usage: "[-t N[ms]] [-T N[ms]] [-F] DEV" -- 2.25.1