diff options
Diffstat (limited to 'miscutils')
36 files changed, 147 insertions, 40 deletions
diff --git a/miscutils/Kbuild.src b/miscutils/Kbuild.src index 503f54904..60848ffc1 100644 --- a/miscutils/Kbuild.src +++ b/miscutils/Kbuild.src | |||
@@ -7,45 +7,5 @@ | |||
7 | lib-y:= | 7 | lib-y:= |
8 | 8 | ||
9 | INSERT | 9 | INSERT |
10 | lib-$(CONFIG_ADJTIMEX) += adjtimex.o | ||
11 | lib-$(CONFIG_BBCONFIG) += bbconfig.o | ||
12 | lib-$(CONFIG_BEEP) += beep.o | ||
13 | lib-$(CONFIG_CHAT) += chat.o | ||
14 | lib-$(CONFIG_CHRT) += chrt.o | ||
15 | lib-$(CONFIG_CRONTAB) += crontab.o | ||
16 | lib-$(CONFIG_DC) += dc.o | ||
17 | lib-$(CONFIG_DEVFSD) += devfsd.o | ||
18 | lib-$(CONFIG_DEVMEM) += devmem.o | ||
19 | lib-$(CONFIG_EJECT) += eject.o | ||
20 | lib-$(CONFIG_FBSPLASH) += fbsplash.o | ||
21 | lib-$(CONFIG_FLASHCP) += flashcp.o | ||
22 | lib-$(CONFIG_FLASH_ERASEALL) += flash_eraseall.o | ||
23 | lib-$(CONFIG_FLASH_LOCK) += flash_lock_unlock.o | ||
24 | lib-$(CONFIG_FLASH_UNLOCK) += flash_lock_unlock.o | ||
25 | lib-$(CONFIG_IONICE) += ionice.o | ||
26 | lib-$(CONFIG_HDPARM) += hdparm.o | ||
27 | lib-$(CONFIG_INOTIFYD) += inotifyd.o | ||
28 | 10 | ||
29 | ifeq ($(CONFIG_FEATURE_LAST_FANCY),y) | ||
30 | lib-$(CONFIG_FEATURE_LAST_FANCY) += last_fancy.o | ||
31 | else | ||
32 | lib-$(CONFIG_LAST) += last.o | ||
33 | endif | ||
34 | 11 | ||
35 | lib-$(CONFIG_LESS) += less.o | ||
36 | lib-$(CONFIG_MAKEDEVS) += makedevs.o | ||
37 | lib-$(CONFIG_MAN) += man.o | ||
38 | lib-$(CONFIG_MICROCOM) += microcom.o | ||
39 | lib-$(CONFIG_MOUNTPOINT) += mountpoint.o | ||
40 | lib-$(CONFIG_MT) += mt.o | ||
41 | lib-$(CONFIG_RAIDAUTORUN) += raidautorun.o | ||
42 | lib-$(CONFIG_READAHEAD) += readahead.o | ||
43 | lib-$(CONFIG_RUNLEVEL) += runlevel.o | ||
44 | lib-$(CONFIG_RX) += rx.o | ||
45 | lib-$(CONFIG_SETSID) += setsid.o | ||
46 | lib-$(CONFIG_STRINGS) += strings.o | ||
47 | lib-$(CONFIG_TIME) += time.o | ||
48 | lib-$(CONFIG_TIMEOUT) += timeout.o | ||
49 | lib-$(CONFIG_TTYSIZE) += ttysize.o | ||
50 | lib-$(CONFIG_VOLNAME) += volname.o | ||
51 | lib-$(CONFIG_WATCHDOG) += watchdog.o | ||
diff --git a/miscutils/adjtimex.c b/miscutils/adjtimex.c index f9d7c949d..6355cc1ef 100644 --- a/miscutils/adjtimex.c +++ b/miscutils/adjtimex.c | |||
@@ -18,6 +18,10 @@ | |||
18 | //config: Adjtimex reads and optionally sets adjustment parameters for | 18 | //config: Adjtimex reads and optionally sets adjustment parameters for |
19 | //config: the Linux clock adjustment algorithm. | 19 | //config: the Linux clock adjustment algorithm. |
20 | 20 | ||
21 | //applet:IF_ADJTIMEX(APPLET(adjtimex, BB_DIR_SBIN, BB_SUID_DROP)) | ||
22 | |||
23 | //kbuild:lib-$(CONFIG_ADJTIMEX) += adjtimex.o | ||
24 | |||
21 | //usage:#define adjtimex_trivial_usage | 25 | //usage:#define adjtimex_trivial_usage |
22 | //usage: "[-q] [-o OFF] [-f FREQ] [-p TCONST] [-t TICK]" | 26 | //usage: "[-q] [-o OFF] [-f FREQ] [-p TCONST] [-t TICK]" |
23 | //usage:#define adjtimex_full_usage "\n\n" | 27 | //usage:#define adjtimex_full_usage "\n\n" |
diff --git a/miscutils/bbconfig.c b/miscutils/bbconfig.c index 8a709f9d3..4781a4276 100644 --- a/miscutils/bbconfig.c +++ b/miscutils/bbconfig.c | |||
@@ -22,6 +22,10 @@ | |||
22 | //config: and have very little memory, this might not be a win. Otherwise, | 22 | //config: and have very little memory, this might not be a win. Otherwise, |
23 | //config: you probably want this. | 23 | //config: you probably want this. |
24 | 24 | ||
25 | //applet:IF_BBCONFIG(APPLET(bbconfig, BB_DIR_BIN, BB_SUID_DROP)) | ||
26 | |||
27 | //kbuild:lib-$(CONFIG_BBCONFIG) += bbconfig.o | ||
28 | |||
25 | //usage:#define bbconfig_trivial_usage | 29 | //usage:#define bbconfig_trivial_usage |
26 | //usage: "" | 30 | //usage: "" |
27 | //usage:#define bbconfig_full_usage "\n\n" | 31 | //usage:#define bbconfig_full_usage "\n\n" |
diff --git a/miscutils/beep.c b/miscutils/beep.c index f6fa8348d..14802b543 100644 --- a/miscutils/beep.c +++ b/miscutils/beep.c | |||
@@ -30,6 +30,10 @@ | |||
30 | //config: help | 30 | //config: help |
31 | //config: Length in ms for default beep. | 31 | //config: Length in ms for default beep. |
32 | 32 | ||
33 | //applet:IF_BEEP(APPLET(beep, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
34 | |||
35 | //kbuild:lib-$(CONFIG_BEEP) += beep.o | ||
36 | |||
33 | //usage:#define beep_trivial_usage | 37 | //usage:#define beep_trivial_usage |
34 | //usage: "-f FREQ -l LEN -d DELAY -r COUNT -n" | 38 | //usage: "-f FREQ -l LEN -d DELAY -r COUNT -n" |
35 | //usage:#define beep_full_usage "\n\n" | 39 | //usage:#define beep_full_usage "\n\n" |
diff --git a/miscutils/chat.c b/miscutils/chat.c index 92a23441c..dc85f82fb 100644 --- a/miscutils/chat.c +++ b/miscutils/chat.c | |||
@@ -74,6 +74,10 @@ | |||
74 | //config: help | 74 | //config: help |
75 | //config: Support CLR_ABORT directive. | 75 | //config: Support CLR_ABORT directive. |
76 | 76 | ||
77 | //applet:IF_CHAT(APPLET(chat, BB_DIR_USR_SBIN, BB_SUID_DROP)) | ||
78 | |||
79 | //kbuild:lib-$(CONFIG_CHAT) += chat.o | ||
80 | |||
77 | //usage:#define chat_trivial_usage | 81 | //usage:#define chat_trivial_usage |
78 | //usage: "EXPECT [SEND [EXPECT [SEND...]]]" | 82 | //usage: "EXPECT [SEND [EXPECT [SEND...]]]" |
79 | //usage:#define chat_full_usage "\n\n" | 83 | //usage:#define chat_full_usage "\n\n" |
diff --git a/miscutils/chrt.c b/miscutils/chrt.c index d76c0d152..1604a6890 100644 --- a/miscutils/chrt.c +++ b/miscutils/chrt.c | |||
@@ -12,6 +12,10 @@ | |||
12 | //config: manipulate real-time attributes of a process. | 12 | //config: manipulate real-time attributes of a process. |
13 | //config: This requires sched_{g,s}etparam support in your libc. | 13 | //config: This requires sched_{g,s}etparam support in your libc. |
14 | 14 | ||
15 | //applet:IF_CHRT(APPLET(chrt, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
16 | |||
17 | //kbuild:lib-$(CONFIG_CHRT) += chrt.o | ||
18 | |||
15 | //usage:#define chrt_trivial_usage | 19 | //usage:#define chrt_trivial_usage |
16 | //usage: "[-prfom] [PRIO] [PID | PROG ARGS]" | 20 | //usage: "[-prfom] [PRIO] [PID | PROG ARGS]" |
17 | //usage:#define chrt_full_usage "\n\n" | 21 | //usage:#define chrt_full_usage "\n\n" |
diff --git a/miscutils/crontab.c b/miscutils/crontab.c index bcd2eab33..bcd424578 100644 --- a/miscutils/crontab.c +++ b/miscutils/crontab.c | |||
@@ -18,6 +18,11 @@ | |||
18 | //config: Note that Busybox binary must be setuid root for this applet to | 18 | //config: Note that Busybox binary must be setuid root for this applet to |
19 | //config: work properly. | 19 | //config: work properly. |
20 | 20 | ||
21 | /* Needs to be run by root or be suid root - needs to change /var/spool/cron* files: */ | ||
22 | //applet:IF_CRONTAB(APPLET(crontab, BB_DIR_USR_BIN, BB_SUID_REQUIRE)) | ||
23 | |||
24 | //kbuild:lib-$(CONFIG_CRONTAB) += crontab.o | ||
25 | |||
21 | //usage:#define crontab_trivial_usage | 26 | //usage:#define crontab_trivial_usage |
22 | //usage: "[-c DIR] [-u USER] [-ler]|[FILE]" | 27 | //usage: "[-c DIR] [-u USER] [-ler]|[FILE]" |
23 | //usage:#define crontab_full_usage "\n\n" | 28 | //usage:#define crontab_full_usage "\n\n" |
diff --git a/miscutils/dc.c b/miscutils/dc.c index 2b77cd614..7986fef5f 100644 --- a/miscutils/dc.c +++ b/miscutils/dc.c | |||
@@ -17,6 +17,10 @@ | |||
17 | //config: Enable power and exp functions. | 17 | //config: Enable power and exp functions. |
18 | //config: NOTE: This will require libm to be present for linking. | 18 | //config: NOTE: This will require libm to be present for linking. |
19 | 19 | ||
20 | //applet:IF_DC(APPLET(dc, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
21 | |||
22 | //kbuild:lib-$(CONFIG_DC) += dc.o | ||
23 | |||
20 | //usage:#define dc_trivial_usage | 24 | //usage:#define dc_trivial_usage |
21 | //usage: "EXPRESSION..." | 25 | //usage: "EXPRESSION..." |
22 | //usage: | 26 | //usage: |
diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c index 361f3666f..99bdc72b8 100644 --- a/miscutils/devfsd.c +++ b/miscutils/devfsd.c | |||
@@ -110,6 +110,10 @@ | |||
110 | //config: /dev/loop0. If your /dev directory has normal names instead of | 110 | //config: /dev/loop0. If your /dev directory has normal names instead of |
111 | //config: devfs names, you don't want this. | 111 | //config: devfs names, you don't want this. |
112 | 112 | ||
113 | //applet:IF_DEVFSD(APPLET(devfsd, BB_DIR_SBIN, BB_SUID_DROP)) | ||
114 | |||
115 | //kbuild:lib-$(CONFIG_DEVFSD) += devfsd.o | ||
116 | |||
113 | //usage:#define devfsd_trivial_usage | 117 | //usage:#define devfsd_trivial_usage |
114 | //usage: "mntpnt [-v]" IF_DEVFSD_FG_NP("[-fg][-np]") | 118 | //usage: "mntpnt [-v]" IF_DEVFSD_FG_NP("[-fg][-np]") |
115 | //usage:#define devfsd_full_usage "\n\n" | 119 | //usage:#define devfsd_full_usage "\n\n" |
diff --git a/miscutils/devmem.c b/miscutils/devmem.c index dd6574e93..aeb32b13a 100644 --- a/miscutils/devmem.c +++ b/miscutils/devmem.c | |||
@@ -10,6 +10,10 @@ | |||
10 | //config: devmem is a small program that reads and writes from physical | 10 | //config: devmem is a small program that reads and writes from physical |
11 | //config: memory using /dev/mem. | 11 | //config: memory using /dev/mem. |
12 | 12 | ||
13 | //applet:IF_DEVMEM(APPLET(devmem, BB_DIR_SBIN, BB_SUID_DROP)) | ||
14 | |||
15 | //kbuild:lib-$(CONFIG_DEVMEM) += devmem.o | ||
16 | |||
13 | //usage:#define devmem_trivial_usage | 17 | //usage:#define devmem_trivial_usage |
14 | //usage: "ADDRESS [WIDTH [VALUE]]" | 18 | //usage: "ADDRESS [WIDTH [VALUE]]" |
15 | //usage:#define devmem_full_usage "\n\n" | 19 | //usage:#define devmem_full_usage "\n\n" |
diff --git a/miscutils/eject.c b/miscutils/eject.c index d271066ad..667932f6c 100644 --- a/miscutils/eject.c +++ b/miscutils/eject.c | |||
@@ -27,6 +27,10 @@ | |||
27 | //config: Add the -s option to eject, this allows to eject SCSI-Devices and | 27 | //config: Add the -s option to eject, this allows to eject SCSI-Devices and |
28 | //config: usb-storage devices. | 28 | //config: usb-storage devices. |
29 | 29 | ||
30 | //applet:IF_EJECT(APPLET(eject, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
31 | |||
32 | //kbuild:lib-$(CONFIG_EJECT) += eject.o | ||
33 | |||
30 | //usage:#define eject_trivial_usage | 34 | //usage:#define eject_trivial_usage |
31 | //usage: "[-t] [-T] [DEVICE]" | 35 | //usage: "[-t] [-T] [DEVICE]" |
32 | //usage:#define eject_full_usage "\n\n" | 36 | //usage:#define eject_full_usage "\n\n" |
diff --git a/miscutils/fbsplash.c b/miscutils/fbsplash.c index 93fd9412b..fc6c9b953 100644 --- a/miscutils/fbsplash.c +++ b/miscutils/fbsplash.c | |||
@@ -42,6 +42,10 @@ | |||
42 | //config: "NN" (ASCII decimal number) - percentage to show on progress bar | 42 | //config: "NN" (ASCII decimal number) - percentage to show on progress bar |
43 | //config: "exit" - well you guessed it | 43 | //config: "exit" - well you guessed it |
44 | 44 | ||
45 | //applet:IF_FBSPLASH(APPLET(fbsplash, BB_DIR_SBIN, BB_SUID_DROP)) | ||
46 | |||
47 | //kbuild:lib-$(CONFIG_FBSPLASH) += fbsplash.o | ||
48 | |||
45 | //usage:#define fbsplash_trivial_usage | 49 | //usage:#define fbsplash_trivial_usage |
46 | //usage: "-s IMGFILE [-c] [-d DEV] [-i INIFILE] [-f CMD]" | 50 | //usage: "-s IMGFILE [-c] [-d DEV] [-i INIFILE] [-f CMD]" |
47 | //usage:#define fbsplash_full_usage "\n\n" | 51 | //usage:#define fbsplash_full_usage "\n\n" |
diff --git a/miscutils/flash_eraseall.c b/miscutils/flash_eraseall.c index 08ec44e0c..2a9bd6cfe 100644 --- a/miscutils/flash_eraseall.c +++ b/miscutils/flash_eraseall.c | |||
@@ -16,6 +16,10 @@ | |||
16 | //config: The flash_eraseall binary from mtd-utils as of git head c4c6a59eb. | 16 | //config: The flash_eraseall binary from mtd-utils as of git head c4c6a59eb. |
17 | //config: This utility is used to erase the whole MTD device. | 17 | //config: This utility is used to erase the whole MTD device. |
18 | 18 | ||
19 | //applet:IF_FLASH_ERASEALL(APPLET(flash_eraseall, BB_DIR_USR_SBIN, BB_SUID_DROP)) | ||
20 | |||
21 | //kbuild:lib-$(CONFIG_FLASH_ERASEALL) += flash_eraseall.o | ||
22 | |||
19 | //usage:#define flash_eraseall_trivial_usage | 23 | //usage:#define flash_eraseall_trivial_usage |
20 | //usage: "[-jNq] MTD_DEVICE" | 24 | //usage: "[-jNq] MTD_DEVICE" |
21 | //usage:#define flash_eraseall_full_usage "\n\n" | 25 | //usage:#define flash_eraseall_full_usage "\n\n" |
diff --git a/miscutils/flash_lock_unlock.c b/miscutils/flash_lock_unlock.c index 287abaafd..2f698641f 100644 --- a/miscutils/flash_lock_unlock.c +++ b/miscutils/flash_lock_unlock.c | |||
@@ -17,6 +17,12 @@ | |||
17 | //config: The flash_unlock binary from mtd-utils as of git head 5ec0c10d0. This | 17 | //config: The flash_unlock binary from mtd-utils as of git head 5ec0c10d0. This |
18 | //config: utility unlocks part or all of the flash device. | 18 | //config: utility unlocks part or all of the flash device. |
19 | 19 | ||
20 | //applet:IF_FLASH_LOCK(APPLET_ODDNAME(flash_lock, flash_lock_unlock, BB_DIR_USR_SBIN, BB_SUID_DROP, flash_lock)) | ||
21 | //applet:IF_FLASH_UNLOCK(APPLET_ODDNAME(flash_unlock, flash_lock_unlock, BB_DIR_USR_SBIN, BB_SUID_DROP, flash_unlock)) | ||
22 | |||
23 | //kbuild:lib-$(CONFIG_FLASH_LOCK) += flash_lock_unlock.o | ||
24 | //kbuild:lib-$(CONFIG_FLASH_UNLOCK) += flash_lock_unlock.o | ||
25 | |||
20 | //usage:#define flash_lock_trivial_usage | 26 | //usage:#define flash_lock_trivial_usage |
21 | //usage: "MTD_DEVICE OFFSET SECTORS" | 27 | //usage: "MTD_DEVICE OFFSET SECTORS" |
22 | //usage:#define flash_lock_full_usage "\n\n" | 28 | //usage:#define flash_lock_full_usage "\n\n" |
diff --git a/miscutils/flashcp.c b/miscutils/flashcp.c index 6cbf455ff..4bbc67727 100644 --- a/miscutils/flashcp.c +++ b/miscutils/flashcp.c | |||
@@ -13,6 +13,10 @@ | |||
13 | //config: The flashcp binary, inspired by mtd-utils as of git head 5eceb74f7. | 13 | //config: The flashcp binary, inspired by mtd-utils as of git head 5eceb74f7. |
14 | //config: This utility is used to copy images into a MTD device. | 14 | //config: This utility is used to copy images into a MTD device. |
15 | 15 | ||
16 | //applet:IF_FLASHCP(APPLET(flashcp, BB_DIR_USR_SBIN, BB_SUID_DROP)) | ||
17 | |||
18 | //kbuild:lib-$(CONFIG_FLASHCP) += flashcp.o | ||
19 | |||
16 | //usage:#define flashcp_trivial_usage | 20 | //usage:#define flashcp_trivial_usage |
17 | //usage: "-v FILE MTD_DEVICE" | 21 | //usage: "-v FILE MTD_DEVICE" |
18 | //usage:#define flashcp_full_usage "\n\n" | 22 | //usage:#define flashcp_full_usage "\n\n" |
diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c index 06311ccf7..e43a0dec2 100644 --- a/miscutils/hdparm.c +++ b/miscutils/hdparm.c | |||
@@ -70,6 +70,10 @@ | |||
70 | //config: help | 70 | //config: help |
71 | //config: Enables the 'hdparm -d' option to get/set using_dma flag. | 71 | //config: Enables the 'hdparm -d' option to get/set using_dma flag. |
72 | 72 | ||
73 | //applet:IF_HDPARM(APPLET(hdparm, BB_DIR_SBIN, BB_SUID_DROP)) | ||
74 | |||
75 | //kbuild:lib-$(CONFIG_HDPARM) += hdparm.o | ||
76 | |||
73 | //usage:#define hdparm_trivial_usage | 77 | //usage:#define hdparm_trivial_usage |
74 | //usage: "[OPTIONS] [DEVICE]" | 78 | //usage: "[OPTIONS] [DEVICE]" |
75 | //usage:#define hdparm_full_usage "\n\n" | 79 | //usage:#define hdparm_full_usage "\n\n" |
diff --git a/miscutils/inotifyd.c b/miscutils/inotifyd.c index ffac8b958..601df6465 100644 --- a/miscutils/inotifyd.c +++ b/miscutils/inotifyd.c | |||
@@ -33,6 +33,10 @@ | |||
33 | //config: Simple inotify daemon. Reports filesystem changes. Requires | 33 | //config: Simple inotify daemon. Reports filesystem changes. Requires |
34 | //config: kernel >= 2.6.13 | 34 | //config: kernel >= 2.6.13 |
35 | 35 | ||
36 | //applet:IF_INOTIFYD(APPLET(inotifyd, BB_DIR_SBIN, BB_SUID_DROP)) | ||
37 | |||
38 | //kbuild:lib-$(CONFIG_INOTIFYD) += inotifyd.o | ||
39 | |||
36 | //usage:#define inotifyd_trivial_usage | 40 | //usage:#define inotifyd_trivial_usage |
37 | //usage: "PROG FILE1[:MASK]..." | 41 | //usage: "PROG FILE1[:MASK]..." |
38 | //usage:#define inotifyd_full_usage "\n\n" | 42 | //usage:#define inotifyd_full_usage "\n\n" |
diff --git a/miscutils/ionice.c b/miscutils/ionice.c index 1e1a5861c..c54b3a6e1 100644 --- a/miscutils/ionice.c +++ b/miscutils/ionice.c | |||
@@ -14,6 +14,10 @@ | |||
14 | //config: Set/set program io scheduling class and priority | 14 | //config: Set/set program io scheduling class and priority |
15 | //config: Requires kernel >= 2.6.13 | 15 | //config: Requires kernel >= 2.6.13 |
16 | 16 | ||
17 | //applet:IF_IONICE(APPLET(ionice, BB_DIR_BIN, BB_SUID_DROP)) | ||
18 | |||
19 | //kbuild:lib-$(CONFIG_IONICE) += ionice.o | ||
20 | |||
17 | //usage:#define ionice_trivial_usage | 21 | //usage:#define ionice_trivial_usage |
18 | //usage: "[-c 1-3] [-n 0-7] [-p PID] [PROG]" | 22 | //usage: "[-c 1-3] [-n 0-7] [-p PID] [PROG]" |
19 | //usage:#define ionice_full_usage "\n\n" | 23 | //usage:#define ionice_full_usage "\n\n" |
diff --git a/miscutils/last.c b/miscutils/last.c index 2b7060c53..67c1343f1 100644 --- a/miscutils/last.c +++ b/miscutils/last.c | |||
@@ -21,6 +21,14 @@ | |||
21 | //config: 'last' displays detailed information about the last users that | 21 | //config: 'last' displays detailed information about the last users that |
22 | //config: logged into the system (mimics sysvinit last). +900 bytes. | 22 | //config: logged into the system (mimics sysvinit last). +900 bytes. |
23 | 23 | ||
24 | //applet:IF_LAST(APPLET(last, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
25 | |||
26 | //kbuild:ifeq ($(CONFIG_FEATURE_LAST_FANCY),y) | ||
27 | //kbuild:lib-$(CONFIG_FEATURE_LAST_FANCY) += last_fancy.o | ||
28 | //kbuild:else | ||
29 | //kbuild:lib-$(CONFIG_LAST) += last.o | ||
30 | //kbuild:endif | ||
31 | |||
24 | //usage:#define last_trivial_usage | 32 | //usage:#define last_trivial_usage |
25 | //usage: ""IF_FEATURE_LAST_FANCY("[-HW] [-f FILE]") | 33 | //usage: ""IF_FEATURE_LAST_FANCY("[-HW] [-f FILE]") |
26 | //usage:#define last_full_usage "\n\n" | 34 | //usage:#define last_full_usage "\n\n" |
diff --git a/miscutils/less.c b/miscutils/less.c index 61acfdcb5..e90691b49 100644 --- a/miscutils/less.c +++ b/miscutils/less.c | |||
@@ -105,6 +105,10 @@ | |||
105 | //config: help | 105 | //config: help |
106 | //config: Enables "-N" command. | 106 | //config: Enables "-N" command. |
107 | 107 | ||
108 | //applet:IF_LESS(APPLET(less, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
109 | |||
110 | //kbuild:lib-$(CONFIG_LESS) += less.o | ||
111 | |||
108 | //usage:#define less_trivial_usage | 112 | //usage:#define less_trivial_usage |
109 | //usage: "[-E" IF_FEATURE_LESS_REGEXP("I")IF_FEATURE_LESS_FLAGS("Mm") | 113 | //usage: "[-E" IF_FEATURE_LESS_REGEXP("I")IF_FEATURE_LESS_FLAGS("Mm") |
110 | //usage: "N" IF_FEATURE_LESS_TRUNCATE("S") "h~] [FILE]..." | 114 | //usage: "N" IF_FEATURE_LESS_TRUNCATE("S") "h~] [FILE]..." |
diff --git a/miscutils/makedevs.c b/miscutils/makedevs.c index cbdb0e3a1..6278ee77c 100644 --- a/miscutils/makedevs.c +++ b/miscutils/makedevs.c | |||
@@ -38,6 +38,10 @@ | |||
38 | //config: | 38 | //config: |
39 | //config:endchoice | 39 | //config:endchoice |
40 | 40 | ||
41 | //applet:IF_MAKEDEVS(APPLET(makedevs, BB_DIR_SBIN, BB_SUID_DROP)) | ||
42 | |||
43 | //kbuild:lib-$(CONFIG_MAKEDEVS) += makedevs.o | ||
44 | |||
41 | //usage:#if ENABLE_FEATURE_MAKEDEVS_LEAF | 45 | //usage:#if ENABLE_FEATURE_MAKEDEVS_LEAF |
42 | //usage:#define makedevs_trivial_usage | 46 | //usage:#define makedevs_trivial_usage |
43 | //usage: "NAME TYPE MAJOR MINOR FIRST LAST [s]" | 47 | //usage: "NAME TYPE MAJOR MINOR FIRST LAST [s]" |
diff --git a/miscutils/man.c b/miscutils/man.c index cded6ebee..6a636f1ec 100644 --- a/miscutils/man.c +++ b/miscutils/man.c | |||
@@ -8,6 +8,10 @@ | |||
8 | //config: help | 8 | //config: help |
9 | //config: Format and display manual pages. | 9 | //config: Format and display manual pages. |
10 | 10 | ||
11 | //applet:IF_MAN(APPLET(man, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
12 | |||
13 | //kbuild:lib-$(CONFIG_MAN) += man.o | ||
14 | |||
11 | //usage:#define man_trivial_usage | 15 | //usage:#define man_trivial_usage |
12 | //usage: "[-aw] [MANPAGE]..." | 16 | //usage: "[-aw] [MANPAGE]..." |
13 | //usage:#define man_full_usage "\n\n" | 17 | //usage:#define man_full_usage "\n\n" |
diff --git a/miscutils/microcom.c b/miscutils/microcom.c index c6ba476db..04605d883 100644 --- a/miscutils/microcom.c +++ b/miscutils/microcom.c | |||
@@ -13,6 +13,10 @@ | |||
13 | //config: help | 13 | //config: help |
14 | //config: The poor man's minicom utility for chatting with serial port devices. | 14 | //config: The poor man's minicom utility for chatting with serial port devices. |
15 | 15 | ||
16 | //applet:IF_MICROCOM(APPLET(microcom, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
17 | |||
18 | //kbuild:lib-$(CONFIG_MICROCOM) += microcom.o | ||
19 | |||
16 | //usage:#define microcom_trivial_usage | 20 | //usage:#define microcom_trivial_usage |
17 | //usage: "[-d DELAY] [-t TIMEOUT] [-s SPEED] [-X] TTY" | 21 | //usage: "[-d DELAY] [-t TIMEOUT] [-s SPEED] [-X] TTY" |
18 | //usage:#define microcom_full_usage "\n\n" | 22 | //usage:#define microcom_full_usage "\n\n" |
diff --git a/miscutils/mountpoint.c b/miscutils/mountpoint.c index 12af2ca9a..8b9e1d779 100644 --- a/miscutils/mountpoint.c +++ b/miscutils/mountpoint.c | |||
@@ -14,6 +14,10 @@ | |||
14 | //config: help | 14 | //config: help |
15 | //config: mountpoint checks if the directory is a mountpoint. | 15 | //config: mountpoint checks if the directory is a mountpoint. |
16 | 16 | ||
17 | //applet:IF_MOUNTPOINT(APPLET(mountpoint, BB_DIR_BIN, BB_SUID_DROP)) | ||
18 | |||
19 | //kbuild:lib-$(CONFIG_MOUNTPOINT) += mountpoint.o | ||
20 | |||
17 | //usage:#define mountpoint_trivial_usage | 21 | //usage:#define mountpoint_trivial_usage |
18 | //usage: "[-q] <[-dn] DIR | -x DEVICE>" | 22 | //usage: "[-q] <[-dn] DIR | -x DEVICE>" |
19 | //usage:#define mountpoint_full_usage "\n\n" | 23 | //usage:#define mountpoint_full_usage "\n\n" |
diff --git a/miscutils/mt.c b/miscutils/mt.c index 75a09b662..6b3169675 100644 --- a/miscutils/mt.c +++ b/miscutils/mt.c | |||
@@ -10,6 +10,10 @@ | |||
10 | //config: to advance or rewind a tape past a specified number of archive | 10 | //config: to advance or rewind a tape past a specified number of archive |
11 | //config: files on the tape. | 11 | //config: files on the tape. |
12 | 12 | ||
13 | //applet:IF_MT(APPLET(mt, BB_DIR_BIN, BB_SUID_DROP)) | ||
14 | |||
15 | //kbuild:lib-$(CONFIG_MT) += mt.o | ||
16 | |||
13 | //usage:#define mt_trivial_usage | 17 | //usage:#define mt_trivial_usage |
14 | //usage: "[-f device] opcode value" | 18 | //usage: "[-f device] opcode value" |
15 | //usage:#define mt_full_usage "\n\n" | 19 | //usage:#define mt_full_usage "\n\n" |
diff --git a/miscutils/raidautorun.c b/miscutils/raidautorun.c index 578b2cf52..c6d8e6235 100644 --- a/miscutils/raidautorun.c +++ b/miscutils/raidautorun.c | |||
@@ -15,6 +15,10 @@ | |||
15 | //config: raidautorun tells the kernel md driver to | 15 | //config: raidautorun tells the kernel md driver to |
16 | //config: search and start RAID arrays. | 16 | //config: search and start RAID arrays. |
17 | 17 | ||
18 | //applet:IF_RAIDAUTORUN(APPLET(raidautorun, BB_DIR_SBIN, BB_SUID_DROP)) | ||
19 | |||
20 | //kbuild:lib-$(CONFIG_RAIDAUTORUN) += raidautorun.o | ||
21 | |||
18 | //usage:#define raidautorun_trivial_usage | 22 | //usage:#define raidautorun_trivial_usage |
19 | //usage: "DEVICE" | 23 | //usage: "DEVICE" |
20 | //usage:#define raidautorun_full_usage "\n\n" | 24 | //usage:#define raidautorun_full_usage "\n\n" |
diff --git a/miscutils/readahead.c b/miscutils/readahead.c index 0b502f88c..b8e9b257f 100644 --- a/miscutils/readahead.c +++ b/miscutils/readahead.c | |||
@@ -27,6 +27,10 @@ | |||
27 | //config: As readahead(2) blocks until each file has been read, it is best to | 27 | //config: As readahead(2) blocks until each file has been read, it is best to |
28 | //config: run this applet as a background job. | 28 | //config: run this applet as a background job. |
29 | 29 | ||
30 | //applet:IF_READAHEAD(APPLET(readahead, BB_DIR_USR_SBIN, BB_SUID_DROP)) | ||
31 | |||
32 | //kbuild:lib-$(CONFIG_READAHEAD) += readahead.o | ||
33 | |||
30 | //usage:#define readahead_trivial_usage | 34 | //usage:#define readahead_trivial_usage |
31 | //usage: "[FILE]..." | 35 | //usage: "[FILE]..." |
32 | //usage:#define readahead_full_usage "\n\n" | 36 | //usage:#define readahead_full_usage "\n\n" |
diff --git a/miscutils/runlevel.c b/miscutils/runlevel.c index 7c07a72e2..b6412a6ea 100644 --- a/miscutils/runlevel.c +++ b/miscutils/runlevel.c | |||
@@ -21,6 +21,10 @@ | |||
21 | //config: This applet uses utmp but does not rely on busybox supporing | 21 | //config: This applet uses utmp but does not rely on busybox supporing |
22 | //config: utmp on purpose. It is used by e.g. emdebian via /etc/init.d/rc. | 22 | //config: utmp on purpose. It is used by e.g. emdebian via /etc/init.d/rc. |
23 | 23 | ||
24 | //applet:IF_RUNLEVEL(APPLET(runlevel, BB_DIR_SBIN, BB_SUID_DROP)) | ||
25 | |||
26 | //kbuild:lib-$(CONFIG_RUNLEVEL) += runlevel.o | ||
27 | |||
24 | //usage:#define runlevel_trivial_usage | 28 | //usage:#define runlevel_trivial_usage |
25 | //usage: "[FILE]" | 29 | //usage: "[FILE]" |
26 | //usage:#define runlevel_full_usage "\n\n" | 30 | //usage:#define runlevel_full_usage "\n\n" |
diff --git a/miscutils/rx.c b/miscutils/rx.c index 359ad5046..7fca8e36b 100644 --- a/miscutils/rx.c +++ b/miscutils/rx.c | |||
@@ -21,6 +21,10 @@ | |||
21 | //config: help | 21 | //config: help |
22 | //config: Receive files using the Xmodem protocol. | 22 | //config: Receive files using the Xmodem protocol. |
23 | 23 | ||
24 | //applet:IF_RX(APPLET(rx, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
25 | |||
26 | //kbuild:lib-$(CONFIG_RX) += rx.o | ||
27 | |||
24 | //usage:#define rx_trivial_usage | 28 | //usage:#define rx_trivial_usage |
25 | //usage: "FILE" | 29 | //usage: "FILE" |
26 | //usage:#define rx_full_usage "\n\n" | 30 | //usage:#define rx_full_usage "\n\n" |
diff --git a/miscutils/setsid.c b/miscutils/setsid.c index f0ec04a0b..143a8f8fa 100644 --- a/miscutils/setsid.c +++ b/miscutils/setsid.c | |||
@@ -19,6 +19,10 @@ | |||
19 | //config: help | 19 | //config: help |
20 | //config: setsid runs a program in a new session | 20 | //config: setsid runs a program in a new session |
21 | 21 | ||
22 | //applet:IF_SETSID(APPLET(setsid, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
23 | |||
24 | //kbuild:lib-$(CONFIG_SETSID) += setsid.o | ||
25 | |||
22 | //usage:#define setsid_trivial_usage | 26 | //usage:#define setsid_trivial_usage |
23 | //usage: "[-c] PROG ARGS" | 27 | //usage: "[-c] PROG ARGS" |
24 | //usage:#define setsid_full_usage "\n\n" | 28 | //usage:#define setsid_full_usage "\n\n" |
diff --git a/miscutils/strings.c b/miscutils/strings.c index d0e637987..4d9bfe690 100644 --- a/miscutils/strings.c +++ b/miscutils/strings.c | |||
@@ -13,6 +13,10 @@ | |||
13 | //config: strings prints the printable character sequences for each file | 13 | //config: strings prints the printable character sequences for each file |
14 | //config: specified. | 14 | //config: specified. |
15 | 15 | ||
16 | //applet:IF_STRINGS(APPLET(strings, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
17 | |||
18 | //kbuild:lib-$(CONFIG_STRINGS) += strings.o | ||
19 | |||
16 | //usage:#define strings_trivial_usage | 20 | //usage:#define strings_trivial_usage |
17 | //usage: "[-fo] [-t o/d/x] [-n LEN] [FILE]..." | 21 | //usage: "[-fo] [-t o/d/x] [-n LEN] [FILE]..." |
18 | //usage:#define strings_full_usage "\n\n" | 22 | //usage:#define strings_full_usage "\n\n" |
diff --git a/miscutils/time.c b/miscutils/time.c index 90d2ab67c..a73a837d8 100644 --- a/miscutils/time.c +++ b/miscutils/time.c | |||
@@ -16,6 +16,10 @@ | |||
16 | //config: When the command finishes, time writes a message to standard output | 16 | //config: When the command finishes, time writes a message to standard output |
17 | //config: giving timing statistics about this program run. | 17 | //config: giving timing statistics about this program run. |
18 | 18 | ||
19 | //applet:IF_TIME(APPLET(time, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
20 | |||
21 | //kbuild:lib-$(CONFIG_TIME) += time.o | ||
22 | |||
19 | //usage:#define time_trivial_usage | 23 | //usage:#define time_trivial_usage |
20 | //usage: "[-v] PROG ARGS" | 24 | //usage: "[-v] PROG ARGS" |
21 | //usage:#define time_full_usage "\n\n" | 25 | //usage:#define time_full_usage "\n\n" |
diff --git a/miscutils/timeout.c b/miscutils/timeout.c index 4d598ead2..f29dc8a9c 100644 --- a/miscutils/timeout.c +++ b/miscutils/timeout.c | |||
@@ -34,6 +34,10 @@ | |||
34 | //config: Runs a program and watches it. If it does not terminate in | 34 | //config: Runs a program and watches it. If it does not terminate in |
35 | //config: specified number of seconds, it is sent a signal. | 35 | //config: specified number of seconds, it is sent a signal. |
36 | 36 | ||
37 | //applet:IF_TIMEOUT(APPLET(timeout, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
38 | |||
39 | //kbuild:lib-$(CONFIG_TIMEOUT) += timeout.o | ||
40 | |||
37 | //usage:#define timeout_trivial_usage | 41 | //usage:#define timeout_trivial_usage |
38 | //usage: "[-t SECS] [-s SIG] PROG ARGS" | 42 | //usage: "[-t SECS] [-s SIG] PROG ARGS" |
39 | //usage:#define timeout_full_usage "\n\n" | 43 | //usage:#define timeout_full_usage "\n\n" |
diff --git a/miscutils/ttysize.c b/miscutils/ttysize.c index a63b731d2..135ce8535 100644 --- a/miscutils/ttysize.c +++ b/miscutils/ttysize.c | |||
@@ -18,6 +18,10 @@ | |||
18 | //config: error, but returns default 80x24. | 18 | //config: error, but returns default 80x24. |
19 | //config: Usage in shell scripts: width=`ttysize w`. | 19 | //config: Usage in shell scripts: width=`ttysize w`. |
20 | 20 | ||
21 | //applet:IF_TTYSIZE(APPLET(ttysize, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
22 | |||
23 | //kbuild:lib-$(CONFIG_TTYSIZE) += ttysize.o | ||
24 | |||
21 | //usage:#define ttysize_trivial_usage | 25 | //usage:#define ttysize_trivial_usage |
22 | //usage: "[w] [h]" | 26 | //usage: "[w] [h]" |
23 | //usage:#define ttysize_full_usage "\n\n" | 27 | //usage:#define ttysize_full_usage "\n\n" |
diff --git a/miscutils/volname.c b/miscutils/volname.c index 855f2206a..6d1addbb5 100644 --- a/miscutils/volname.c +++ b/miscutils/volname.c | |||
@@ -33,6 +33,10 @@ | |||
33 | //config: help | 33 | //config: help |
34 | //config: Prints a CD-ROM volume name. | 34 | //config: Prints a CD-ROM volume name. |
35 | 35 | ||
36 | //applet:IF_VOLNAME(APPLET(volname, BB_DIR_USR_BIN, BB_SUID_DROP)) | ||
37 | |||
38 | //kbuild:lib-$(CONFIG_VOLNAME) += volname.o | ||
39 | |||
36 | //usage:#define volname_trivial_usage | 40 | //usage:#define volname_trivial_usage |
37 | //usage: "[DEVICE]" | 41 | //usage: "[DEVICE]" |
38 | //usage:#define volname_full_usage "\n\n" | 42 | //usage:#define volname_full_usage "\n\n" |
diff --git a/miscutils/watchdog.c b/miscutils/watchdog.c index 7a743ef1b..07ae64e52 100644 --- a/miscutils/watchdog.c +++ b/miscutils/watchdog.c | |||
@@ -20,6 +20,10 @@ | |||
20 | //config: certain amount of time, the watchdog device assumes the system has | 20 | //config: certain amount of time, the watchdog device assumes the system has |
21 | //config: hung, and will cause the hardware to reboot. | 21 | //config: hung, and will cause the hardware to reboot. |
22 | 22 | ||
23 | //applet:IF_WATCHDOG(APPLET(watchdog, BB_DIR_SBIN, BB_SUID_DROP)) | ||
24 | |||
25 | //kbuild:lib-$(CONFIG_WATCHDOG) += watchdog.o | ||
26 | |||
23 | //usage:#define watchdog_trivial_usage | 27 | //usage:#define watchdog_trivial_usage |
24 | //usage: "[-t N[ms]] [-T N[ms]] [-F] DEV" | 28 | //usage: "[-t N[ms]] [-T N[ms]] [-F] DEV" |
25 | //usage:#define watchdog_full_usage "\n\n" | 29 | //usage:#define watchdog_full_usage "\n\n" |