From f88e3bfa8ded4f1c7e7d2143a1cfcbbdfe5e8541 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 22 Nov 2016 23:54:17 +0100 Subject: Convert all miscutils/* applets to "new style" applet definitions Signed-off-by: Denys Vlasenko --- miscutils/Kbuild.src | 40 ---------------------------------------- miscutils/adjtimex.c | 4 ++++ miscutils/bbconfig.c | 4 ++++ miscutils/beep.c | 4 ++++ miscutils/chat.c | 4 ++++ miscutils/chrt.c | 4 ++++ miscutils/crontab.c | 5 +++++ miscutils/dc.c | 4 ++++ miscutils/devfsd.c | 4 ++++ miscutils/devmem.c | 4 ++++ miscutils/eject.c | 4 ++++ miscutils/fbsplash.c | 4 ++++ miscutils/flash_eraseall.c | 4 ++++ miscutils/flash_lock_unlock.c | 6 ++++++ miscutils/flashcp.c | 4 ++++ miscutils/hdparm.c | 4 ++++ miscutils/inotifyd.c | 4 ++++ miscutils/ionice.c | 4 ++++ miscutils/last.c | 8 ++++++++ miscutils/less.c | 4 ++++ miscutils/makedevs.c | 4 ++++ miscutils/man.c | 4 ++++ miscutils/microcom.c | 4 ++++ miscutils/mountpoint.c | 4 ++++ miscutils/mt.c | 4 ++++ miscutils/raidautorun.c | 4 ++++ miscutils/readahead.c | 4 ++++ miscutils/runlevel.c | 4 ++++ miscutils/rx.c | 4 ++++ miscutils/setsid.c | 4 ++++ miscutils/strings.c | 4 ++++ miscutils/time.c | 4 ++++ miscutils/timeout.c | 4 ++++ miscutils/ttysize.c | 4 ++++ miscutils/volname.c | 4 ++++ miscutils/watchdog.c | 4 ++++ 36 files changed, 147 insertions(+), 40 deletions(-) (limited to 'miscutils') 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 @@ lib-y:= INSERT -lib-$(CONFIG_ADJTIMEX) += adjtimex.o -lib-$(CONFIG_BBCONFIG) += bbconfig.o -lib-$(CONFIG_BEEP) += beep.o -lib-$(CONFIG_CHAT) += chat.o -lib-$(CONFIG_CHRT) += chrt.o -lib-$(CONFIG_CRONTAB) += crontab.o -lib-$(CONFIG_DC) += dc.o -lib-$(CONFIG_DEVFSD) += devfsd.o -lib-$(CONFIG_DEVMEM) += devmem.o -lib-$(CONFIG_EJECT) += eject.o -lib-$(CONFIG_FBSPLASH) += fbsplash.o -lib-$(CONFIG_FLASHCP) += flashcp.o -lib-$(CONFIG_FLASH_ERASEALL) += flash_eraseall.o -lib-$(CONFIG_FLASH_LOCK) += flash_lock_unlock.o -lib-$(CONFIG_FLASH_UNLOCK) += flash_lock_unlock.o -lib-$(CONFIG_IONICE) += ionice.o -lib-$(CONFIG_HDPARM) += hdparm.o -lib-$(CONFIG_INOTIFYD) += inotifyd.o -ifeq ($(CONFIG_FEATURE_LAST_FANCY),y) -lib-$(CONFIG_FEATURE_LAST_FANCY) += last_fancy.o -else -lib-$(CONFIG_LAST) += last.o -endif -lib-$(CONFIG_LESS) += less.o -lib-$(CONFIG_MAKEDEVS) += makedevs.o -lib-$(CONFIG_MAN) += man.o -lib-$(CONFIG_MICROCOM) += microcom.o -lib-$(CONFIG_MOUNTPOINT) += mountpoint.o -lib-$(CONFIG_MT) += mt.o -lib-$(CONFIG_RAIDAUTORUN) += raidautorun.o -lib-$(CONFIG_READAHEAD) += readahead.o -lib-$(CONFIG_RUNLEVEL) += runlevel.o -lib-$(CONFIG_RX) += rx.o -lib-$(CONFIG_SETSID) += setsid.o -lib-$(CONFIG_STRINGS) += strings.o -lib-$(CONFIG_TIME) += time.o -lib-$(CONFIG_TIMEOUT) += timeout.o -lib-$(CONFIG_TTYSIZE) += ttysize.o -lib-$(CONFIG_VOLNAME) += volname.o -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 @@ //config: Adjtimex reads and optionally sets adjustment parameters for //config: the Linux clock adjustment algorithm. +//applet:IF_ADJTIMEX(APPLET(adjtimex, BB_DIR_SBIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_ADJTIMEX) += adjtimex.o + //usage:#define adjtimex_trivial_usage //usage: "[-q] [-o OFF] [-f FREQ] [-p TCONST] [-t TICK]" //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 @@ //config: and have very little memory, this might not be a win. Otherwise, //config: you probably want this. +//applet:IF_BBCONFIG(APPLET(bbconfig, BB_DIR_BIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_BBCONFIG) += bbconfig.o + //usage:#define bbconfig_trivial_usage //usage: "" //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 @@ //config: help //config: Length in ms for default beep. +//applet:IF_BEEP(APPLET(beep, BB_DIR_USR_BIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_BEEP) += beep.o + //usage:#define beep_trivial_usage //usage: "-f FREQ -l LEN -d DELAY -r COUNT -n" //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 @@ //config: help //config: Support CLR_ABORT directive. +//applet:IF_CHAT(APPLET(chat, BB_DIR_USR_SBIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_CHAT) += chat.o + //usage:#define chat_trivial_usage //usage: "EXPECT [SEND [EXPECT [SEND...]]]" //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 @@ //config: manipulate real-time attributes of a process. //config: This requires sched_{g,s}etparam support in your libc. +//applet:IF_CHRT(APPLET(chrt, BB_DIR_USR_BIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_CHRT) += chrt.o + //usage:#define chrt_trivial_usage //usage: "[-prfom] [PRIO] [PID | PROG ARGS]" //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 @@ //config: Note that Busybox binary must be setuid root for this applet to //config: work properly. +/* Needs to be run by root or be suid root - needs to change /var/spool/cron* files: */ +//applet:IF_CRONTAB(APPLET(crontab, BB_DIR_USR_BIN, BB_SUID_REQUIRE)) + +//kbuild:lib-$(CONFIG_CRONTAB) += crontab.o + //usage:#define crontab_trivial_usage //usage: "[-c DIR] [-u USER] [-ler]|[FILE]" //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 @@ //config: Enable power and exp functions. //config: NOTE: This will require libm to be present for linking. +//applet:IF_DC(APPLET(dc, BB_DIR_USR_BIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_DC) += dc.o + //usage:#define dc_trivial_usage //usage: "EXPRESSION..." //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 @@ //config: /dev/loop0. If your /dev directory has normal names instead of //config: devfs names, you don't want this. +//applet:IF_DEVFSD(APPLET(devfsd, BB_DIR_SBIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_DEVFSD) += devfsd.o + //usage:#define devfsd_trivial_usage //usage: "mntpnt [-v]" IF_DEVFSD_FG_NP("[-fg][-np]") //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 @@ //config: devmem is a small program that reads and writes from physical //config: memory using /dev/mem. +//applet:IF_DEVMEM(APPLET(devmem, BB_DIR_SBIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_DEVMEM) += devmem.o + //usage:#define devmem_trivial_usage //usage: "ADDRESS [WIDTH [VALUE]]" //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 @@ //config: Add the -s option to eject, this allows to eject SCSI-Devices and //config: usb-storage devices. +//applet:IF_EJECT(APPLET(eject, BB_DIR_USR_BIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_EJECT) += eject.o + //usage:#define eject_trivial_usage //usage: "[-t] [-T] [DEVICE]" //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 @@ //config: "NN" (ASCII decimal number) - percentage to show on progress bar //config: "exit" - well you guessed it +//applet:IF_FBSPLASH(APPLET(fbsplash, BB_DIR_SBIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_FBSPLASH) += fbsplash.o + //usage:#define fbsplash_trivial_usage //usage: "-s IMGFILE [-c] [-d DEV] [-i INIFILE] [-f CMD]" //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 @@ //config: The flash_eraseall binary from mtd-utils as of git head c4c6a59eb. //config: This utility is used to erase the whole MTD device. +//applet:IF_FLASH_ERASEALL(APPLET(flash_eraseall, BB_DIR_USR_SBIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_FLASH_ERASEALL) += flash_eraseall.o + //usage:#define flash_eraseall_trivial_usage //usage: "[-jNq] MTD_DEVICE" //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 @@ //config: The flash_unlock binary from mtd-utils as of git head 5ec0c10d0. This //config: utility unlocks part or all of the flash device. +//applet:IF_FLASH_LOCK(APPLET_ODDNAME(flash_lock, flash_lock_unlock, BB_DIR_USR_SBIN, BB_SUID_DROP, flash_lock)) +//applet:IF_FLASH_UNLOCK(APPLET_ODDNAME(flash_unlock, flash_lock_unlock, BB_DIR_USR_SBIN, BB_SUID_DROP, flash_unlock)) + +//kbuild:lib-$(CONFIG_FLASH_LOCK) += flash_lock_unlock.o +//kbuild:lib-$(CONFIG_FLASH_UNLOCK) += flash_lock_unlock.o + //usage:#define flash_lock_trivial_usage //usage: "MTD_DEVICE OFFSET SECTORS" //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 @@ //config: The flashcp binary, inspired by mtd-utils as of git head 5eceb74f7. //config: This utility is used to copy images into a MTD device. +//applet:IF_FLASHCP(APPLET(flashcp, BB_DIR_USR_SBIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_FLASHCP) += flashcp.o + //usage:#define flashcp_trivial_usage //usage: "-v FILE MTD_DEVICE" //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 @@ //config: help //config: Enables the 'hdparm -d' option to get/set using_dma flag. +//applet:IF_HDPARM(APPLET(hdparm, BB_DIR_SBIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_HDPARM) += hdparm.o + //usage:#define hdparm_trivial_usage //usage: "[OPTIONS] [DEVICE]" //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 @@ //config: Simple inotify daemon. Reports filesystem changes. Requires //config: kernel >= 2.6.13 +//applet:IF_INOTIFYD(APPLET(inotifyd, BB_DIR_SBIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_INOTIFYD) += inotifyd.o + //usage:#define inotifyd_trivial_usage //usage: "PROG FILE1[:MASK]..." //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 @@ //config: Set/set program io scheduling class and priority //config: Requires kernel >= 2.6.13 +//applet:IF_IONICE(APPLET(ionice, BB_DIR_BIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_IONICE) += ionice.o + //usage:#define ionice_trivial_usage //usage: "[-c 1-3] [-n 0-7] [-p PID] [PROG]" //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 @@ //config: 'last' displays detailed information about the last users that //config: logged into the system (mimics sysvinit last). +900 bytes. +//applet:IF_LAST(APPLET(last, BB_DIR_USR_BIN, BB_SUID_DROP)) + +//kbuild:ifeq ($(CONFIG_FEATURE_LAST_FANCY),y) +//kbuild:lib-$(CONFIG_FEATURE_LAST_FANCY) += last_fancy.o +//kbuild:else +//kbuild:lib-$(CONFIG_LAST) += last.o +//kbuild:endif + //usage:#define last_trivial_usage //usage: ""IF_FEATURE_LAST_FANCY("[-HW] [-f FILE]") //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 @@ //config: help //config: Enables "-N" command. +//applet:IF_LESS(APPLET(less, BB_DIR_USR_BIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_LESS) += less.o + //usage:#define less_trivial_usage //usage: "[-E" IF_FEATURE_LESS_REGEXP("I")IF_FEATURE_LESS_FLAGS("Mm") //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 @@ //config: //config:endchoice +//applet:IF_MAKEDEVS(APPLET(makedevs, BB_DIR_SBIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_MAKEDEVS) += makedevs.o + //usage:#if ENABLE_FEATURE_MAKEDEVS_LEAF //usage:#define makedevs_trivial_usage //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 @@ //config: help //config: Format and display manual pages. +//applet:IF_MAN(APPLET(man, BB_DIR_USR_BIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_MAN) += man.o + //usage:#define man_trivial_usage //usage: "[-aw] [MANPAGE]..." //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 @@ //config: help //config: The poor man's minicom utility for chatting with serial port devices. +//applet:IF_MICROCOM(APPLET(microcom, BB_DIR_USR_BIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_MICROCOM) += microcom.o + //usage:#define microcom_trivial_usage //usage: "[-d DELAY] [-t TIMEOUT] [-s SPEED] [-X] TTY" //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 @@ //config: help //config: mountpoint checks if the directory is a mountpoint. +//applet:IF_MOUNTPOINT(APPLET(mountpoint, BB_DIR_BIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_MOUNTPOINT) += mountpoint.o + //usage:#define mountpoint_trivial_usage //usage: "[-q] <[-dn] DIR | -x DEVICE>" //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 @@ //config: to advance or rewind a tape past a specified number of archive //config: files on the tape. +//applet:IF_MT(APPLET(mt, BB_DIR_BIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_MT) += mt.o + //usage:#define mt_trivial_usage //usage: "[-f device] opcode value" //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 @@ //config: raidautorun tells the kernel md driver to //config: search and start RAID arrays. +//applet:IF_RAIDAUTORUN(APPLET(raidautorun, BB_DIR_SBIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_RAIDAUTORUN) += raidautorun.o + //usage:#define raidautorun_trivial_usage //usage: "DEVICE" //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 @@ //config: As readahead(2) blocks until each file has been read, it is best to //config: run this applet as a background job. +//applet:IF_READAHEAD(APPLET(readahead, BB_DIR_USR_SBIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_READAHEAD) += readahead.o + //usage:#define readahead_trivial_usage //usage: "[FILE]..." //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 @@ //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. +//applet:IF_RUNLEVEL(APPLET(runlevel, BB_DIR_SBIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_RUNLEVEL) += runlevel.o + //usage:#define runlevel_trivial_usage //usage: "[FILE]" //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 @@ //config: help //config: Receive files using the Xmodem protocol. +//applet:IF_RX(APPLET(rx, BB_DIR_USR_BIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_RX) += rx.o + //usage:#define rx_trivial_usage //usage: "FILE" //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 @@ //config: help //config: setsid runs a program in a new session +//applet:IF_SETSID(APPLET(setsid, BB_DIR_USR_BIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_SETSID) += setsid.o + //usage:#define setsid_trivial_usage //usage: "[-c] PROG ARGS" //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 @@ //config: strings prints the printable character sequences for each file //config: specified. +//applet:IF_STRINGS(APPLET(strings, BB_DIR_USR_BIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_STRINGS) += strings.o + //usage:#define strings_trivial_usage //usage: "[-fo] [-t o/d/x] [-n LEN] [FILE]..." //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 @@ //config: When the command finishes, time writes a message to standard output //config: giving timing statistics about this program run. +//applet:IF_TIME(APPLET(time, BB_DIR_USR_BIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_TIME) += time.o + //usage:#define time_trivial_usage //usage: "[-v] PROG ARGS" //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 @@ //config: Runs a program and watches it. If it does not terminate in //config: specified number of seconds, it is sent a signal. +//applet:IF_TIMEOUT(APPLET(timeout, BB_DIR_USR_BIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_TIMEOUT) += timeout.o + //usage:#define timeout_trivial_usage //usage: "[-t SECS] [-s SIG] PROG ARGS" //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 @@ //config: error, but returns default 80x24. //config: Usage in shell scripts: width=`ttysize w`. +//applet:IF_TTYSIZE(APPLET(ttysize, BB_DIR_USR_BIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_TTYSIZE) += ttysize.o + //usage:#define ttysize_trivial_usage //usage: "[w] [h]" //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 @@ //config: help //config: Prints a CD-ROM volume name. +//applet:IF_VOLNAME(APPLET(volname, BB_DIR_USR_BIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_VOLNAME) += volname.o + //usage:#define volname_trivial_usage //usage: "[DEVICE]" //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 @@ //config: certain amount of time, the watchdog device assumes the system has //config: hung, and will cause the hardware to reboot. +//applet:IF_WATCHDOG(APPLET(watchdog, BB_DIR_SBIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_WATCHDOG) += watchdog.o + //usage:#define watchdog_trivial_usage //usage: "[-t N[ms]] [-T N[ms]] [-F] DEV" //usage:#define watchdog_full_usage "\n\n" -- cgit v1.2.3