aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/applets.src.h54
-rw-r--r--include/busybox.h7
-rw-r--r--include/libbb.h27
-rw-r--r--include/platform.h4
-rw-r--r--include/usage.src.h406
5 files changed, 122 insertions, 376 deletions
diff --git a/include/applets.src.h b/include/applets.src.h
index 0e4f966de..879dbf760 100644
--- a/include/applets.src.h
+++ b/include/applets.src.h
@@ -56,11 +56,6 @@ s - suid type:
56# define APPLET_NOFORK(name,main,l,s,name2) { #name, #main, l, s, 1, 1 }, 56# define APPLET_NOFORK(name,main,l,s,name2) { #name, #main, l, s, 1, 1 },
57#endif 57#endif
58 58
59#if ENABLE_INSTALL_NO_USR
60# define _BB_DIR_USR_BIN _BB_DIR_BIN
61# define _BB_DIR_USR_SBIN _BB_DIR_SBIN
62#endif
63
64 59
65INSERT 60INSERT
66IF_TEST(APPLET_NOFORK([, test, _BB_DIR_USR_BIN, _BB_SUID_DROP, test)) 61IF_TEST(APPLET_NOFORK([, test, _BB_DIR_USR_BIN, _BB_SUID_DROP, test))
@@ -77,7 +72,6 @@ IF_BASENAME(APPLET_NOFORK(basename, basename, _BB_DIR_USR_BIN, _BB_SUID_DROP, ba
77IF_BBCONFIG(APPLET(bbconfig, _BB_DIR_BIN, _BB_SUID_DROP)) 72IF_BBCONFIG(APPLET(bbconfig, _BB_DIR_BIN, _BB_SUID_DROP))
78IF_BEEP(APPLET(beep, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 73IF_BEEP(APPLET(beep, _BB_DIR_USR_BIN, _BB_SUID_DROP))
79IF_BLKID(APPLET(blkid, _BB_DIR_SBIN, _BB_SUID_DROP)) 74IF_BLKID(APPLET(blkid, _BB_DIR_SBIN, _BB_SUID_DROP))
80IF_BOOTCHARTD(APPLET(bootchartd, _BB_DIR_SBIN, _BB_SUID_DROP))
81IF_BRCTL(APPLET(brctl, _BB_DIR_USR_SBIN, _BB_SUID_DROP)) 75IF_BRCTL(APPLET(brctl, _BB_DIR_USR_SBIN, _BB_SUID_DROP))
82IF_BZIP2(APPLET(bzip2, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 76IF_BZIP2(APPLET(bzip2, _BB_DIR_USR_BIN, _BB_SUID_DROP))
83IF_CAL(APPLET(cal, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 77IF_CAL(APPLET(cal, _BB_DIR_USR_BIN, _BB_SUID_DROP))
@@ -94,7 +88,7 @@ IF_CHPST(APPLET(chpst, _BB_DIR_USR_BIN, _BB_SUID_DROP))
94IF_CHROOT(APPLET(chroot, _BB_DIR_USR_SBIN, _BB_SUID_DROP)) 88IF_CHROOT(APPLET(chroot, _BB_DIR_USR_SBIN, _BB_SUID_DROP))
95IF_CHRT(APPLET(chrt, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 89IF_CHRT(APPLET(chrt, _BB_DIR_USR_BIN, _BB_SUID_DROP))
96IF_CHVT(APPLET(chvt, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 90IF_CHVT(APPLET(chvt, _BB_DIR_USR_BIN, _BB_SUID_DROP))
97IF_CKSUM(APPLET(cksum, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 91IF_CKSUM(APPLET_NOEXEC(cksum, cksum, _BB_DIR_USR_BIN, _BB_SUID_DROP, cksum))
98IF_CLEAR(APPLET(clear, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 92IF_CLEAR(APPLET(clear, _BB_DIR_USR_BIN, _BB_SUID_DROP))
99IF_CMP(APPLET(cmp, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 93IF_CMP(APPLET(cmp, _BB_DIR_USR_BIN, _BB_SUID_DROP))
100IF_COMM(APPLET(comm, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 94IF_COMM(APPLET(comm, _BB_DIR_USR_BIN, _BB_SUID_DROP))
@@ -104,14 +98,11 @@ IF_CROND(APPLET(crond, _BB_DIR_USR_SBIN, _BB_SUID_DROP))
104IF_CRONTAB(APPLET(crontab, _BB_DIR_USR_BIN, _BB_SUID_REQUIRE)) 98IF_CRONTAB(APPLET(crontab, _BB_DIR_USR_BIN, _BB_SUID_REQUIRE))
105IF_CRYPTPW(APPLET(cryptpw, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 99IF_CRYPTPW(APPLET(cryptpw, _BB_DIR_USR_BIN, _BB_SUID_DROP))
106IF_CUT(APPLET_NOEXEC(cut, cut, _BB_DIR_USR_BIN, _BB_SUID_DROP, cut)) 100IF_CUT(APPLET_NOEXEC(cut, cut, _BB_DIR_USR_BIN, _BB_SUID_DROP, cut))
107IF_DATE(APPLET(date, _BB_DIR_BIN, _BB_SUID_DROP))
108IF_DC(APPLET(dc, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 101IF_DC(APPLET(dc, _BB_DIR_USR_BIN, _BB_SUID_DROP))
109IF_DD(APPLET_NOEXEC(dd, dd, _BB_DIR_BIN, _BB_SUID_DROP, dd)) 102IF_DD(APPLET_NOEXEC(dd, dd, _BB_DIR_BIN, _BB_SUID_DROP, dd))
110IF_DEALLOCVT(APPLET(deallocvt, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 103IF_DEALLOCVT(APPLET(deallocvt, _BB_DIR_USR_BIN, _BB_SUID_DROP))
111IF_DELGROUP(APPLET_ODDNAME(delgroup, deluser, _BB_DIR_BIN, _BB_SUID_DROP, delgroup)) 104IF_DELGROUP(APPLET_ODDNAME(delgroup, deluser, _BB_DIR_BIN, _BB_SUID_DROP, delgroup))
112IF_DELUSER(APPLET(deluser, _BB_DIR_BIN, _BB_SUID_DROP)) 105IF_DELUSER(APPLET(deluser, _BB_DIR_BIN, _BB_SUID_DROP))
113IF_DEPMOD(APPLET(depmod, _BB_DIR_SBIN, _BB_SUID_DROP))
114IF_MODPROBE_SMALL(APPLET_ODDNAME(depmod, modprobe, _BB_DIR_SBIN, _BB_SUID_DROP, modprobe))
115IF_DEVFSD(APPLET(devfsd, _BB_DIR_SBIN, _BB_SUID_DROP)) 106IF_DEVFSD(APPLET(devfsd, _BB_DIR_SBIN, _BB_SUID_DROP))
116IF_DEVMEM(APPLET(devmem, _BB_DIR_SBIN, _BB_SUID_DROP)) 107IF_DEVMEM(APPLET(devmem, _BB_DIR_SBIN, _BB_SUID_DROP))
117IF_DF(APPLET(df, _BB_DIR_BIN, _BB_SUID_DROP)) 108IF_DF(APPLET(df, _BB_DIR_BIN, _BB_SUID_DROP))
@@ -121,7 +112,7 @@ IF_DIRNAME(APPLET_NOFORK(dirname, dirname, _BB_DIR_USR_BIN, _BB_SUID_DROP, dirna
121IF_DMESG(APPLET(dmesg, _BB_DIR_BIN, _BB_SUID_DROP)) 112IF_DMESG(APPLET(dmesg, _BB_DIR_BIN, _BB_SUID_DROP))
122IF_DNSD(APPLET(dnsd, _BB_DIR_USR_SBIN, _BB_SUID_REQUIRE)) 113IF_DNSD(APPLET(dnsd, _BB_DIR_USR_SBIN, _BB_SUID_REQUIRE))
123IF_HOSTNAME(APPLET_ODDNAME(dnsdomainname, hostname, _BB_DIR_BIN, _BB_SUID_DROP, dnsdomainname)) 114IF_HOSTNAME(APPLET_ODDNAME(dnsdomainname, hostname, _BB_DIR_BIN, _BB_SUID_DROP, dnsdomainname))
124IF_DOS2UNIX(APPLET(dos2unix, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 115IF_DOS2UNIX(APPLET_NOEXEC(dos2unix, dos2unix, _BB_DIR_USR_BIN, _BB_SUID_DROP, dos2unix))
125IF_DPKG(APPLET(dpkg, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 116IF_DPKG(APPLET(dpkg, _BB_DIR_USR_BIN, _BB_SUID_DROP))
126IF_DPKG_DEB(APPLET_ODDNAME(dpkg-deb, dpkg_deb, _BB_DIR_USR_BIN, _BB_SUID_DROP, dpkg_deb)) 117IF_DPKG_DEB(APPLET_ODDNAME(dpkg-deb, dpkg_deb, _BB_DIR_USR_BIN, _BB_SUID_DROP, dpkg_deb))
127IF_DU(APPLET(du, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 118IF_DU(APPLET(du, _BB_DIR_USR_BIN, _BB_SUID_DROP))
@@ -152,7 +143,7 @@ IF_FLASH_LOCK(APPLET_ODDNAME(flash_lock, flash_lock_unlock, _BB_DIR_USR_SBIN, _B
152IF_FLASH_UNLOCK(APPLET_ODDNAME(flash_unlock, flash_lock_unlock, _BB_DIR_USR_SBIN, _BB_SUID_DROP, flash_unlock)) 143IF_FLASH_UNLOCK(APPLET_ODDNAME(flash_unlock, flash_lock_unlock, _BB_DIR_USR_SBIN, _BB_SUID_DROP, flash_unlock))
153IF_FLASHCP(APPLET(flashcp, _BB_DIR_USR_SBIN, _BB_SUID_DROP)) 144IF_FLASHCP(APPLET(flashcp, _BB_DIR_USR_SBIN, _BB_SUID_DROP))
154IF_FLOCK(APPLET(flock, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 145IF_FLOCK(APPLET(flock, _BB_DIR_USR_BIN, _BB_SUID_DROP))
155IF_FOLD(APPLET(fold, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 146IF_FOLD(APPLET_NOEXEC(fold, fold, _BB_DIR_USR_BIN, _BB_SUID_DROP, fold))
156IF_FREE(APPLET(free, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 147IF_FREE(APPLET(free, _BB_DIR_USR_BIN, _BB_SUID_DROP))
157IF_FREERAMDISK(APPLET(freeramdisk, _BB_DIR_SBIN, _BB_SUID_DROP)) 148IF_FREERAMDISK(APPLET(freeramdisk, _BB_DIR_SBIN, _BB_SUID_DROP))
158IF_FSCK(APPLET(fsck, _BB_DIR_SBIN, _BB_SUID_DROP)) 149IF_FSCK(APPLET(fsck, _BB_DIR_SBIN, _BB_SUID_DROP))
@@ -170,26 +161,22 @@ IF_GETSEBOOL(APPLET(getsebool, _BB_DIR_USR_SBIN, _BB_SUID_DROP))
170IF_GETTY(APPLET(getty, _BB_DIR_SBIN, _BB_SUID_DROP)) 161IF_GETTY(APPLET(getty, _BB_DIR_SBIN, _BB_SUID_DROP))
171IF_GUNZIP(APPLET(gunzip, _BB_DIR_BIN, _BB_SUID_DROP)) 162IF_GUNZIP(APPLET(gunzip, _BB_DIR_BIN, _BB_SUID_DROP))
172IF_GZIP(APPLET(gzip, _BB_DIR_BIN, _BB_SUID_DROP)) 163IF_GZIP(APPLET(gzip, _BB_DIR_BIN, _BB_SUID_DROP))
173IF_HALT(APPLET(halt, _BB_DIR_SBIN, _BB_SUID_DROP))
174IF_HD(APPLET_NOEXEC(hd, hexdump, _BB_DIR_USR_BIN, _BB_SUID_DROP, hd)) 164IF_HD(APPLET_NOEXEC(hd, hexdump, _BB_DIR_USR_BIN, _BB_SUID_DROP, hd))
175IF_HDPARM(APPLET(hdparm, _BB_DIR_SBIN, _BB_SUID_DROP)) 165IF_HDPARM(APPLET(hdparm, _BB_DIR_SBIN, _BB_SUID_DROP))
176IF_HEAD(APPLET(head, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 166IF_HEAD(APPLET_NOEXEC(head, head, _BB_DIR_USR_BIN, _BB_SUID_DROP, head))
177IF_HEXDUMP(APPLET_NOEXEC(hexdump, hexdump, _BB_DIR_USR_BIN, _BB_SUID_DROP, hexdump)) 167IF_HEXDUMP(APPLET_NOEXEC(hexdump, hexdump, _BB_DIR_USR_BIN, _BB_SUID_DROP, hexdump))
178IF_HOSTID(APPLET_NOFORK(hostid, hostid, _BB_DIR_USR_BIN, _BB_SUID_DROP, hostid)) 168IF_HOSTID(APPLET_NOFORK(hostid, hostid, _BB_DIR_USR_BIN, _BB_SUID_DROP, hostid))
179IF_HOSTNAME(APPLET(hostname, _BB_DIR_BIN, _BB_SUID_DROP)) 169IF_HOSTNAME(APPLET(hostname, _BB_DIR_BIN, _BB_SUID_DROP))
180IF_HTTPD(APPLET(httpd, _BB_DIR_USR_SBIN, _BB_SUID_DROP)) 170IF_HTTPD(APPLET(httpd, _BB_DIR_USR_SBIN, _BB_SUID_DROP))
181IF_HWCLOCK(APPLET(hwclock, _BB_DIR_SBIN, _BB_SUID_DROP)) 171IF_HWCLOCK(APPLET(hwclock, _BB_DIR_SBIN, _BB_SUID_DROP))
182IF_ID(APPLET(id, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 172IF_ID(APPLET_NOEXEC(id, id, _BB_DIR_USR_BIN, _BB_SUID_DROP, id))
183IF_IFCONFIG(APPLET(ifconfig, _BB_DIR_SBIN, _BB_SUID_DROP)) 173IF_IFCONFIG(APPLET(ifconfig, _BB_DIR_SBIN, _BB_SUID_DROP))
184IF_IFUPDOWN(APPLET_ODDNAME(ifdown, ifupdown, _BB_DIR_SBIN, _BB_SUID_DROP, ifdown)) 174IF_IFUPDOWN(APPLET_ODDNAME(ifdown, ifupdown, _BB_DIR_SBIN, _BB_SUID_DROP, ifdown))
185IF_IFENSLAVE(APPLET(ifenslave, _BB_DIR_SBIN, _BB_SUID_DROP)) 175IF_IFENSLAVE(APPLET(ifenslave, _BB_DIR_SBIN, _BB_SUID_DROP))
186IF_IFPLUGD(APPLET(ifplugd, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 176IF_IFPLUGD(APPLET(ifplugd, _BB_DIR_USR_BIN, _BB_SUID_DROP))
187IF_IFUPDOWN(APPLET_ODDNAME(ifup, ifupdown, _BB_DIR_SBIN, _BB_SUID_DROP, ifup)) 177IF_IFUPDOWN(APPLET_ODDNAME(ifup, ifupdown, _BB_DIR_SBIN, _BB_SUID_DROP, ifup))
188IF_INETD(APPLET(inetd, _BB_DIR_USR_SBIN, _BB_SUID_DROP)) 178IF_INETD(APPLET(inetd, _BB_DIR_USR_SBIN, _BB_SUID_DROP))
189IF_INIT(APPLET(init, _BB_DIR_SBIN, _BB_SUID_DROP))
190IF_INOTIFYD(APPLET(inotifyd, _BB_DIR_SBIN, _BB_SUID_DROP)) 179IF_INOTIFYD(APPLET(inotifyd, _BB_DIR_SBIN, _BB_SUID_DROP))
191IF_INSMOD(APPLET(insmod, _BB_DIR_SBIN, _BB_SUID_DROP))
192IF_MODPROBE_SMALL(APPLET_ODDNAME(insmod, modprobe, _BB_DIR_SBIN, _BB_SUID_DROP, modprobe))
193IF_INSTALL(APPLET(install, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 180IF_INSTALL(APPLET(install, _BB_DIR_USR_BIN, _BB_SUID_DROP))
194IF_IONICE(APPLET(ionice, _BB_DIR_BIN, _BB_SUID_DROP)) 181IF_IONICE(APPLET(ionice, _BB_DIR_BIN, _BB_SUID_DROP))
195#if ENABLE_FEATURE_IP_ADDRESS \ 182#if ENABLE_FEATURE_IP_ADDRESS \
@@ -217,7 +204,6 @@ IF_LENGTH(APPLET_NOFORK(length, length, _BB_DIR_USR_BIN, _BB_SUID_DROP, length))
217IF_LESS(APPLET(less, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 204IF_LESS(APPLET(less, _BB_DIR_USR_BIN, _BB_SUID_DROP))
218IF_SETARCH(APPLET_ODDNAME(linux32, setarch, _BB_DIR_BIN, _BB_SUID_DROP, linux32)) 205IF_SETARCH(APPLET_ODDNAME(linux32, setarch, _BB_DIR_BIN, _BB_SUID_DROP, linux32))
219IF_SETARCH(APPLET_ODDNAME(linux64, setarch, _BB_DIR_BIN, _BB_SUID_DROP, linux64)) 206IF_SETARCH(APPLET_ODDNAME(linux64, setarch, _BB_DIR_BIN, _BB_SUID_DROP, linux64))
220IF_FEATURE_INITRD(APPLET_ODDNAME(linuxrc, init, _BB_DIR_ROOT, _BB_SUID_DROP, linuxrc))
221IF_LN(APPLET_NOEXEC(ln, ln, _BB_DIR_BIN, _BB_SUID_DROP, ln)) 207IF_LN(APPLET_NOEXEC(ln, ln, _BB_DIR_BIN, _BB_SUID_DROP, ln))
222IF_LOAD_POLICY(APPLET(load_policy, _BB_DIR_USR_SBIN, _BB_SUID_DROP)) 208IF_LOAD_POLICY(APPLET(load_policy, _BB_DIR_USR_SBIN, _BB_SUID_DROP))
223IF_LOADFONT(APPLET(loadfont, _BB_DIR_USR_SBIN, _BB_SUID_DROP)) 209IF_LOADFONT(APPLET(loadfont, _BB_DIR_USR_SBIN, _BB_SUID_DROP))
@@ -232,8 +218,6 @@ IF_LPQ(APPLET_ODDNAME(lpq, lpqr, _BB_DIR_USR_BIN, _BB_SUID_DROP, lpq))
232IF_LPR(APPLET_ODDNAME(lpr, lpqr, _BB_DIR_USR_BIN, _BB_SUID_DROP, lpr)) 218IF_LPR(APPLET_ODDNAME(lpr, lpqr, _BB_DIR_USR_BIN, _BB_SUID_DROP, lpr))
233IF_LS(APPLET_NOEXEC(ls, ls, _BB_DIR_BIN, _BB_SUID_DROP, ls)) 219IF_LS(APPLET_NOEXEC(ls, ls, _BB_DIR_BIN, _BB_SUID_DROP, ls))
234IF_LSATTR(APPLET(lsattr, _BB_DIR_BIN, _BB_SUID_DROP)) 220IF_LSATTR(APPLET(lsattr, _BB_DIR_BIN, _BB_SUID_DROP))
235IF_LSMOD(APPLET(lsmod, _BB_DIR_SBIN, _BB_SUID_DROP))
236IF_MODPROBE_SMALL(APPLET_ODDNAME(lsmod, modprobe, _BB_DIR_SBIN, _BB_SUID_DROP, modprobe))
237IF_LSPCI(APPLET(lspci, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 221IF_LSPCI(APPLET(lspci, _BB_DIR_USR_BIN, _BB_SUID_DROP))
238IF_LSUSB(APPLET(lsusb, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 222IF_LSUSB(APPLET(lsusb, _BB_DIR_USR_BIN, _BB_SUID_DROP))
239IF_UNLZMA(APPLET_ODDNAME(lzcat, unlzma, _BB_DIR_USR_BIN, _BB_SUID_DROP, lzcat)) 223IF_UNLZMA(APPLET_ODDNAME(lzcat, unlzma, _BB_DIR_USR_BIN, _BB_SUID_DROP, lzcat))
@@ -244,25 +228,22 @@ IF_MAKEDEVS(APPLET(makedevs, _BB_DIR_SBIN, _BB_SUID_DROP))
244IF_MAKEMIME(APPLET(makemime, _BB_DIR_BIN, _BB_SUID_DROP)) 228IF_MAKEMIME(APPLET(makemime, _BB_DIR_BIN, _BB_SUID_DROP))
245IF_MAN(APPLET(man, _BB_DIR_SBIN, _BB_SUID_DROP)) 229IF_MAN(APPLET(man, _BB_DIR_SBIN, _BB_SUID_DROP))
246IF_MATCHPATHCON(APPLET(matchpathcon, _BB_DIR_USR_SBIN, _BB_SUID_DROP)) 230IF_MATCHPATHCON(APPLET(matchpathcon, _BB_DIR_USR_SBIN, _BB_SUID_DROP))
247IF_MD5SUM(APPLET_ODDNAME(md5sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_DROP, md5sum)) 231IF_MD5SUM(APPLET_NOEXEC(md5sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_DROP, md5sum))
248IF_MDEV(APPLET(mdev, _BB_DIR_SBIN, _BB_SUID_DROP)) 232IF_MDEV(APPLET(mdev, _BB_DIR_SBIN, _BB_SUID_DROP))
249IF_MESG(APPLET(mesg, _BB_DIR_USR_BIN, _BB_SUID_DROP))
250IF_MICROCOM(APPLET(microcom, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 233IF_MICROCOM(APPLET(microcom, _BB_DIR_USR_BIN, _BB_SUID_DROP))
251IF_MKDIR(APPLET_NOFORK(mkdir, mkdir, _BB_DIR_BIN, _BB_SUID_DROP, mkdir)) 234IF_MKDIR(APPLET_NOFORK(mkdir, mkdir, _BB_DIR_BIN, _BB_SUID_DROP, mkdir))
252IF_MKFS_VFAT(APPLET_ODDNAME(mkdosfs, mkfs_vfat, _BB_DIR_SBIN, _BB_SUID_DROP, mkfs_vfat)) 235IF_MKFS_VFAT(APPLET_ODDNAME(mkdosfs, mkfs_vfat, _BB_DIR_SBIN, _BB_SUID_DROP, mkfs_vfat))
253IF_MKFS_EXT2(APPLET_ODDNAME(mke2fs, mkfs_ext2, _BB_DIR_SBIN, _BB_SUID_DROP, mkfs_ext2)) 236IF_MKFS_EXT2(APPLET_ODDNAME(mke2fs, mkfs_ext2, _BB_DIR_SBIN, _BB_SUID_DROP, mkfs_ext2))
254IF_MKFIFO(APPLET(mkfifo, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 237IF_MKFIFO(APPLET_NOEXEC(mkfifo, mkfifo, _BB_DIR_USR_BIN, _BB_SUID_DROP, mkfifo))
255IF_MKFS_EXT2(APPLET_ODDNAME(mkfs.ext2, mkfs_ext2, _BB_DIR_SBIN, _BB_SUID_DROP, mkfs_ext2)) 238IF_MKFS_EXT2(APPLET_ODDNAME(mkfs.ext2, mkfs_ext2, _BB_DIR_SBIN, _BB_SUID_DROP, mkfs_ext2))
256//IF_MKE2FS(APPLET_ODDNAME(mkfs.ext3, mke2fs, _BB_DIR_SBIN, _BB_SUID_DROP, mkfs_ext3)) 239//IF_MKE2FS(APPLET_ODDNAME(mkfs.ext3, mke2fs, _BB_DIR_SBIN, _BB_SUID_DROP, mkfs_ext3))
257IF_MKFS_MINIX(APPLET_ODDNAME(mkfs.minix, mkfs_minix, _BB_DIR_SBIN, _BB_SUID_DROP, mkfs_minix)) 240IF_MKFS_MINIX(APPLET_ODDNAME(mkfs.minix, mkfs_minix, _BB_DIR_SBIN, _BB_SUID_DROP, mkfs_minix))
258IF_MKFS_REISER(APPLET_ODDNAME(mkfs.reiser, mkfs_reiser, _BB_DIR_SBIN, _BB_SUID_DROP, mkfs_reiser)) 241IF_MKFS_REISER(APPLET_ODDNAME(mkfs.reiser, mkfs_reiser, _BB_DIR_SBIN, _BB_SUID_DROP, mkfs_reiser))
259IF_MKFS_VFAT(APPLET_ODDNAME(mkfs.vfat, mkfs_vfat, _BB_DIR_SBIN, _BB_SUID_DROP, mkfs_vfat)) 242IF_MKFS_VFAT(APPLET_ODDNAME(mkfs.vfat, mkfs_vfat, _BB_DIR_SBIN, _BB_SUID_DROP, mkfs_vfat))
260IF_MKNOD(APPLET(mknod, _BB_DIR_BIN, _BB_SUID_DROP)) 243IF_MKNOD(APPLET_NOEXEC(mknod, mknod, _BB_DIR_BIN, _BB_SUID_DROP, mknod))
261IF_CRYPTPW(APPLET_ODDNAME(mkpasswd, cryptpw, _BB_DIR_USR_BIN, _BB_SUID_DROP, mkpasswd)) 244IF_CRYPTPW(APPLET_ODDNAME(mkpasswd, cryptpw, _BB_DIR_USR_BIN, _BB_SUID_DROP, mkpasswd))
262IF_MKSWAP(APPLET(mkswap, _BB_DIR_SBIN, _BB_SUID_DROP)) 245IF_MKSWAP(APPLET(mkswap, _BB_DIR_SBIN, _BB_SUID_DROP))
263IF_MKTEMP(APPLET(mktemp, _BB_DIR_BIN, _BB_SUID_DROP)) 246IF_MKTEMP(APPLET(mktemp, _BB_DIR_BIN, _BB_SUID_DROP))
264IF_MODPROBE(APPLET(modprobe, _BB_DIR_SBIN, _BB_SUID_DROP))
265IF_MODPROBE_SMALL(APPLET(modprobe, _BB_DIR_SBIN, _BB_SUID_DROP))
266IF_MORE(APPLET(more, _BB_DIR_BIN, _BB_SUID_DROP)) 247IF_MORE(APPLET(more, _BB_DIR_BIN, _BB_SUID_DROP))
267IF_MOUNT(APPLET(mount, _BB_DIR_BIN, IF_DESKTOP(_BB_SUID_MAYBE) IF_NOT_DESKTOP(_BB_SUID_DROP))) 248IF_MOUNT(APPLET(mount, _BB_DIR_BIN, IF_DESKTOP(_BB_SUID_MAYBE) IF_NOT_DESKTOP(_BB_SUID_DROP)))
268IF_MOUNTPOINT(APPLET(mountpoint, _BB_DIR_BIN, _BB_SUID_DROP)) 249IF_MOUNTPOINT(APPLET(mountpoint, _BB_DIR_BIN, _BB_SUID_DROP))
@@ -289,8 +270,7 @@ IF_PIPE_PROGRESS(APPLET(pipe_progress, _BB_DIR_BIN, _BB_SUID_DROP))
289IF_PIVOT_ROOT(APPLET(pivot_root, _BB_DIR_SBIN, _BB_SUID_DROP)) 270IF_PIVOT_ROOT(APPLET(pivot_root, _BB_DIR_SBIN, _BB_SUID_DROP))
290IF_PKILL(APPLET_ODDNAME(pkill, pgrep, _BB_DIR_USR_BIN, _BB_SUID_DROP, pkill)) 271IF_PKILL(APPLET_ODDNAME(pkill, pgrep, _BB_DIR_USR_BIN, _BB_SUID_DROP, pkill))
291IF_POPMAILDIR(APPLET(popmaildir, _BB_DIR_USR_SBIN, _BB_SUID_DROP)) 272IF_POPMAILDIR(APPLET(popmaildir, _BB_DIR_USR_SBIN, _BB_SUID_DROP))
292IF_HALT(APPLET_ODDNAME(poweroff, halt, _BB_DIR_SBIN, _BB_SUID_DROP, poweroff)) 273IF_PRINTENV(APPLET_NOFORK(printenv, printenv, _BB_DIR_BIN, _BB_SUID_DROP, printenv))
293IF_PRINTENV(APPLET(printenv, _BB_DIR_BIN, _BB_SUID_DROP))
294IF_PRINTF(APPLET_NOFORK(printf, printf, _BB_DIR_USR_BIN, _BB_SUID_DROP, printf)) 274IF_PRINTF(APPLET_NOFORK(printf, printf, _BB_DIR_USR_BIN, _BB_SUID_DROP, printf))
295IF_PS(APPLET(ps, _BB_DIR_BIN, _BB_SUID_DROP)) 275IF_PS(APPLET(ps, _BB_DIR_BIN, _BB_SUID_DROP))
296IF_PSCAN(APPLET(pscan, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 276IF_PSCAN(APPLET(pscan, _BB_DIR_USR_BIN, _BB_SUID_DROP))
@@ -302,7 +282,6 @@ IF_READAHEAD(APPLET(readahead, _BB_DIR_USR_BIN, _BB_SUID_DROP))
302IF_READLINK(APPLET(readlink, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 282IF_READLINK(APPLET(readlink, _BB_DIR_USR_BIN, _BB_SUID_DROP))
303IF_READPROFILE(APPLET(readprofile, _BB_DIR_USR_SBIN, _BB_SUID_DROP)) 283IF_READPROFILE(APPLET(readprofile, _BB_DIR_USR_SBIN, _BB_SUID_DROP))
304IF_REALPATH(APPLET(realpath, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 284IF_REALPATH(APPLET(realpath, _BB_DIR_USR_BIN, _BB_SUID_DROP))
305IF_HALT(APPLET_ODDNAME(reboot, halt, _BB_DIR_SBIN, _BB_SUID_DROP, reboot))
306IF_REFORMIME(APPLET(reformime, _BB_DIR_BIN, _BB_SUID_DROP)) 285IF_REFORMIME(APPLET(reformime, _BB_DIR_BIN, _BB_SUID_DROP))
307IF_RENICE(APPLET(renice, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 286IF_RENICE(APPLET(renice, _BB_DIR_USR_BIN, _BB_SUID_DROP))
308IF_RESET(APPLET(reset, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 287IF_RESET(APPLET(reset, _BB_DIR_USR_BIN, _BB_SUID_DROP))
@@ -311,8 +290,6 @@ IF_RESTORECON(APPLET_ODDNAME(restorecon, setfiles, _BB_DIR_SBIN, _BB_SUID_DROP,
311IF_RFKILL(APPLET(rfkill, _BB_DIR_USR_SBIN, _BB_SUID_DROP)) 290IF_RFKILL(APPLET(rfkill, _BB_DIR_USR_SBIN, _BB_SUID_DROP))
312IF_RM(APPLET_NOFORK(rm, rm, _BB_DIR_BIN, _BB_SUID_DROP, rm)) 291IF_RM(APPLET_NOFORK(rm, rm, _BB_DIR_BIN, _BB_SUID_DROP, rm))
313IF_RMDIR(APPLET_NOFORK(rmdir, rmdir, _BB_DIR_BIN, _BB_SUID_DROP, rmdir)) 292IF_RMDIR(APPLET_NOFORK(rmdir, rmdir, _BB_DIR_BIN, _BB_SUID_DROP, rmdir))
314IF_RMMOD(APPLET(rmmod, _BB_DIR_SBIN, _BB_SUID_DROP))
315IF_MODPROBE_SMALL(APPLET_ODDNAME(rmmod, modprobe, _BB_DIR_SBIN, _BB_SUID_DROP, modprobe))
316IF_ROUTE(APPLET(route, _BB_DIR_SBIN, _BB_SUID_DROP)) 293IF_ROUTE(APPLET(route, _BB_DIR_SBIN, _BB_SUID_DROP))
317IF_RPM(APPLET(rpm, _BB_DIR_BIN, _BB_SUID_DROP)) 294IF_RPM(APPLET(rpm, _BB_DIR_BIN, _BB_SUID_DROP))
318IF_RPM2CPIO(APPLET(rpm2cpio, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 295IF_RPM2CPIO(APPLET(rpm2cpio, _BB_DIR_USR_BIN, _BB_SUID_DROP))
@@ -340,12 +317,13 @@ IF_SETLOGCONS(APPLET(setlogcons, _BB_DIR_USR_SBIN, _BB_SUID_DROP))
340IF_SETSEBOOL(APPLET(setsebool, _BB_DIR_USR_SBIN, _BB_SUID_DROP)) 317IF_SETSEBOOL(APPLET(setsebool, _BB_DIR_USR_SBIN, _BB_SUID_DROP))
341IF_SETSID(APPLET(setsid, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 318IF_SETSID(APPLET(setsid, _BB_DIR_USR_BIN, _BB_SUID_DROP))
342IF_SETUIDGID(APPLET_ODDNAME(setuidgid, chpst, _BB_DIR_USR_BIN, _BB_SUID_DROP, setuidgid)) 319IF_SETUIDGID(APPLET_ODDNAME(setuidgid, chpst, _BB_DIR_USR_BIN, _BB_SUID_DROP, setuidgid))
343IF_SHA1SUM(APPLET_ODDNAME(sha1sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_DROP, sha1sum)) 320IF_SHA1SUM(APPLET_NOEXEC(sha1sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_DROP, sha1sum))
344IF_SHA256SUM(APPLET_ODDNAME(sha256sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_DROP, sha256sum)) 321IF_SHA256SUM(APPLET_NOEXEC(sha256sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_DROP, sha256sum))
345IF_SHA512SUM(APPLET_ODDNAME(sha512sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_DROP, sha512sum)) 322IF_SHA512SUM(APPLET_NOEXEC(sha512sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_DROP, sha512sum))
346IF_SHOWKEY(APPLET(showkey, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 323IF_SHOWKEY(APPLET(showkey, _BB_DIR_USR_BIN, _BB_SUID_DROP))
347IF_SLATTACH(APPLET(slattach, _BB_DIR_SBIN, _BB_SUID_DROP)) 324IF_SLATTACH(APPLET(slattach, _BB_DIR_SBIN, _BB_SUID_DROP))
348IF_SLEEP(APPLET_NOFORK(sleep, sleep, _BB_DIR_BIN, _BB_SUID_DROP, sleep)) 325/* Do not make this applet NOFORK. It breaks ^C-ing of pauses in shells */
326IF_SLEEP(APPLET(sleep, _BB_DIR_BIN, _BB_SUID_DROP))
349IF_SOFTLIMIT(APPLET_ODDNAME(softlimit, chpst, _BB_DIR_USR_BIN, _BB_SUID_DROP, softlimit)) 327IF_SOFTLIMIT(APPLET_ODDNAME(softlimit, chpst, _BB_DIR_USR_BIN, _BB_SUID_DROP, softlimit))
350IF_SORT(APPLET_NOEXEC(sort, sort, _BB_DIR_USR_BIN, _BB_SUID_DROP, sort)) 328IF_SORT(APPLET_NOEXEC(sort, sort, _BB_DIR_USR_BIN, _BB_SUID_DROP, sort))
351IF_SPLIT(APPLET(split, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 329IF_SPLIT(APPLET(split, _BB_DIR_USR_BIN, _BB_SUID_DROP))
@@ -358,7 +336,7 @@ IF_SULOGIN(APPLET(sulogin, _BB_DIR_SBIN, _BB_SUID_DROP))
358IF_SUM(APPLET(sum, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 336IF_SUM(APPLET(sum, _BB_DIR_USR_BIN, _BB_SUID_DROP))
359IF_SV(APPLET(sv, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 337IF_SV(APPLET(sv, _BB_DIR_USR_BIN, _BB_SUID_DROP))
360IF_SVLOGD(APPLET(svlogd, _BB_DIR_USR_SBIN, _BB_SUID_DROP)) 338IF_SVLOGD(APPLET(svlogd, _BB_DIR_USR_SBIN, _BB_SUID_DROP))
361IF_SWAPONOFF(APPLET_ODDNAME(swapoff, swap_on_off, _BB_DIR_SBIN, _BB_SUID_DROP,swapoff)) 339IF_SWAPONOFF(APPLET_ODDNAME(swapoff, swap_on_off, _BB_DIR_SBIN, _BB_SUID_DROP, swapoff))
362IF_SWAPONOFF(APPLET_ODDNAME(swapon, swap_on_off, _BB_DIR_SBIN, _BB_SUID_DROP, swapon)) 340IF_SWAPONOFF(APPLET_ODDNAME(swapon, swap_on_off, _BB_DIR_SBIN, _BB_SUID_DROP, swapon))
363IF_SWITCH_ROOT(APPLET(switch_root, _BB_DIR_SBIN, _BB_SUID_DROP)) 341IF_SWITCH_ROOT(APPLET(switch_root, _BB_DIR_SBIN, _BB_SUID_DROP))
364IF_SYNC(APPLET_NOFORK(sync, sync, _BB_DIR_BIN, _BB_SUID_DROP, sync)) 342IF_SYNC(APPLET_NOFORK(sync, sync, _BB_DIR_BIN, _BB_SUID_DROP, sync))
@@ -398,7 +376,7 @@ IF_UNAME(APPLET(uname, _BB_DIR_BIN, _BB_SUID_DROP))
398IF_UNCOMPRESS(APPLET(uncompress, _BB_DIR_BIN, _BB_SUID_DROP)) 376IF_UNCOMPRESS(APPLET(uncompress, _BB_DIR_BIN, _BB_SUID_DROP))
399IF_UNEXPAND(APPLET_ODDNAME(unexpand, expand, _BB_DIR_USR_BIN, _BB_SUID_DROP, unexpand)) 377IF_UNEXPAND(APPLET_ODDNAME(unexpand, expand, _BB_DIR_USR_BIN, _BB_SUID_DROP, unexpand))
400IF_UNIQ(APPLET(uniq, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 378IF_UNIQ(APPLET(uniq, _BB_DIR_USR_BIN, _BB_SUID_DROP))
401IF_UNIX2DOS(APPLET_ODDNAME(unix2dos, dos2unix, _BB_DIR_USR_BIN, _BB_SUID_DROP, unix2dos)) 379IF_UNIX2DOS(APPLET_NOEXEC(unix2dos, dos2unix, _BB_DIR_USR_BIN, _BB_SUID_DROP, unix2dos))
402IF_UNXZ(APPLET(unxz, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 380IF_UNXZ(APPLET(unxz, _BB_DIR_USR_BIN, _BB_SUID_DROP))
403IF_UNLZMA(APPLET(unlzma, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 381IF_UNLZMA(APPLET(unlzma, _BB_DIR_USR_BIN, _BB_SUID_DROP))
404IF_LZOP(APPLET_ODDNAME(unlzop, lzop, _BB_DIR_USR_BIN, _BB_SUID_DROP, unlzop)) 382IF_LZOP(APPLET_ODDNAME(unlzop, lzop, _BB_DIR_USR_BIN, _BB_SUID_DROP, unlzop))
diff --git a/include/busybox.h b/include/busybox.h
index 76415dd72..757317fc7 100644
--- a/include/busybox.h
+++ b/include/busybox.h
@@ -16,8 +16,13 @@ typedef enum bb_install_loc_t {
16 _BB_DIR_ROOT = 0, 16 _BB_DIR_ROOT = 0,
17 _BB_DIR_BIN, 17 _BB_DIR_BIN,
18 _BB_DIR_SBIN, 18 _BB_DIR_SBIN,
19#if ENABLE_INSTALL_NO_USR
20 _BB_DIR_USR_BIN = _BB_DIR_BIN,
21 _BB_DIR_USR_SBIN = _BB_DIR_SBIN,
22#else
19 _BB_DIR_USR_BIN, 23 _BB_DIR_USR_BIN,
20 _BB_DIR_USR_SBIN 24 _BB_DIR_USR_SBIN,
25#endif
21} bb_install_loc_t; 26} bb_install_loc_t;
22 27
23typedef enum bb_suid_t { 28typedef enum bb_suid_t {
diff --git a/include/libbb.h b/include/libbb.h
index 221837b64..9ece2f9ec 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -1522,37 +1522,42 @@ unsigned get_cpu_count(void) FAST_FUNC;
1522extern const char bb_uuenc_tbl_base64[]; 1522extern const char bb_uuenc_tbl_base64[];
1523extern const char bb_uuenc_tbl_std[]; 1523extern const char bb_uuenc_tbl_std[];
1524void bb_uuencode(char *store, const void *s, int length, const char *tbl) FAST_FUNC; 1524void bb_uuencode(char *store, const void *s, int length, const char *tbl) FAST_FUNC;
1525enum {
1526 BASE64_FLAG_UU_STOP = 0x100,
1527 /* Sign-extends to a value which never matches fgetc result: */
1528 BASE64_FLAG_NO_STOP_CHAR = 0x80,
1529};
1530void FAST_FUNC read_base64(FILE *src_stream, FILE *dst_stream, int flags);
1525 1531
1526typedef struct sha1_ctx_t { 1532typedef struct sha1_ctx_t {
1527 uint32_t hash[8]; /* 5, +3 elements for sha256 */ 1533 uint32_t hash[8]; /* 5, +3 elements for sha256 */
1528 uint64_t total64; 1534 uint64_t total64; /* must be directly after hash[] */
1529 uint8_t wbuffer[64]; /* NB: always correctly aligned for uint64_t */ 1535 uint8_t wbuffer[64]; /* NB: always correctly aligned for uint64_t */
1530 void (*process_block)(struct sha1_ctx_t*) FAST_FUNC; 1536 void (*process_block)(struct sha1_ctx_t*) FAST_FUNC;
1531} sha1_ctx_t; 1537} sha1_ctx_t;
1532void sha1_begin(sha1_ctx_t *ctx) FAST_FUNC; 1538void sha1_begin(sha1_ctx_t *ctx) FAST_FUNC;
1533void sha1_hash(const void *data, size_t length, sha1_ctx_t *ctx) FAST_FUNC; 1539void sha1_hash(sha1_ctx_t *ctx, const void *data, size_t length) FAST_FUNC;
1534void sha1_end(void *resbuf, sha1_ctx_t *ctx) FAST_FUNC; 1540void sha1_end(sha1_ctx_t *ctx, void *resbuf) FAST_FUNC;
1535typedef struct sha1_ctx_t sha256_ctx_t; 1541typedef struct sha1_ctx_t sha256_ctx_t;
1536void sha256_begin(sha256_ctx_t *ctx) FAST_FUNC; 1542void sha256_begin(sha256_ctx_t *ctx) FAST_FUNC;
1537#define sha256_hash sha1_hash 1543#define sha256_hash sha1_hash
1538#define sha256_end sha1_end 1544#define sha256_end sha1_end
1539typedef struct sha512_ctx_t { 1545typedef struct sha512_ctx_t {
1540 uint64_t hash[8]; 1546 uint64_t hash[8];
1541 uint64_t total64[2]; 1547 uint64_t total64[2]; /* must be directly after hash[] */
1542 uint8_t wbuffer[128]; /* NB: always correctly aligned for uint64_t */ 1548 uint8_t wbuffer[128]; /* NB: always correctly aligned for uint64_t */
1543} sha512_ctx_t; 1549} sha512_ctx_t;
1544void sha512_begin(sha512_ctx_t *ctx) FAST_FUNC; 1550void sha512_begin(sha512_ctx_t *ctx) FAST_FUNC;
1545void sha512_hash(const void *buffer, size_t len, sha512_ctx_t *ctx) FAST_FUNC; 1551void sha512_hash(sha512_ctx_t *ctx, const void *buffer, size_t len) FAST_FUNC;
1546void sha512_end(void *resbuf, sha512_ctx_t *ctx) FAST_FUNC; 1552void sha512_end(sha512_ctx_t *ctx, void *resbuf) FAST_FUNC;
1547#if 1 1553#if 1
1548typedef struct md5_ctx_t { 1554typedef struct md5_ctx_t {
1549 uint32_t A; 1555 uint32_t A;
1550 uint32_t B; 1556 uint32_t B;
1551 uint32_t C; 1557 uint32_t C;
1552 uint32_t D; 1558 uint32_t D;
1553 uint64_t total; 1559 uint64_t total64;
1554 uint32_t buflen; 1560 char wbuffer[64];
1555 char buffer[128];
1556} md5_ctx_t; 1561} md5_ctx_t;
1557#else 1562#else
1558/* libbb/md5prime.c uses a bit different one: */ 1563/* libbb/md5prime.c uses a bit different one: */
@@ -1563,8 +1568,8 @@ typedef struct md5_ctx_t {
1563} md5_ctx_t; 1568} md5_ctx_t;
1564#endif 1569#endif
1565void md5_begin(md5_ctx_t *ctx) FAST_FUNC; 1570void md5_begin(md5_ctx_t *ctx) FAST_FUNC;
1566void md5_hash(const void *data, size_t length, md5_ctx_t *ctx) FAST_FUNC; 1571void md5_hash(md5_ctx_t *ctx, const void *data, size_t length) FAST_FUNC;
1567void md5_end(void *resbuf, md5_ctx_t *ctx) FAST_FUNC; 1572void md5_end(md5_ctx_t *ctx, void *resbuf) FAST_FUNC;
1568 1573
1569 1574
1570uint32_t *crc32_filltable(uint32_t *tbl256, int endian) FAST_FUNC; 1575uint32_t *crc32_filltable(uint32_t *tbl256, int endian) FAST_FUNC;
diff --git a/include/platform.h b/include/platform.h
index 2b3ad42bd..ed8c137e1 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -215,6 +215,8 @@
215# define SWAP_LE16(x) bswap_16(x) 215# define SWAP_LE16(x) bswap_16(x)
216# define SWAP_LE32(x) bswap_32(x) 216# define SWAP_LE32(x) bswap_32(x)
217# define SWAP_LE64(x) bswap_64(x) 217# define SWAP_LE64(x) bswap_64(x)
218# define IF_BIG_ENDIAN(...) __VA_ARGS__
219# define IF_LITTLE_ENDIAN(...)
218#else 220#else
219# define SWAP_BE16(x) bswap_16(x) 221# define SWAP_BE16(x) bswap_16(x)
220# define SWAP_BE32(x) bswap_32(x) 222# define SWAP_BE32(x) bswap_32(x)
@@ -222,6 +224,8 @@
222# define SWAP_LE16(x) (x) 224# define SWAP_LE16(x) (x)
223# define SWAP_LE32(x) (x) 225# define SWAP_LE32(x) (x)
224# define SWAP_LE64(x) (x) 226# define SWAP_LE64(x) (x)
227# define IF_BIG_ENDIAN(...)
228# define IF_LITTLE_ENDIAN(...) __VA_ARGS__
225#endif 229#endif
226 230
227/* ---- Unaligned access ------------------------------------ */ 231/* ---- Unaligned access ------------------------------------ */
diff --git a/include/usage.src.h b/include/usage.src.h
index 2866bdbba..5d7767bb4 100644
--- a/include/usage.src.h
+++ b/include/usage.src.h
@@ -18,21 +18,27 @@
18INSERT 18INSERT
19 19
20#define acpid_trivial_usage \ 20#define acpid_trivial_usage \
21 "[-d] [-c CONFDIR] [-l LOGFILE] [-e PROC_EVENT_FILE] [EVDEV_EVENT_FILE]..." 21 "[-d] [-c CONFDIR] [-l LOGFILE] [-a ACTIONFILE] [-M MAPFILE] [-e PROC_EVENT_FILE] [-p PIDFILE]"
22#define acpid_full_usage "\n\n" \ 22#define acpid_full_usage "\n\n" \
23 "Listen to ACPI events and spawn specific helpers on event arrival\n" \ 23 "Listen to ACPI events and spawn specific helpers on event arrival\n" \
24 "\nOptions:" \ 24 "\nOptions:" \
25 "\n -d Don't daemonize, log to stderr" \
26 "\n -c DIR Config directory [/etc/acpi]" \ 25 "\n -c DIR Config directory [/etc/acpi]" \
26 "\n -d Don't daemonize, (implies -f)" \
27 "\n -e FILE /proc event file [/proc/acpi/event]" \ 27 "\n -e FILE /proc event file [/proc/acpi/event]" \
28 "\n -l FILE Log file [/var/log/acpid]" \ 28 "\n -f Run in foreground" \
29 "\n -l FILE Log file [/var/log/acpid.log]" \
30 "\n -p FILE Pid file [/var/run/acpid.pid]" \
31 "\n -a FILE Action file [/etc/acpid.conf]" \
32 "\n -M FILE Map file [/etc/acpi.map]" \
29 IF_FEATURE_ACPID_COMPAT( \ 33 IF_FEATURE_ACPID_COMPAT( \
30 "\n\nAccept and ignore compatibility options -g -m -s -S -v" \ 34 "\n\nAccept and ignore compatibility options -g -m -s -S -v" \
31 ) 35 )
32 36
33#define acpid_example_usage \ 37#define acpid_example_usage \
38 "Without -e option, acpid uses all /dev/input/event* files\n" \
39 "# acpid\n" \
34 "# acpid -l /var/log/my-acpi-log\n" \ 40 "# acpid -l /var/log/my-acpi-log\n" \
35 "# acpid -d /dev/input/event*\n" 41 "# acpid -e /proc/acpi/event\n"
36 42
37#define addgroup_trivial_usage \ 43#define addgroup_trivial_usage \
38 "[-g GID] " IF_FEATURE_ADDUSER_TO_GROUP("[USER] ") "GROUP" 44 "[-g GID] " IF_FEATURE_ADDUSER_TO_GROUP("[USER] ") "GROUP"
@@ -95,7 +101,7 @@ INSERT
95 "\n -n Don't resolve names" \ 101 "\n -n Don't resolve names" \
96 "\n -i IF Network interface" \ 102 "\n -i IF Network interface" \
97 "\n -D Read <hwaddr> from given device" \ 103 "\n -D Read <hwaddr> from given device" \
98 "\n -A, -p AF Protocol family" \ 104 "\n -A,-p AF Protocol family" \
99 "\n -H HWTYPE Hardware address type" \ 105 "\n -H HWTYPE Hardware address type" \
100 106
101#define arping_trivial_usage \ 107#define arping_trivial_usage \
@@ -214,7 +220,7 @@ INSERT
214 "\n -F Don't store or verify checksum" \ 220 "\n -F Don't store or verify checksum" \
215 221
216#define unlzma_trivial_usage \ 222#define unlzma_trivial_usage \
217 "[OPTIONS] [FILE]..." 223 "[-cf] [FILE]..."
218#define unlzma_full_usage "\n\n" \ 224#define unlzma_full_usage "\n\n" \
219 "Decompress FILE (or stdin)\n" \ 225 "Decompress FILE (or stdin)\n" \
220 "\nOptions:" \ 226 "\nOptions:" \
@@ -222,7 +228,7 @@ INSERT
222 "\n -f Force" \ 228 "\n -f Force" \
223 229
224#define lzma_trivial_usage \ 230#define lzma_trivial_usage \
225 "-d [OPTIONS] [FILE]..." 231 "-d [-cf] [FILE]..."
226#define lzma_full_usage "\n\n" \ 232#define lzma_full_usage "\n\n" \
227 "Decompress FILE (or stdin)\n" \ 233 "Decompress FILE (or stdin)\n" \
228 "\nOptions:" \ 234 "\nOptions:" \
@@ -236,7 +242,7 @@ INSERT
236 "Decompress to stdout" 242 "Decompress to stdout"
237 243
238#define unxz_trivial_usage \ 244#define unxz_trivial_usage \
239 "[OPTIONS] [FILE]..." 245 "[-cf] [FILE]..."
240#define unxz_full_usage "\n\n" \ 246#define unxz_full_usage "\n\n" \
241 "Decompress FILE (or stdin)\n" \ 247 "Decompress FILE (or stdin)\n" \
242 "\nOptions:" \ 248 "\nOptions:" \
@@ -244,7 +250,7 @@ INSERT
244 "\n -f Force" \ 250 "\n -f Force" \
245 251
246#define xz_trivial_usage \ 252#define xz_trivial_usage \
247 "-d [OPTIONS] [FILE]..." 253 "-d [-cf] [FILE]..."
248#define xz_full_usage "\n\n" \ 254#define xz_full_usage "\n\n" \
249 "Decompress FILE (or stdin)\n" \ 255 "Decompress FILE (or stdin)\n" \
250 "\nOptions:" \ 256 "\nOptions:" \
@@ -528,7 +534,7 @@ INSERT
528 "Print the config file used by busybox build" 534 "Print the config file used by busybox build"
529 535
530#define chrt_trivial_usage \ 536#define chrt_trivial_usage \
531 "[OPTIONS] [PRIO] [PID | PROG ARGS]" 537 "[-prfom] [PRIO] [PID | PROG ARGS]"
532#define chrt_full_usage "\n\n" \ 538#define chrt_full_usage "\n\n" \
533 "Change scheduling priority and class for a process\n" \ 539 "Change scheduling priority and class for a process\n" \
534 "\nOptions:" \ 540 "\nOptions:" \
@@ -696,46 +702,6 @@ INSERT
696 "$ echo \"Hello world\" | cut -f 2 -d ' '\n" \ 702 "$ echo \"Hello world\" | cut -f 2 -d ' '\n" \
697 "world\n" 703 "world\n"
698 704
699#define date_trivial_usage \
700 "[OPTIONS] [+FMT] [TIME]"
701#define date_full_usage "\n\n" \
702 "Display time (using +FMT), or set time\n" \
703 "\nOptions:" \
704 IF_NOT_LONG_OPTS( \
705 "\n [-s] TIME Set time to TIME" \
706 "\n -u Work in UTC (don't convert to local time)" \
707 "\n -R Output RFC-2822 compliant date string" \
708 ) IF_LONG_OPTS( \
709 "\n [-s,--set] TIME Set time to TIME" \
710 "\n -u,--utc Work in UTC (don't convert to local time)" \
711 "\n -R,--rfc-2822 Output RFC-2822 compliant date string" \
712 ) \
713 IF_FEATURE_DATE_ISOFMT( \
714 "\n -I[SPEC] Output ISO-8601 compliant date string" \
715 "\n SPEC='date' (default) for date only," \
716 "\n 'hours', 'minutes', or 'seconds' for date and" \
717 "\n time to the indicated precision" \
718 ) IF_NOT_LONG_OPTS( \
719 "\n -r FILE Display last modification time of FILE" \
720 "\n -d TIME Display TIME, not 'now'" \
721 ) IF_LONG_OPTS( \
722 "\n -r,--reference FILE Display last modification time of FILE" \
723 "\n -d,--date TIME Display TIME, not 'now'" \
724 ) \
725 IF_FEATURE_DATE_ISOFMT( \
726 "\n -D FMT Use FMT for -d TIME conversion" \
727 ) \
728 "\n" \
729 "\nRecognized TIME formats:" \
730 "\n hh:mm[:ss]" \
731 "\n [YYYY.]MM.DD-hh:mm[:ss]" \
732 "\n YYYY-MM-DD hh:mm[:ss]" \
733 "\n [[[[[YY]YY]MM]DD]hh]mm[.ss]" \
734
735#define date_example_usage \
736 "$ date\n" \
737 "Wed Apr 12 18:52:41 MDT 2000\n"
738
739#define dd_trivial_usage \ 705#define dd_trivial_usage \
740 "[if=FILE] [of=FILE] " IF_FEATURE_DD_IBS_OBS("[ibs=N] [obs=N] ") "[bs=N] [count=N] [skip=N]\n" \ 706 "[if=FILE] [of=FILE] " IF_FEATURE_DD_IBS_OBS("[ibs=N] [obs=N] ") "[bs=N] [count=N] [skip=N]\n" \
741 " [seek=N]" IF_FEATURE_DD_IBS_OBS(" [conv=notrunc|noerror|sync|fsync]") 707 " [seek=N]" IF_FEATURE_DD_IBS_OBS(" [conv=notrunc|noerror|sync|fsync]")
@@ -785,9 +751,6 @@ INSERT
785#define deluser_full_usage "\n\n" \ 751#define deluser_full_usage "\n\n" \
786 "Delete USER from the system" 752 "Delete USER from the system"
787 753
788#define depmod_trivial_usage NOUSAGE_STR
789#define depmod_full_usage ""
790
791#define devmem_trivial_usage \ 754#define devmem_trivial_usage \
792 "ADDRESS [WIDTH [VALUE]]" 755 "ADDRESS [WIDTH [VALUE]]"
793 756
@@ -910,7 +873,7 @@ INSERT
910 "\n nameserver NORNAL_DNS_SERVER" \ 873 "\n nameserver NORNAL_DNS_SERVER" \
911 874
912#define dos2unix_trivial_usage \ 875#define dos2unix_trivial_usage \
913 "[OPTIONS] [FILE]" 876 "[-ud] [FILE]"
914#define dos2unix_full_usage "\n\n" \ 877#define dos2unix_full_usage "\n\n" \
915 "Convert FILE in-place from DOS to Unix format.\n" \ 878 "Convert FILE in-place from DOS to Unix format.\n" \
916 "When no file is given, use stdin/stdout.\n" \ 879 "When no file is given, use stdin/stdout.\n" \
@@ -919,7 +882,7 @@ INSERT
919 "\n -d unix2dos" \ 882 "\n -d unix2dos" \
920 883
921#define unix2dos_trivial_usage \ 884#define unix2dos_trivial_usage \
922 "[OPTIONS] [FILE]" 885 "[-ud] [FILE]"
923#define unix2dos_full_usage "\n\n" \ 886#define unix2dos_full_usage "\n\n" \
924 "Convert FILE in-place from Unix to DOS format.\n" \ 887 "Convert FILE in-place from Unix to DOS format.\n" \
925 "When no file is given, use stdin/stdout.\n" \ 888 "When no file is given, use stdin/stdout.\n" \
@@ -1295,7 +1258,7 @@ INSERT
1295 "\n -w Use WIDTH columns instead of 80" \ 1258 "\n -w Use WIDTH columns instead of 80" \
1296 1259
1297#define free_trivial_usage \ 1260#define free_trivial_usage \
1298 "" 1261 "" IF_DESKTOP("[-b/k/m/g]")
1299#define free_full_usage "\n\n" \ 1262#define free_full_usage "\n\n" \
1300 "Display the amount of free and used system memory" 1263 "Display the amount of free and used system memory"
1301#define free_example_usage \ 1264#define free_example_usage \
@@ -1400,8 +1363,7 @@ INSERT
1400 "Find processes which use FILEs or PORTs\n" \ 1363 "Find processes which use FILEs or PORTs\n" \
1401 "\nOptions:" \ 1364 "\nOptions:" \
1402 "\n -m Find processes which use same fs as FILEs" \ 1365 "\n -m Find processes which use same fs as FILEs" \
1403 "\n -4 Search only IPv4 space" \ 1366 "\n -4,-6 Search only IPv4/IPv6 space" \
1404 "\n -6 Search only IPv6 space" \
1405 "\n -s Don't display PIDs" \ 1367 "\n -s Don't display PIDs" \
1406 "\n -k Kill found processes" \ 1368 "\n -k Kill found processes" \
1407 "\n -SIGNAL Signal to send (default: KILL)" \ 1369 "\n -SIGNAL Signal to send (default: KILL)" \
@@ -1479,7 +1441,7 @@ INSERT
1479 "\n -H HOST Log HOST into the utmp file as the hostname" \ 1441 "\n -H HOST Log HOST into the utmp file as the hostname" \
1480 1442
1481#define gunzip_trivial_usage \ 1443#define gunzip_trivial_usage \
1482 "[OPTIONS] [FILE]..." 1444 "[-cft] [FILE]..."
1483#define gunzip_full_usage "\n\n" \ 1445#define gunzip_full_usage "\n\n" \
1484 "Decompress FILEs (or stdin)\n" \ 1446 "Decompress FILEs (or stdin)\n" \
1485 "\nOptions:" \ 1447 "\nOptions:" \
@@ -1495,7 +1457,7 @@ INSERT
1495 "-rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar\n" 1457 "-rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar\n"
1496 1458
1497#define gzip_trivial_usage \ 1459#define gzip_trivial_usage \
1498 "[OPTIONS] [FILE]..." 1460 "[-cfd] [FILE]..."
1499#define gzip_full_usage "\n\n" \ 1461#define gzip_full_usage "\n\n" \
1500 "Compress FILEs (or stdin)\n" \ 1462 "Compress FILEs (or stdin)\n" \
1501 "\nOptions:" \ 1463 "\nOptions:" \
@@ -1510,18 +1472,6 @@ INSERT
1510 "$ ls -la /tmp/busybox*\n" \ 1472 "$ ls -la /tmp/busybox*\n" \
1511 "-rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/busybox.tar.gz\n" 1473 "-rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/busybox.tar.gz\n"
1512 1474
1513#define halt_trivial_usage \
1514 "[-d DELAY] [-n] [-f]" IF_FEATURE_WTMP(" [-w]")
1515#define halt_full_usage "\n\n" \
1516 "Halt the system\n" \
1517 "\nOptions:" \
1518 "\n -d Delay interval for halting" \
1519 "\n -n No call to sync()" \
1520 "\n -f Force halt (don't go through init)" \
1521 IF_FEATURE_WTMP( \
1522 "\n -w Only write a wtmp record" \
1523 )
1524
1525#define hdparm_trivial_usage \ 1475#define hdparm_trivial_usage \
1526 "[OPTIONS] [DEVICE]" 1476 "[OPTIONS] [DEVICE]"
1527#define hdparm_full_usage "\n\n" \ 1477#define hdparm_full_usage "\n\n" \
@@ -1679,7 +1629,7 @@ INSERT
1679 "\n -i Inetd mode" \ 1629 "\n -i Inetd mode" \
1680 "\n -f Don't daemonize" \ 1630 "\n -f Don't daemonize" \
1681 "\n -v[v] Verbose" \ 1631 "\n -v[v] Verbose" \
1682 "\n -p [IP:]PORT Bind to ip:port (default *:80)" \ 1632 "\n -p [IP:]PORT Bind to IP:PORT (default *:80)" \
1683 IF_FEATURE_HTTPD_SETUID( \ 1633 IF_FEATURE_HTTPD_SETUID( \
1684 "\n -u USER[:GRP] Set uid/gid after binding to port") \ 1634 "\n -u USER[:GRP] Set uid/gid after binding to port") \
1685 IF_FEATURE_HTTPD_BASIC_AUTH( \ 1635 IF_FEATURE_HTTPD_BASIC_AUTH( \
@@ -1716,13 +1666,13 @@ INSERT
1716 "Print information about USER or the current user\n" \ 1666 "Print information about USER or the current user\n" \
1717 "\nOptions:" \ 1667 "\nOptions:" \
1718 IF_SELINUX( \ 1668 IF_SELINUX( \
1719 "\n -Z Print the security context" \ 1669 "\n -Z Security context" \
1720 ) \ 1670 ) \
1721 "\n -u Print user ID" \ 1671 "\n -u User ID" \
1722 "\n -g Print group ID" \ 1672 "\n -g Group ID" \
1723 "\n -G Print supplementary group IDs" \ 1673 "\n -G Supplementary group IDs" \
1724 "\n -n Print name instead of a number" \ 1674 "\n -n Print names instead of numbers" \
1725 "\n -r Print real user ID instead of effective ID" \ 1675 "\n -r Print real ID instead of effective ID" \
1726 1676
1727#define id_example_usage \ 1677#define id_example_usage \
1728 "$ id\n" \ 1678 "$ id\n" \
@@ -1754,10 +1704,10 @@ INSERT
1754#define ifenslave_full_usage "\n\n" \ 1704#define ifenslave_full_usage "\n\n" \
1755 "Configure network interfaces for parallel routing\n" \ 1705 "Configure network interfaces for parallel routing\n" \
1756 "\nOptions:" \ 1706 "\nOptions:" \
1757 "\n -c, --change-active Change active slave" \ 1707 "\n -c,--change-active Change active slave" \
1758 "\n -d, --detach Remove slave interface from bonding device" \ 1708 "\n -d,--detach Remove slave interface from bonding device" \
1759 "\n -f, --force Force, even if interface is not Ethernet" \ 1709 "\n -f,--force Force, even if interface is not Ethernet" \
1760/* "\n -r, --receive-slave Create a receive-only slave" */ 1710/* "\n -r,--receive-slave Create a receive-only slave" */
1761 1711
1762#define ifenslave_example_usage \ 1712#define ifenslave_example_usage \
1763 "To create a bond device, simply follow these three steps:\n" \ 1713 "To create a bond device, simply follow these three steps:\n" \
@@ -1802,7 +1752,7 @@ INSERT
1802 "\n -k Kill running daemon" \ 1752 "\n -k Kill running daemon" \
1803 1753
1804#define ifup_trivial_usage \ 1754#define ifup_trivial_usage \
1805 "[-ain"IF_FEATURE_IFUPDOWN_MAPPING("m")"vf] IFACE..." 1755 "[-an"IF_FEATURE_IFUPDOWN_MAPPING("m")"vf] [-i FILE] IFACE..."
1806#define ifup_full_usage "\n\n" \ 1756#define ifup_full_usage "\n\n" \
1807 "Options:" \ 1757 "Options:" \
1808 "\n -a De/configure all interfaces automatically" \ 1758 "\n -a De/configure all interfaces automatically" \
@@ -1816,7 +1766,7 @@ INSERT
1816 "\n -f Force de/configuration" \ 1766 "\n -f Force de/configuration" \
1817 1767
1818#define ifdown_trivial_usage \ 1768#define ifdown_trivial_usage \
1819 "[-ain"IF_FEATURE_IFUPDOWN_MAPPING("m")"vf] ifaces..." 1769 "[-an"IF_FEATURE_IFUPDOWN_MAPPING("m")"vf] [-i FILE] IFACE..."
1820#define ifdown_full_usage "\n\n" \ 1770#define ifdown_full_usage "\n\n" \
1821 "Options:" \ 1771 "Options:" \
1822 "\n -a De/configure all interfaces automatically" \ 1772 "\n -a De/configure all interfaces automatically" \
@@ -1840,138 +1790,6 @@ INSERT
1840 "\n -R N Pause services after N connects/min" \ 1790 "\n -R N Pause services after N connects/min" \
1841 "\n (default: 0 - disabled)" \ 1791 "\n (default: 0 - disabled)" \
1842 1792
1843#define init_trivial_usage \
1844 ""
1845#define init_full_usage "\n\n" \
1846 "Init is the parent of all processes"
1847
1848#define init_notes_usage \
1849"This version of init is designed to be run only by the kernel.\n" \
1850"\n" \
1851"BusyBox init doesn't support multiple runlevels. The runlevels field of\n" \
1852"the /etc/inittab file is completely ignored by BusyBox init. If you want\n" \
1853"runlevels, use sysvinit.\n" \
1854"\n" \
1855"BusyBox init works just fine without an inittab. If no inittab is found,\n" \
1856"it has the following default behavior:\n" \
1857"\n" \
1858" ::sysinit:/etc/init.d/rcS\n" \
1859" ::askfirst:/bin/sh\n" \
1860" ::ctrlaltdel:/sbin/reboot\n" \
1861" ::shutdown:/sbin/swapoff -a\n" \
1862" ::shutdown:/bin/umount -a -r\n" \
1863" ::restart:/sbin/init\n" \
1864"\n" \
1865"if it detects that /dev/console is _not_ a serial console, it will also run:\n" \
1866"\n" \
1867" tty2::askfirst:/bin/sh\n" \
1868" tty3::askfirst:/bin/sh\n" \
1869" tty4::askfirst:/bin/sh\n" \
1870"\n" \
1871"If you choose to use an /etc/inittab file, the inittab entry format is as follows:\n" \
1872"\n" \
1873" <id>:<runlevels>:<action>:<process>\n" \
1874"\n" \
1875" <id>:\n" \
1876"\n" \
1877" WARNING: This field has a non-traditional meaning for BusyBox init!\n" \
1878" The id field is used by BusyBox init to specify the controlling tty for\n" \
1879" the specified process to run on. The contents of this field are\n" \
1880" appended to \"/dev/\" and used as-is. There is no need for this field to\n" \
1881" be unique, although if it isn't you may have strange results. If this\n" \
1882" field is left blank, the controlling tty is set to the console. Also\n" \
1883" note that if BusyBox detects that a serial console is in use, then only\n" \
1884" entries whose controlling tty is either the serial console or /dev/null\n" \
1885" will be run. BusyBox init does nothing with utmp. We don't need no\n" \
1886" stinkin' utmp.\n" \
1887"\n" \
1888" <runlevels>:\n" \
1889"\n" \
1890" The runlevels field is completely ignored.\n" \
1891"\n" \
1892" <action>:\n" \
1893"\n" \
1894" Valid actions include: sysinit, respawn, askfirst, wait,\n" \
1895" once, restart, ctrlaltdel, and shutdown.\n" \
1896"\n" \
1897" The available actions can be classified into two groups: actions\n" \
1898" that are run only once, and actions that are re-run when the specified\n" \
1899" process exits.\n" \
1900"\n" \
1901" Run only-once actions:\n" \
1902"\n" \
1903" 'sysinit' is the first item run on boot. init waits until all\n" \
1904" sysinit actions are completed before continuing. Following the\n" \
1905" completion of all sysinit actions, all 'wait' actions are run.\n" \
1906" 'wait' actions, like 'sysinit' actions, cause init to wait until\n" \
1907" the specified task completes. 'once' actions are asynchronous,\n" \
1908" therefore, init does not wait for them to complete. 'restart' is\n" \
1909" the action taken to restart the init process. By default this should\n" \
1910" simply run /sbin/init, but can be a script which runs pivot_root or it\n" \
1911" can do all sorts of other interesting things. The 'ctrlaltdel' init\n" \
1912" actions are run when the system detects that someone on the system\n" \
1913" console has pressed the CTRL-ALT-DEL key combination. Typically one\n" \
1914" wants to run 'reboot' at this point to cause the system to reboot.\n" \
1915" Finally the 'shutdown' action specifies the actions to taken when\n" \
1916" init is told to reboot. Unmounting filesystems and disabling swap\n" \
1917" is a very good here.\n" \
1918"\n" \
1919" Run repeatedly actions:\n" \
1920"\n" \
1921" 'respawn' actions are run after the 'once' actions. When a process\n" \
1922" started with a 'respawn' action exits, init automatically restarts\n" \
1923" it. Unlike sysvinit, BusyBox init does not stop processes from\n" \
1924" respawning out of control. The 'askfirst' actions acts just like\n" \
1925" respawn, except that before running the specified process it\n" \
1926" displays the line \"Please press Enter to activate this console.\"\n" \
1927" and then waits for the user to press enter before starting the\n" \
1928" specified process.\n" \
1929"\n" \
1930" Unrecognized actions (like initdefault) will cause init to emit an\n" \
1931" error message, and then go along with its business. All actions are\n" \
1932" run in the order they appear in /etc/inittab.\n" \
1933"\n" \
1934" <process>:\n" \
1935"\n" \
1936" Specifies the process to be executed and its command line.\n" \
1937"\n" \
1938"Example /etc/inittab file:\n" \
1939"\n" \
1940" # This is run first except when booting in single-user mode\n" \
1941" #\n" \
1942" ::sysinit:/etc/init.d/rcS\n" \
1943" \n" \
1944" # /bin/sh invocations on selected ttys\n" \
1945" #\n" \
1946" # Start an \"askfirst\" shell on the console (whatever that may be)\n" \
1947" ::askfirst:-/bin/sh\n" \
1948" # Start an \"askfirst\" shell on /dev/tty2-4\n" \
1949" tty2::askfirst:-/bin/sh\n" \
1950" tty3::askfirst:-/bin/sh\n" \
1951" tty4::askfirst:-/bin/sh\n" \
1952" \n" \
1953" # /sbin/getty invocations for selected ttys\n" \
1954" #\n" \
1955" tty4::respawn:/sbin/getty 38400 tty4\n" \
1956" tty5::respawn:/sbin/getty 38400 tty5\n" \
1957" \n" \
1958" \n" \
1959" # Example of how to put a getty on a serial line (for a terminal)\n" \
1960" #\n" \
1961" #::respawn:/sbin/getty -L ttyS0 9600 vt100\n" \
1962" #::respawn:/sbin/getty -L ttyS1 9600 vt100\n" \
1963" #\n" \
1964" # Example how to put a getty on a modem line\n" \
1965" #::respawn:/sbin/getty 57600 ttyS2\n" \
1966" \n" \
1967" # Stuff to do when restarting the init process\n" \
1968" ::restart:/sbin/init\n" \
1969" \n" \
1970" # Stuff to do before rebooting\n" \
1971" ::ctrlaltdel:/sbin/reboot\n" \
1972" ::shutdown:/bin/umount -a -r\n" \
1973" ::shutdown:/sbin/swapoff -a\n"
1974
1975#define inotifyd_trivial_usage \ 1793#define inotifyd_trivial_usage \
1976 "PROG FILE1[:MASK]..." 1794 "PROG FILE1[:MASK]..."
1977#define inotifyd_full_usage "\n\n" \ 1795#define inotifyd_full_usage "\n\n" \
@@ -2303,7 +2121,7 @@ INSERT
2303 "root\n" 2121 "root\n"
2304 2122
2305#define logread_trivial_usage \ 2123#define logread_trivial_usage \
2306 "[OPTIONS]" 2124 "[-f]"
2307#define logread_full_usage "\n\n" \ 2125#define logread_full_usage "\n\n" \
2308 "Show messages in syslogd's circular buffer\n" \ 2126 "Show messages in syslogd's circular buffer\n" \
2309 "\nOptions:" \ 2127 "\nOptions:" \
@@ -2430,11 +2248,6 @@ INSERT
2430 "\n -l List long flag names" \ 2248 "\n -l List long flag names" \
2431 "\n -v List the file's version/generation number" \ 2249 "\n -v List the file's version/generation number" \
2432 2250
2433#define lsmod_trivial_usage \
2434 ""
2435#define lsmod_full_usage "\n\n" \
2436 "List the currently loaded kernel modules"
2437
2438#define lspci_trivial_usage \ 2251#define lspci_trivial_usage \
2439 "[-mk]" 2252 "[-mk]"
2440#define lspci_full_usage "\n\n" \ 2253#define lspci_full_usage "\n\n" \
@@ -2520,7 +2333,7 @@ INSERT
2520 "\nOther options are silently ignored" \ 2333 "\nOther options are silently ignored" \
2521 2334
2522#define man_trivial_usage \ 2335#define man_trivial_usage \
2523 "[OPTIONS] [MANPAGE]..." 2336 "[-aw] [MANPAGE]..."
2524#define man_full_usage "\n\n" \ 2337#define man_full_usage "\n\n" \
2525 "Format and display manual page\n" \ 2338 "Format and display manual page\n" \
2526 "\nOptions:" \ 2339 "\nOptions:" \
@@ -2537,8 +2350,8 @@ INSERT
2537 "\n -V Verify file context on disk matches defaults" \ 2350 "\n -V Verify file context on disk matches defaults" \
2538 2351
2539#define md5sum_trivial_usage \ 2352#define md5sum_trivial_usage \
2540 "[OPTIONS] [FILE]..." \ 2353 "[FILE]..." \
2541 IF_FEATURE_MD5_SHA1_SUM_CHECK("\n or: md5sum [OPTIONS] -c [FILE]") 2354 IF_FEATURE_MD5_SHA1_SUM_CHECK("\n or: md5sum -c [-sw] [FILE]")
2542#define md5sum_full_usage "\n\n" \ 2355#define md5sum_full_usage "\n\n" \
2543 "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " MD5 checksums" \ 2356 "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " MD5 checksums" \
2544 IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \ 2357 IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
@@ -2559,8 +2372,8 @@ INSERT
2559 "^D\n" 2372 "^D\n"
2560 2373
2561#define sha1sum_trivial_usage \ 2374#define sha1sum_trivial_usage \
2562 "[OPTIONS] [FILE]..." \ 2375 "[FILE]..." \
2563 IF_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha1sum [OPTIONS] -c [FILE]") 2376 IF_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha1sum -c [-sw] [FILE]")
2564#define sha1sum_full_usage "\n\n" \ 2377#define sha1sum_full_usage "\n\n" \
2565 "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA1 checksums" \ 2378 "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA1 checksums" \
2566 IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \ 2379 IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
@@ -2571,8 +2384,8 @@ INSERT
2571 ) 2384 )
2572 2385
2573#define sha256sum_trivial_usage \ 2386#define sha256sum_trivial_usage \
2574 "[OPTIONS] [FILE]..." \ 2387 "[FILE]..." \
2575 IF_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha256sum [OPTIONS] -c [FILE]") 2388 IF_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha256sum -c [-sw] [FILE]")
2576#define sha256sum_full_usage "\n\n" \ 2389#define sha256sum_full_usage "\n\n" \
2577 "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA256 checksums" \ 2390 "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA256 checksums" \
2578 IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \ 2391 IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
@@ -2583,8 +2396,8 @@ INSERT
2583 ) 2396 )
2584 2397
2585#define sha512sum_trivial_usage \ 2398#define sha512sum_trivial_usage \
2586 "[OPTIONS] [FILE]..." \ 2399 "[FILE]..." \
2587 IF_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha512sum [OPTIONS] -c [FILE]") 2400 IF_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha512sum -c [-sw] [FILE]")
2588#define sha512sum_full_usage "\n\n" \ 2401#define sha512sum_full_usage "\n\n" \
2589 "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA512 checksums" \ 2402 "Print" IF_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA512 checksums" \
2590 IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \ 2403 IF_FEATURE_MD5_SHA1_SUM_CHECK( "\n" \
@@ -2628,13 +2441,6 @@ INSERT
2628 "the last line match .* to override this.)\n\n" \ 2441 "the last line match .* to override this.)\n\n" \
2629 ) 2442 )
2630 2443
2631#define mesg_trivial_usage \
2632 "[y|n]"
2633#define mesg_full_usage "\n\n" \
2634 "Control write access to your terminal\n" \
2635 " y Allow write access to your terminal\n" \
2636 " n Disallow write access to your terminal"
2637
2638#define microcom_trivial_usage \ 2444#define microcom_trivial_usage \
2639 "[-d DELAY] [-t TIMEOUT] [-s SPEED] [-X] TTY" 2445 "[-d DELAY] [-t TIMEOUT] [-s SPEED] [-X] TTY"
2640#define microcom_full_usage "\n\n" \ 2446#define microcom_full_usage "\n\n" \
@@ -2651,7 +2457,7 @@ INSERT
2651#define mkdir_full_usage "\n\n" \ 2457#define mkdir_full_usage "\n\n" \
2652 "Create DIRECTORY\n" \ 2458 "Create DIRECTORY\n" \
2653 "\nOptions:" \ 2459 "\nOptions:" \
2654 "\n -m Mode" \ 2460 "\n -m MODE Mode" \
2655 "\n -p No error if exists; make parent directories as needed" \ 2461 "\n -p No error if exists; make parent directories as needed" \
2656 IF_SELINUX( \ 2462 IF_SELINUX( \
2657 "\n -Z Set security context" \ 2463 "\n -Z Set security context" \
@@ -2666,9 +2472,9 @@ INSERT
2666 "$ mkdir -p /tmp/foo/bar/baz\n" 2472 "$ mkdir -p /tmp/foo/bar/baz\n"
2667 2473
2668#define mkfifo_trivial_usage \ 2474#define mkfifo_trivial_usage \
2669 "[OPTIONS] name" 2475 "[-m MODE] " IF_SELINUX("[-Z] ") "NAME"
2670#define mkfifo_full_usage "\n\n" \ 2476#define mkfifo_full_usage "\n\n" \
2671 "Create named pipe (identical to 'mknod name p')\n" \ 2477 "Create named pipe\n" \
2672 "\nOptions:" \ 2478 "\nOptions:" \
2673 "\n -m MODE Mode (default a=rw)" \ 2479 "\n -m MODE Mode (default a=rw)" \
2674 IF_SELINUX( \ 2480 IF_SELINUX( \
@@ -2750,25 +2556,25 @@ INSERT
2750 "\n -n LBL Volume label" \ 2556 "\n -n LBL Volume label" \
2751 2557
2752#define mknod_trivial_usage \ 2558#define mknod_trivial_usage \
2753 "[OPTIONS] NAME TYPE MAJOR MINOR" 2559 "[-m MODE] " IF_SELINUX("[-Z] ") "NAME TYPE MAJOR MINOR"
2754#define mknod_full_usage "\n\n" \ 2560#define mknod_full_usage "\n\n" \
2755 "Create a special file (block, character, or pipe)\n" \ 2561 "Create a special file (block, character, or pipe)\n" \
2756 "\nOptions:" \ 2562 "\nOptions:" \
2757 "\n -m Create the special file using the specified mode (default a=rw)" \ 2563 "\n -m MODE Creation mode (default a=rw)" \
2758 "\nTYPEs include:" \
2759 "\n b: Make a block device" \
2760 "\n c or u: Make a character device" \
2761 "\n p: Make a named pipe (MAJOR and MINOR are ignored)" \
2762 IF_SELINUX( \ 2564 IF_SELINUX( \
2763 "\n -Z Set security context" \ 2565 "\n -Z Set security context" \
2764 ) 2566 ) \
2567 "\nTYPE:" \
2568 "\n b Block device" \
2569 "\n c or u Character device" \
2570 "\n p Named pipe (MAJOR and MINOR are ignored)" \
2765 2571
2766#define mknod_example_usage \ 2572#define mknod_example_usage \
2767 "$ mknod /dev/fd0 b 2 0\n" \ 2573 "$ mknod /dev/fd0 b 2 0\n" \
2768 "$ mknod -m 644 /tmp/pipe p\n" 2574 "$ mknod -m 644 /tmp/pipe p\n"
2769 2575
2770#define mkswap_trivial_usage \ 2576#define mkswap_trivial_usage \
2771 "[OPTIONS] BLOCKDEV [KBYTES]" 2577 "[-L LBL] BLOCKDEV [KBYTES]"
2772#define mkswap_full_usage "\n\n" \ 2578#define mkswap_full_usage "\n\n" \
2773 "Prepare BLOCKDEV to be used as swap partition\n" \ 2579 "Prepare BLOCKDEV to be used as swap partition\n" \
2774 "\nOptions:" \ 2580 "\nOptions:" \
@@ -2890,8 +2696,8 @@ INSERT
2890 "setpart tell unload unlock weof wset" \ 2696 "setpart tell unload unlock weof wset" \
2891 2697
2892#define mv_trivial_usage \ 2698#define mv_trivial_usage \
2893 "[OPTIONS] SOURCE DEST\n" \ 2699 "[-fi] SOURCE DEST\n" \
2894 "or: mv [OPTIONS] SOURCE... DIRECTORY" 2700 "or: mv [-fi] SOURCE... DIRECTORY"
2895#define mv_full_usage "\n\n" \ 2701#define mv_full_usage "\n\n" \
2896 "Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY\n" \ 2702 "Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY\n" \
2897 "\nOptions:" \ 2703 "\nOptions:" \
@@ -3026,7 +2832,7 @@ INSERT
3026 "Change USER's password. If no USER is specified,\n" \ 2832 "Change USER's password. If no USER is specified,\n" \
3027 "changes the password for the current user.\n" \ 2833 "changes the password for the current user.\n" \
3028 "\nOptions:" \ 2834 "\nOptions:" \
3029 "\n -a Algorithm to use for password (des, md5)" /* ", sha1)" */ \ 2835 "\n -a ALG Algorithm to use for password (des, md5)" /* ", sha1)" */ \
3030 "\n -d Delete password for the account" \ 2836 "\n -d Delete password for the account" \
3031 "\n -l Lock (disable) account" \ 2837 "\n -l Lock (disable) account" \
3032 "\n -u Unlock (re-enable) account" \ 2838 "\n -u Unlock (re-enable) account" \
@@ -3093,10 +2899,12 @@ INSERT
3093 "List PIDs of all processes with names that match NAMEs" \ 2899 "List PIDs of all processes with names that match NAMEs" \
3094 USAGE_PIDOF \ 2900 USAGE_PIDOF \
3095 IF_FEATURE_PIDOF_SINGLE( \ 2901 IF_FEATURE_PIDOF_SINGLE( \
3096 "\n -s Show only one PID") \ 2902 "\n -s Show only one PID" \
2903 ) \
3097 IF_FEATURE_PIDOF_OMIT( \ 2904 IF_FEATURE_PIDOF_OMIT( \
3098 "\n -o PID Omit given pid" \ 2905 "\n -o PID Omit given pid" \
3099 "\n Use %PPID to omit pid of pidof's parent") \ 2906 "\n Use %PPID to omit pid of pidof's parent" \
2907 ) \
3100 2908
3101#define pidof_example_usage \ 2909#define pidof_example_usage \
3102 "$ pidof init\n" \ 2910 "$ pidof init\n" \
@@ -3121,7 +2929,7 @@ INSERT
3121#define ping_full_usage "\n\n" \ 2929#define ping_full_usage "\n\n" \
3122 "Send ICMP ECHO_REQUEST packets to network hosts\n" \ 2930 "Send ICMP ECHO_REQUEST packets to network hosts\n" \
3123 "\nOptions:" \ 2931 "\nOptions:" \
3124 "\n -4, -6 Force IP or IPv6 name resolution" \ 2932 "\n -4,-6 Force IP or IPv6 name resolution" \
3125 "\n -c CNT Send only CNT pings" \ 2933 "\n -c CNT Send only CNT pings" \
3126 "\n -s SIZE Send SIZE data bytes in packets (default:56)" \ 2934 "\n -s SIZE Send SIZE data bytes in packets (default:56)" \
3127 "\n -I IFACE/IP Use interface or IP address as source" \ 2935 "\n -I IFACE/IP Use interface or IP address as source" \
@@ -3216,15 +3024,6 @@ INSERT
3216 "$ popmaildir -k ~/Maildir -- nc pop.drvv.ru 110 [<password_file]\n" \ 3024 "$ popmaildir -k ~/Maildir -- nc pop.drvv.ru 110 [<password_file]\n" \
3217 "$ popmaildir ~/Maildir -- openssl s_client -quiet -connect pop.gmail.com:995 [<password_file]\n" 3025 "$ popmaildir ~/Maildir -- openssl s_client -quiet -connect pop.gmail.com:995 [<password_file]\n"
3218 3026
3219#define poweroff_trivial_usage \
3220 "[-d DELAY] [-n] [-f]"
3221#define poweroff_full_usage "\n\n" \
3222 "Halt and shut off power\n" \
3223 "\nOptions:" \
3224 "\n -d Delay interval for halting" \
3225 "\n -n Do not sync" \
3226 "\n -f Force power off (don't go through init)" \
3227
3228#define printenv_trivial_usage \ 3027#define printenv_trivial_usage \
3229 "[VARIABLE]..." 3028 "[VARIABLE]..."
3230#define printenv_full_usage "\n\n" \ 3029#define printenv_full_usage "\n\n" \
@@ -3367,15 +3166,6 @@ INSERT
3367#define realpath_full_usage "\n\n" \ 3166#define realpath_full_usage "\n\n" \
3368 "Return the absolute pathnames of given FILE" 3167 "Return the absolute pathnames of given FILE"
3369 3168
3370#define reboot_trivial_usage \
3371 "[-d DELAY] [-n] [-f]"
3372#define reboot_full_usage "\n\n" \
3373 "Reboot the system\n" \
3374 "\nOptions:" \
3375 "\n -d Delay interval for rebooting" \
3376 "\n -n No call to sync()" \
3377 "\n -f Force reboot (don't go through init)" \
3378
3379#define reformime_trivial_usage \ 3169#define reformime_trivial_usage \
3380 "[OPTIONS] [FILE]..." 3170 "[OPTIONS] [FILE]..."
3381#define reformime_full_usage "\n\n" \ 3171#define reformime_full_usage "\n\n" \
@@ -3431,7 +3221,7 @@ INSERT
3431 "\n wimax, wwan, gps, fm" \ 3221 "\n wimax, wwan, gps, fm" \
3432 3222
3433#define rm_trivial_usage \ 3223#define rm_trivial_usage \
3434 "[OPTIONS] FILE..." 3224 "[-irf] FILE..."
3435#define rm_full_usage "\n\n" \ 3225#define rm_full_usage "\n\n" \
3436 "Remove (unlink) FILEs\n" \ 3226 "Remove (unlink) FILEs\n" \
3437 "\nOptions:" \ 3227 "\nOptions:" \
@@ -3458,18 +3248,6 @@ INSERT
3458#define rmdir_example_usage \ 3248#define rmdir_example_usage \
3459 "# rmdir /tmp/foo\n" 3249 "# rmdir /tmp/foo\n"
3460 3250
3461#define rmmod_trivial_usage \
3462 "[OPTIONS] [MODULE]..."
3463#define rmmod_full_usage "\n\n" \
3464 "Unload the specified kernel modules from the kernel\n" \
3465 "\nOptions:" \
3466 "\n -w Wait until the module is no longer used" \
3467 "\n -f Force unloading" \
3468 "\n -a Remove all unused modules (recursively)" \
3469
3470#define rmmod_example_usage \
3471 "$ rmmod tulip\n"
3472
3473#define route_trivial_usage \ 3251#define route_trivial_usage \
3474 "[{add|del|delete}]" 3252 "[{add|del|delete}]"
3475#define route_full_usage "\n\n" \ 3253#define route_full_usage "\n\n" \
@@ -3849,9 +3627,9 @@ INSERT
3849 "[OPTIONS] [INPUT [PREFIX]]" 3627 "[OPTIONS] [INPUT [PREFIX]]"
3850#define split_full_usage "\n\n" \ 3628#define split_full_usage "\n\n" \
3851 "Options:" \ 3629 "Options:" \
3852 "\n -b n[k|m] Split by bytes" \ 3630 "\n -b N[k|m] Split by N (kilo|mega)bytes" \
3853 "\n -l n Split by lines" \ 3631 "\n -l N Split by N lines" \
3854 "\n -a n Use n letters as suffix" \ 3632 "\n -a N Use N letters as suffix" \
3855 3633
3856#define split_example_usage \ 3634#define split_example_usage \
3857 "$ split TODO foo\n" \ 3635 "$ split TODO foo\n" \
@@ -4080,7 +3858,7 @@ INSERT
4080 "Write all buffered blocks to disk" 3858 "Write all buffered blocks to disk"
4081 3859
4082#define fsync_trivial_usage \ 3860#define fsync_trivial_usage \
4083 "[OPTIONS] FILE..." 3861 "[-d] FILE..."
4084#define fsync_full_usage "\n\n" \ 3862#define fsync_full_usage "\n\n" \
4085 "Write files' buffered blocks to disk\n" \ 3863 "Write files' buffered blocks to disk\n" \
4086 "\nOptions:" \ 3864 "\nOptions:" \
@@ -4156,7 +3934,7 @@ INSERT
4156 "pid 1's current affinity mask: 3\n" 3934 "pid 1's current affinity mask: 3\n"
4157 3935
4158#define tee_trivial_usage \ 3936#define tee_trivial_usage \
4159 "[OPTIONS] [FILE]..." 3937 "[-ai] [FILE]..."
4160#define tee_full_usage "\n\n" \ 3938#define tee_full_usage "\n\n" \
4161 "Copy stdin to each FILE, and also to stdout\n" \ 3939 "Copy stdin to each FILE, and also to stdout\n" \
4162 "\nOptions:" \ 3940 "\nOptions:" \
@@ -4261,7 +4039,7 @@ INSERT
4261 "\n -u USER[:GRP] Change to user/group after bind" \ 4039 "\n -u USER[:GRP] Change to user/group after bind" \
4262 "\n -c N Handle up to N connections simultaneously" \ 4040 "\n -c N Handle up to N connections simultaneously" \
4263 "\n -b N Allow a backlog of approximately N TCP SYNs" \ 4041 "\n -b N Allow a backlog of approximately N TCP SYNs" \
4264 "\n -C N[:MSG] Allow only up to N connections from the same IP" \ 4042 "\n -C N[:MSG] Allow only up to N connections from the same IP." \
4265 "\n New connections from this IP address are closed" \ 4043 "\n New connections from this IP address are closed" \
4266 "\n immediately. MSG is written to the peer before close" \ 4044 "\n immediately. MSG is written to the peer before close" \
4267 "\n -h Look up peer's hostname" \ 4045 "\n -h Look up peer's hostname" \
@@ -4317,7 +4095,7 @@ INSERT
4317 "\n -u Access files as USER" \ 4095 "\n -u Access files as USER" \
4318 4096
4319#define time_trivial_usage \ 4097#define time_trivial_usage \
4320 "[OPTIONS] PROG ARGS" 4098 "[-v] PROG ARGS"
4321#define time_full_usage "\n\n" \ 4099#define time_full_usage "\n\n" \
4322 "Run PROG, display resource usage when it exits\n" \ 4100 "Run PROG, display resource usage when it exits\n" \
4323 "\nOptions:" \ 4101 "\nOptions:" \
@@ -4338,12 +4116,13 @@ INSERT
4338//TODO: add options and keyboard commands 4116//TODO: add options and keyboard commands
4339 4117
4340#define touch_trivial_usage \ 4118#define touch_trivial_usage \
4341 "[-c] [-d DATE] FILE [FILE]..." 4119 "[-c] [-d DATE] [-r FILE] FILE [FILE]..."
4342#define touch_full_usage "\n\n" \ 4120#define touch_full_usage "\n\n" \
4343 "Update the last-modified date on the given FILE[s]\n" \ 4121 "Update the last-modified date on the given FILE[s]\n" \
4344 "\nOptions:" \ 4122 "\nOptions:" \
4345 "\n -c Don't create files" \ 4123 "\n -c Don't create files" \
4346 "\n -d DT Date/time to use" \ 4124 "\n -d DT Date/time to use" \
4125 "\n -r FILE Use FILE's date/time" \
4347 4126
4348#define touch_example_usage \ 4127#define touch_example_usage \
4349 "$ ls -l /tmp/foo\n" \ 4128 "$ ls -l /tmp/foo\n" \
@@ -4373,7 +4152,7 @@ INSERT
4373 "Trace the route to HOST\n" \ 4152 "Trace the route to HOST\n" \
4374 "\nOptions:" \ 4153 "\nOptions:" \
4375 IF_TRACEROUTE6( \ 4154 IF_TRACEROUTE6( \
4376 "\n -4, -6 Force IP or IPv6 name resolution" \ 4155 "\n -4,-6 Force IP or IPv6 name resolution" \
4377 ) \ 4156 ) \
4378 "\n -F Set the don't fragment bit" \ 4157 "\n -F Set the don't fragment bit" \
4379 "\n -I Use ICMP ECHO instead of UDP datagrams" \ 4158 "\n -I Use ICMP ECHO instead of UDP datagrams" \
@@ -4453,18 +4232,6 @@ INSERT
4453 "# tunctl\n" \ 4232 "# tunctl\n" \
4454 "# tunctl -d tun0\n" 4233 "# tunctl -d tun0\n"
4455 4234
4456#define tune2fs_trivial_usage \
4457/* "[-c max-mounts-count] [-e errors-behavior] [-g group] " */ \
4458/* "[-i interval[d|m|w]] [-j] [-J journal-options] [-l] [-s sparse-flag] " */ \
4459/* "[-m reserved-blocks-percent] [-o [^]mount-options[,...]] " */ \
4460/* "[-r reserved-blocks-count] [-u user] [-C mount-count] " */ \
4461 "[-L LABEL] " \
4462/* "[-M last-mounted-dir] [-O [^]feature[,...]] " */ \
4463/* "[-T last-check-time] [-U UUID] " */ \
4464 "BLOCKDEV"
4465#define tune2fs_full_usage "\n\n" \
4466 "Adjust filesystem options on ext[23] filesystems"
4467
4468#if defined CONFIG_UDHCP_DEBUG && CONFIG_UDHCP_DEBUG >= 1 4235#if defined CONFIG_UDHCP_DEBUG && CONFIG_UDHCP_DEBUG >= 1
4469# define IF_UDHCP_VERBOSE(...) __VA_ARGS__ 4236# define IF_UDHCP_VERBOSE(...) __VA_ARGS__
4470#else 4237#else
@@ -4708,13 +4475,15 @@ INSERT
4708 "Edit FILE\n" \ 4475 "Edit FILE\n" \
4709 "\nOptions:" \ 4476 "\nOptions:" \
4710 IF_FEATURE_VI_COLON( \ 4477 IF_FEATURE_VI_COLON( \
4711 "\n -c Initial command to run ($EXINIT also available)") \ 4478 "\n -c Initial command to run ($EXINIT also available)" \
4479 ) \
4712 IF_FEATURE_VI_READONLY( \ 4480 IF_FEATURE_VI_READONLY( \
4713 "\n -R Read-only") \ 4481 "\n -R Read-only" \
4482 ) \
4714 "\n -H Short help regarding available features" \ 4483 "\n -H Short help regarding available features" \
4715 4484
4716#define vlock_trivial_usage \ 4485#define vlock_trivial_usage \
4717 "[OPTIONS]" 4486 "[-a]"
4718#define vlock_full_usage "\n\n" \ 4487#define vlock_full_usage "\n\n" \
4719 "Lock a virtual terminal. A password is required to unlock.\n" \ 4488 "Lock a virtual terminal. A password is required to unlock.\n" \
4720 "\nOptions:" \ 4489 "\nOptions:" \
@@ -4758,21 +4527,6 @@ INSERT
4758 "\n" \ 4527 "\n" \
4759 "\nUse 500ms to specify period in milliseconds" \ 4528 "\nUse 500ms to specify period in milliseconds" \
4760 4529
4761#define wc_trivial_usage \
4762 "[OPTIONS] [FILE]..."
4763#define wc_full_usage "\n\n" \
4764 "Print line, word, and byte counts for each FILE (or stdin),\n" \
4765 "and a total line if more than one FILE is specified\n" \
4766 "\nOptions:" \
4767 "\n -c Print the byte counts" \
4768 "\n -l Print the newline counts" \
4769 "\n -L Print the length of the longest line" \
4770 "\n -w Print the word counts" \
4771
4772#define wc_example_usage \
4773 "$ wc /etc/passwd\n" \
4774 " 31 46 1365 /etc/passwd\n"
4775
4776#define wget_trivial_usage \ 4530#define wget_trivial_usage \
4777 IF_FEATURE_WGET_LONG_OPTIONS( \ 4531 IF_FEATURE_WGET_LONG_OPTIONS( \
4778 "[-c|--continue] [-s|--spider] [-q|--quiet] [-O|--output-document FILE]\n" \ 4532 "[-c|--continue] [-s|--spider] [-q|--quiet] [-O|--output-document FILE]\n" \