Convert all miscutils/* applets to "new style" applet definitions
authorDenys Vlasenko <vda.linux@googlemail.com>
Tue, 22 Nov 2016 22:54:17 +0000 (23:54 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Tue, 22 Nov 2016 22:54:17 +0000 (23:54 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
37 files changed:
include/applets.src.h
miscutils/Kbuild.src
miscutils/adjtimex.c
miscutils/bbconfig.c
miscutils/beep.c
miscutils/chat.c
miscutils/chrt.c
miscutils/crontab.c
miscutils/dc.c
miscutils/devfsd.c
miscutils/devmem.c
miscutils/eject.c
miscutils/fbsplash.c
miscutils/flash_eraseall.c
miscutils/flash_lock_unlock.c
miscutils/flashcp.c
miscutils/hdparm.c
miscutils/inotifyd.c
miscutils/ionice.c
miscutils/last.c
miscutils/less.c
miscutils/makedevs.c
miscutils/man.c
miscutils/microcom.c
miscutils/mountpoint.c
miscutils/mt.c
miscutils/raidautorun.c
miscutils/readahead.c
miscutils/runlevel.c
miscutils/rx.c
miscutils/setsid.c
miscutils/strings.c
miscutils/time.c
miscutils/timeout.c
miscutils/ttysize.c
miscutils/volname.c
miscutils/watchdog.c

index f834d9040a0f80640bb3a49bcff643c01d0e7e46..5eaa5cbb89a579bdc8ed31f9131c3145acb7abe4 100644 (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))
index 503f549047b660cd872ad0f74a112aadfd3a9b92..60848ffc1724c8ad9a471d4342bbab7e6d7623f1 100644 (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
index f9d7c949dead93203a2a3a4fb42aa1d9adcbec2f..6355cc1efe57317c36ad721a7af667b1613965d7 100644 (file)
 //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"
index 8a709f9d3929c0dc78dff47f217875af8aac73f8..4781a42763d0483fe64be15fd46afabb9e7649b9 100644 (file)
 //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"
index f6fa8348dfe517c81c0e19fb7a97e8825e92ebad..14802b543fadc96290fe11991ec2d9af3c7fc7a2 100644 (file)
 //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"
index 92a23441c09c278e515c8378d2e542a184da8871..dc85f82fbaab219cdd556237045b69f46b28d18e 100644 (file)
 //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"
index d76c0d152c24fd49a032cb625fd90d1dc8e8d97e..1604a689069ee16f91f40f021f0c85240baa91b7 100644 (file)
 //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"
index bcd2eab33b76ae81f1d76634ea4213946cf38587..bcd424578c8671262e22f10505087c75df564aa1 100644 (file)
 //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"
index 2b77cd6148c8afa42bfa076a38685ba3509ce6bc..7986fef5fc6e9827022520da2ec17bbf0ba2567c 100644 (file)
 //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:
index 361f3666fd6e17b641e8ac61ec91dcc992a4b43c..99bdc72b8714093a48b7610c2d96aead04f038dc 100644 (file)
 //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"
index dd6574e935b5de0b322e97fcc8ae661c37f60908..aeb32b13afbcc1a1c865bab5d51587cf835b3452 100644 (file)
 //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"
index d271066adefa1e01b3b29739c4a09faed960df14..667932f6ca612ba87eba1d85a8c01a82681782e2 100644 (file)
 //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"
index 93fd9412b366255e74cd0a5c16fe7ddf5fe8bbc7..fc6c9b9532fb4d55f286a97d9ff04b7378f79277 100644 (file)
 //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"
index 08ec44e0c044bc671c87af7843567c95ad6aecd3..2a9bd6cfefbcd1a50141cd70cbfd9609ce976b58 100644 (file)
 //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"
index 287abaafd33afbc9a7104e4a92b1b79a8aa53ec0..2f698641f4b5dc2506387383474f0bbae49e4e66 100644 (file)
 //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"
index 6cbf455ffdc82307b9d5da7c425c901c1776be61..4bbc67727cb3b70c6dfc2063f63e76b17631a70e 100644 (file)
 //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"
index 06311ccf7b8ae1116904850f21fe9eee2441b5e8..e43a0dec28419cf2657aa3fd0729dca760ae6ba5 100644 (file)
 //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"
index ffac8b9586304ea39b4846ddd0b33e486bec7df1..601df64650ef1c68c730c409541b6dcc4d795641 100644 (file)
 //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"
index 1e1a5861c4e99fa184039d0229748ab34c9a7ccf..c54b3a6e14371ea56ea46edb633e10f0a3b701d8 100644 (file)
 //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"
index 2b7060c53d458ee4a0726f13549610010692e88e..67c1343f10c421dad7f16da94a2fb964698718ba 100644 (file)
 //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"
index 61acfdcb5045c06ae69b885f9c8d78f73c6dce6a..e90691b49090b21e5755f260cb3070ca38797e65 100644 (file)
 //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]..."
index cbdb0e3a1725d921e5dbbca86abcf370e8dce0dd..6278ee77cf2dd66f0992899dbd0feb5ca6dd1b5e 100644 (file)
 //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]"
index cded6ebeea892a6476232a83d07d7a631af3d36f..6a636f1ecdbb267dd4c19db49e2a8d5c709b984f 100644 (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"
index c6ba476dbd56d8db82e23aef405f3b91487aa4a6..04605d883a83e9802e65890290422c635d1cd9d8 100644 (file)
 //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"
index 12af2ca9a132dd5d670fd28aabc01b85325c5060..8b9e1d779d6fdd6cf79bc961b9609c0b3c9d9382 100644 (file)
 //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"
index 75a09b662a519c5af9bf6319e78480a84aa181a5..6b31696757d796780fb019cb79047affa329e1af 100644 (file)
 //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"
index 578b2cf526c010122c3867eaf3c9a1dd01a06a09..c6d8e6235478c3264bcde71d452b7d795b63f8d3 100644 (file)
 //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"
index 0b502f88cdcac7befe03cd18e8debd23f7378e05..b8e9b257f0c48ad47bbfa4debc774c3f41811d8a 100644 (file)
 //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"
index 7c07a72e2ea403044032e0966ea401173a85c12c..b6412a6ea4ddbd86bb89bb6cba840d38e920794f 100644 (file)
 //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"
index 359ad50463cdff190b645cb3b786e50999e63a5e..7fca8e36b911555ee041a27a8e68a5aaeab9a722 100644 (file)
 //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"
index f0ec04a0b47e86b3bca31257e976a0a2e89bf688..143a8f8fa60e317fdb59a0a85f18042d6c78406a 100644 (file)
 //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"
index d0e6379871206d3b6314e4a445b053251fe8f75f..4d9bfe6901cd96f15db6daacd37b36ea10cb37b7 100644 (file)
 //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"
index 90d2ab67c2e14ce938ae2f65134590525a8d2e7a..a73a837d8f78a3a70b307abfca928f633f51bd53 100644 (file)
 //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"
index 4d598ead2d2ac1bfa45b71e833d8111712f22d28..f29dc8a9ced4da02addaa8d1fc90fcf8e9294d9c 100644 (file)
 //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"
index a63b731d25b70b5b9b13a5f82cb8a2d7563840f0..135ce853524389f6cbc63c9e886071f66002e50a 100644 (file)
 //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"
index 855f2206a171fae7ca08f3ae875a2331bd4f8103..6d1addbb523cd800c7cb0a1ac3c6e17686131aba 100644 (file)
 //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"
index 7a743ef1b8965a63da5633d70e257999a8075ef6..07ae64e52afbae01f090a6e7c01d6b34018b84bb 100644 (file)
 //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"