Convert all miscutils/* applets to "new style" applet definitions

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2016-11-22 23:54:17 +01:00
parent fb4da16711
commit f88e3bfa8d
37 changed files with 147 additions and 77 deletions

View File

@ -76,37 +76,27 @@ INSERT
IF_TEST(APPLET_NOFORK([, test, BB_DIR_USR_BIN, BB_SUID_DROP, test))
IF_TEST(APPLET_NOFORK([[, test, BB_DIR_USR_BIN, BB_SUID_DROP, test))
IF_ACPID(APPLET(acpid, BB_DIR_SBIN, BB_SUID_DROP))
IF_ADJTIMEX(APPLET(adjtimex, BB_DIR_SBIN, BB_SUID_DROP))
IF_ARP(APPLET(arp, BB_DIR_SBIN, BB_SUID_DROP))
IF_ARPING(APPLET(arping, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_BASENAME(APPLET_NOFORK(basename, basename, BB_DIR_USR_BIN, BB_SUID_DROP, basename))
IF_BBCONFIG(APPLET(bbconfig, BB_DIR_BIN, BB_SUID_DROP))
IF_BEEP(APPLET(beep, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_BLKID(APPLET(blkid, BB_DIR_SBIN, BB_SUID_DROP))
IF_BRCTL(APPLET(brctl, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_CAL(APPLET(cal, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_CAT(APPLET_NOFORK(cat, cat, BB_DIR_BIN, BB_SUID_DROP, cat))
IF_CATV(APPLET(catv, BB_DIR_BIN, BB_SUID_DROP))
IF_CHAT(APPLET(chat, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_CHCON(APPLET(chcon, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_CHGRP(APPLET_NOEXEC(chgrp, chgrp, BB_DIR_BIN, BB_SUID_DROP, chgrp))
IF_CHMOD(APPLET_NOEXEC(chmod, chmod, BB_DIR_BIN, BB_SUID_DROP, chmod))
IF_CHOWN(APPLET_NOEXEC(chown, chown, BB_DIR_BIN, BB_SUID_DROP, chown))
IF_CHROOT(APPLET(chroot, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_CHRT(APPLET(chrt, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_CHVT(APPLET(chvt, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_CKSUM(APPLET_NOEXEC(cksum, cksum, BB_DIR_USR_BIN, BB_SUID_DROP, cksum))
IF_CLEAR(APPLET(clear, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_COMM(APPLET(comm, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_CP(APPLET_NOEXEC(cp, cp, BB_DIR_BIN, BB_SUID_DROP, cp))
/* Needs to be run by root or be suid root - needs to change /var/spool/cron* files: */
IF_CRONTAB(APPLET(crontab, BB_DIR_USR_BIN, BB_SUID_REQUIRE))
IF_CUT(APPLET_NOEXEC(cut, cut, BB_DIR_USR_BIN, BB_SUID_DROP, cut))
IF_DC(APPLET(dc, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_DD(APPLET_NOEXEC(dd, dd, BB_DIR_BIN, BB_SUID_DROP, dd))
IF_DEALLOCVT(APPLET(deallocvt, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_DEVFSD(APPLET(devfsd, BB_DIR_SBIN, BB_SUID_DROP))
IF_DEVMEM(APPLET(devmem, BB_DIR_SBIN, BB_SUID_DROP))
IF_DF(APPLET(df, BB_DIR_BIN, BB_SUID_DROP))
IF_DHCPRELAY(APPLET(dhcprelay, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_DIRNAME(APPLET_NOFORK(dirname, dirname, BB_DIR_USR_BIN, BB_SUID_DROP, dirname))
@ -119,7 +109,6 @@ IF_DUMPLEASES(APPLET(dumpleases, BB_DIR_USR_BIN, BB_SUID_DROP))
//IF_E2FSCK(APPLET(e2fsck, BB_DIR_SBIN, BB_SUID_DROP))
//IF_E2LABEL(APPLET_ODDNAME(e2label, tune2fs, BB_DIR_SBIN, BB_SUID_DROP, e2label))
IF_ECHO(APPLET_NOFORK(echo, echo, BB_DIR_BIN, BB_SUID_DROP, echo))
IF_EJECT(APPLET(eject, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_ENV(APPLET_NOEXEC(env, env, BB_DIR_USR_BIN, BB_SUID_DROP, env))
IF_ETHER_WAKE(APPLET_ODDNAME(ether-wake, ether_wake, BB_DIR_USR_SBIN, BB_SUID_DROP, ether_wake))
IF_EXPAND(APPLET(expand, BB_DIR_USR_BIN, BB_SUID_DROP))
@ -127,17 +116,12 @@ IF_EXPR(APPLET(expr, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_FAKEIDENTD(APPLET(fakeidentd, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_FALSE(APPLET_NOFORK(false, false, BB_DIR_BIN, BB_SUID_DROP, false))
IF_FBSET(APPLET(fbset, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_FBSPLASH(APPLET(fbsplash, BB_DIR_SBIN, BB_SUID_DROP))
IF_FDFLUSH(APPLET_ODDNAME(fdflush, freeramdisk, BB_DIR_BIN, BB_SUID_DROP, fdflush))
IF_FDFORMAT(APPLET(fdformat, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_FDISK(APPLET(fdisk, BB_DIR_SBIN, BB_SUID_DROP))
IF_FGCONSOLE(APPLET(fgconsole, BB_DIR_USR_BIN, BB_SUID_DROP))
/* Benefits from suid root: better access to /dev/BLOCKDEVs: */
IF_FINDFS(APPLET(findfs, BB_DIR_SBIN, BB_SUID_MAYBE))
IF_FLASH_ERASEALL(APPLET(flash_eraseall, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_FLASH_LOCK(APPLET_ODDNAME(flash_lock, flash_lock_unlock, BB_DIR_USR_SBIN, BB_SUID_DROP, flash_lock))
IF_FLASH_UNLOCK(APPLET_ODDNAME(flash_unlock, flash_lock_unlock, BB_DIR_USR_SBIN, BB_SUID_DROP, flash_unlock))
IF_FLASHCP(APPLET(flashcp, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_FLOCK(APPLET(flock, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_FOLD(APPLET_NOEXEC(fold, fold, BB_DIR_USR_BIN, BB_SUID_DROP, fold))
IF_FREE(APPLET(free, BB_DIR_USR_BIN, BB_SUID_DROP))
@ -154,7 +138,6 @@ IF_GETENFORCE(APPLET(getenforce, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_GETOPT(APPLET(getopt, BB_DIR_BIN, BB_SUID_DROP))
IF_GETSEBOOL(APPLET(getsebool, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_HD(APPLET_NOEXEC(hd, hexdump, BB_DIR_USR_BIN, BB_SUID_DROP, hd))
IF_HDPARM(APPLET(hdparm, BB_DIR_SBIN, BB_SUID_DROP))
IF_HEAD(APPLET_NOEXEC(head, head, BB_DIR_USR_BIN, BB_SUID_DROP, head))
IF_HEXDUMP(APPLET_NOEXEC(hexdump, hexdump, BB_DIR_USR_BIN, BB_SUID_DROP, hexdump))
IF_HTTPD(APPLET(httpd, BB_DIR_USR_SBIN, BB_SUID_DROP))
@ -163,9 +146,7 @@ IF_IFCONFIG(APPLET(ifconfig, BB_DIR_SBIN, BB_SUID_DROP))
IF_IFENSLAVE(APPLET(ifenslave, BB_DIR_SBIN, BB_SUID_DROP))
IF_IFPLUGD(APPLET(ifplugd, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_INETD(APPLET(inetd, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_INOTIFYD(APPLET(inotifyd, BB_DIR_SBIN, BB_SUID_DROP))
IF_INSTALL(APPLET(install, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_IONICE(APPLET(ionice, BB_DIR_BIN, BB_SUID_DROP))
#if ENABLE_FEATURE_IP_ADDRESS \
|| ENABLE_FEATURE_IP_ROUTE \
|| ENABLE_FEATURE_IP_LINK \
@ -185,9 +166,7 @@ IF_KBD_MODE(APPLET(kbd_mode, BB_DIR_BIN, BB_SUID_DROP))
IF_KILL(APPLET(kill, BB_DIR_BIN, BB_SUID_DROP))
IF_KILLALL(APPLET_ODDNAME(killall, kill, BB_DIR_USR_BIN, BB_SUID_DROP, killall))
IF_KILLALL5(APPLET_ODDNAME(killall5, kill, BB_DIR_USR_SBIN, BB_SUID_DROP, killall5))
IF_LAST(APPLET(last, BB_DIR_USR_BIN, BB_SUID_DROP))
//IF_LENGTH(APPLET_NOFORK(length, length, BB_DIR_USR_BIN, BB_SUID_DROP, length))
IF_LESS(APPLET(less, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_LN(APPLET_NOEXEC(ln, ln, BB_DIR_BIN, BB_SUID_DROP, ln))
IF_LOAD_POLICY(APPLET(load_policy, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_LOADFONT(APPLET(loadfont, BB_DIR_USR_SBIN, BB_SUID_DROP))
@ -197,11 +176,8 @@ IF_LOSETUP(APPLET(losetup, BB_DIR_SBIN, BB_SUID_DROP))
IF_LS(APPLET_NOEXEC(ls, ls, BB_DIR_BIN, BB_SUID_DROP, ls))
IF_LSPCI(APPLET(lspci, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_LSUSB(APPLET(lsusb, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_MAKEDEVS(APPLET(makedevs, BB_DIR_SBIN, BB_SUID_DROP))
IF_MAKEMIME(APPLET(makemime, BB_DIR_BIN, BB_SUID_DROP))
IF_MAN(APPLET(man, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_MATCHPATHCON(APPLET(matchpathcon, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_MICROCOM(APPLET(microcom, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_MKDIR(APPLET_NOFORK(mkdir, mkdir, BB_DIR_BIN, BB_SUID_DROP, mkdir))
IF_MKFIFO(APPLET_NOEXEC(mkfifo, mkfifo, BB_DIR_USR_BIN, BB_SUID_DROP, mkfifo))
IF_MKFS_MINIX(APPLET_ODDNAME(mkfs.minix, mkfs_minix, BB_DIR_SBIN, BB_SUID_DROP, mkfs_minix))
@ -214,8 +190,6 @@ IF_MORE(APPLET(more, BB_DIR_BIN, BB_SUID_DROP))
* for viewing mount table.
* Therefore we use BB_SUID_MAYBE instead of BB_SUID_REQUIRE: */
IF_MOUNT(APPLET(mount, BB_DIR_BIN, IF_DESKTOP(BB_SUID_MAYBE) IF_NOT_DESKTOP(BB_SUID_DROP)))
IF_MOUNTPOINT(APPLET(mountpoint, BB_DIR_BIN, BB_SUID_DROP))
IF_MT(APPLET(mt, BB_DIR_BIN, BB_SUID_DROP))
IF_MV(APPLET(mv, BB_DIR_BIN, BB_SUID_DROP))
IF_NAMEIF(APPLET(nameif, BB_DIR_SBIN, BB_SUID_DROP))
IF_NC(APPLET(nc, BB_DIR_USR_BIN, BB_SUID_DROP))
@ -237,10 +211,8 @@ IF_PRINTF(APPLET_NOFORK(printf, printf, BB_DIR_USR_BIN, BB_SUID_DROP, printf))
IF_PS(APPLET(ps, BB_DIR_BIN, BB_SUID_DROP))
IF_PSCAN(APPLET(pscan, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_PWD(APPLET_NOFORK(pwd, pwd, BB_DIR_BIN, BB_SUID_DROP, pwd))
IF_RAIDAUTORUN(APPLET(raidautorun, BB_DIR_SBIN, BB_SUID_DROP))
IF_RDATE(APPLET(rdate, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_RDEV(APPLET(rdev, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_READAHEAD(APPLET(readahead, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_READLINK(APPLET(readlink, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_READPROFILE(APPLET(readprofile, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_REALPATH(APPLET(realpath, BB_DIR_USR_BIN, BB_SUID_DROP))
@ -254,8 +226,6 @@ IF_RMDIR(APPLET_NOFORK(rmdir, rmdir, BB_DIR_BIN, BB_SUID_DROP, rmdir))
IF_ROUTE(APPLET(route, BB_DIR_SBIN, BB_SUID_DROP))
IF_RTCWAKE(APPLET(rtcwake, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_RUNCON(APPLET(runcon, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_RUNLEVEL(APPLET(runlevel, BB_DIR_SBIN, BB_SUID_DROP))
IF_RX(APPLET(rx, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_SCRIPT(APPLET(script, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_SCRIPTREPLAY(APPLET(scriptreplay, BB_DIR_BIN, BB_SUID_DROP))
IF_SELINUXENABLED(APPLET(selinuxenabled, BB_DIR_USR_SBIN, BB_SUID_DROP))
@ -269,7 +239,6 @@ IF_SETFONT(APPLET(setfont, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_SETKEYCODES(APPLET(setkeycodes, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_SETLOGCONS(APPLET(setlogcons, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_SETSEBOOL(APPLET(setsebool, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_SETSID(APPLET(setsid, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_SHOWKEY(APPLET(showkey, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_SLATTACH(APPLET(slattach, BB_DIR_SBIN, BB_SUID_DROP))
/* Do not make this applet NOFORK. It breaks ^C-ing of pauses in shells: */
@ -277,7 +246,6 @@ IF_SLEEP(APPLET(sleep, BB_DIR_BIN, BB_SUID_DROP))
IF_SORT(APPLET_NOEXEC(sort, sort, BB_DIR_USR_BIN, BB_SUID_DROP, sort))
IF_SPLIT(APPLET(split, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_STAT(APPLET(stat, BB_DIR_BIN, BB_SUID_DROP))
IF_STRINGS(APPLET(strings, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_STTY(APPLET(stty, BB_DIR_BIN, BB_SUID_DROP))
IF_SUM(APPLET(sum, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_SWITCH_ROOT(APPLET(switch_root, BB_DIR_SBIN, BB_SUID_DROP))
@ -294,8 +262,6 @@ IF_TEST(APPLET_NOFORK(test, test, BB_DIR_USR_BIN, BB_SUID_DROP, test))
IF_TFTP(APPLET(tftp, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_TFTPD(APPLET(tftpd, BB_DIR_USR_SBIN, BB_SUID_DROP))
#endif
IF_TIME(APPLET(time, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_TIMEOUT(APPLET(timeout, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_TOP(APPLET(top, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_TR(APPLET(tr, BB_DIR_USR_BIN, BB_SUID_DROP))
/* Needs socket(AF_INET, SOCK_RAW, IPPROTO_ICMP), therefore BB_SUID_MAYBE: */
@ -303,7 +269,6 @@ IF_TRACEROUTE(APPLET(traceroute, BB_DIR_USR_BIN, BB_SUID_MAYBE))
IF_TRACEROUTE6(APPLET(traceroute6, BB_DIR_USR_BIN, BB_SUID_MAYBE))
IF_TRUE(APPLET_NOFORK(true, true, BB_DIR_BIN, BB_SUID_DROP, true))
IF_TTY(APPLET(tty, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_TTYSIZE(APPLET(ttysize, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_TUNCTL(APPLET(tunctl, BB_DIR_SBIN, BB_SUID_DROP))
IF_UDHCPC(APPLET(udhcpc, BB_DIR_SBIN, BB_SUID_DROP))
IF_UDHCPD(APPLET(udhcpd, BB_DIR_USR_SBIN, BB_SUID_DROP))
@ -318,9 +283,7 @@ IF_USLEEP(APPLET_NOFORK(usleep, usleep, BB_DIR_BIN, BB_SUID_DROP, usleep))
IF_UUDECODE(APPLET(uudecode, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_UUENCODE(APPLET(uuencode, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_VCONFIG(APPLET(vconfig, BB_DIR_SBIN, BB_SUID_DROP))
IF_VOLNAME(APPLET(volname, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_WATCH(APPLET(watch, BB_DIR_BIN, BB_SUID_DROP))
IF_WATCHDOG(APPLET(watchdog, BB_DIR_SBIN, BB_SUID_DROP))
IF_WC(APPLET(wc, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_WHOAMI(APPLET_NOFORK(whoami, whoami, BB_DIR_USR_BIN, BB_SUID_DROP, whoami))
IF_YES(APPLET_NOFORK(yes, yes, BB_DIR_USR_BIN, BB_SUID_DROP, yes))

View File

@ -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

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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:

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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]..."

View File

@ -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]"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"