| 12 | | diff -urN busybox/include/libbb.h busybox.cryptpw/include/libbb.h |
| 13 | | --- busybox/include/libbb.h 2006-06-11 01:20:34.000000000 -0600 |
| 14 | | +++ busybox.cryptpw/include/libbb.h 2006-06-13 15:01:36.000000000 -0600 |
| 15 | | @@ -461,6 +461,8 @@ |
| 16 | | extern char *pw_encrypt(const char *clear, const char *salt); |
| 17 | | extern struct spwd *pwd_to_spwd(const struct passwd *pw); |
| 18 | | extern int obscure(const char *old, const char *newval, const struct passwd *pwdp); |
| 19 | | +extern int get_algo(char *a); |
| 20 | | +extern char *crypt_make_salt(void); |
| 21 | | |
| 22 | | extern int bb_xopen(const char *pathname, int flags); |
| 23 | | extern int bb_xopen3(const char *pathname, int flags, int mode); |
| 24 | | diff -urN busybox/include/usage.h busybox.cryptpw/include/usage.h |
| 25 | | --- busybox/include/usage.h 2006-06-11 01:20:34.000000000 -0600 |
| 26 | | +++ busybox.cryptpw/include/usage.h 2006-06-13 15:01:36.000000000 -0600 |
| 27 | | @@ -313,6 +313,20 @@ |
| 28 | | "\t-d [user] delete crontab for user\n" \ |
| 29 | | "\t-c dir specify crontab directory" |
| | 12 | diff -urN busybox-1.5.0/include/applets.h.orig busybox-1.5.0-cryptpw/include/applets.h.orig |
| | 13 | --- busybox-1.5.0/include/applets.h.orig 1969-12-31 17:00:00.000000000 -0700 |
| | 14 | +++ busybox-1.5.0-cryptpw/include/applets.h.orig 2007-03-22 13:21:35.000000000 -0700 |
| | 15 | @@ -0,0 +1,341 @@ |
| | 16 | +/* vi: set sw=4 ts=4: */ |
| | 17 | +/* |
| | 18 | + * applets.h - a listing of all busybox applets. |
| | 19 | + * |
| | 20 | + * If you write a new applet, you need to add an entry to this list to make |
| | 21 | + * busybox aware of it. |
| | 22 | + * |
| | 23 | + * It is CRUCIAL that this listing be kept in ascii order, otherwise the binary |
| | 24 | + * search lookup contributed by Gaute B Strokkenes stops working. If you value |
| | 25 | + * your kneecaps, you'll be sure to *make sure* that any changes made to this |
| | 26 | + * file result in the listing remaining in ascii order. You have been warned. |
| | 27 | + */ |
| | 28 | + |
| | 29 | +#undef APPLET |
| | 30 | +#undef APPLET_ODDNAME |
| | 31 | +#undef APPLET_NOUSAGE |
| | 32 | + |
| | 33 | +#if defined(PROTOTYPES) |
| | 34 | +# define APPLET(a,b,c) extern int a##_main(int argc, char **argv); |
| | 35 | +# define APPLET_NOUSAGE(a,b,c,d) extern int b##_main(int argc, char **argv); |
| | 36 | +# define APPLET_ODDNAME(a,b,c,d,e) extern int b##_main(int argc, char **argv); |
| | 37 | +#elif defined(MAKE_USAGE) |
| | 38 | +# ifdef CONFIG_FEATURE_VERBOSE_USAGE |
| | 39 | +# define APPLET(a,b,c) a##_trivial_usage "\n\n" a##_full_usage "\0" |
| | 40 | +# define APPLET_NOUSAGE(a,b,c,d) "\b\0" |
| | 41 | +# define APPLET_ODDNAME(a,b,c,d,e) e##_trivial_usage "\n\n" e##_full_usage "\0" |
| | 42 | +# else |
| | 43 | +# define APPLET(a,b,c) a##_trivial_usage "\0" |
| | 44 | +# define APPLET_NOUSAGE(a,b,c,d) "\b\0" |
| | 45 | +# define APPLET_ODDNAME(a,b,c,d,e) e##_trivial_usage "\0" |
| | 46 | +# endif |
| | 47 | +#elif defined(MAKE_LINKS) |
| | 48 | +# define APPLET(a,b,c) LINK b a |
| | 49 | +# define APPLET_NOUSAGE(a,b,c,d) LINK c a |
| | 50 | +# define APPLET_ODDNAME(a,b,c,d,e) LINK c a |
| | 51 | +#else |
| | 52 | + const struct BB_applet applets[] = { |
| | 53 | +# define APPLET(a,b,c) {#a,a##_main,b,c}, |
| | 54 | +# define APPLET_NOUSAGE(a,b,c,d) {#a,b##_main,c,d}, |
| | 55 | +# define APPLET_ODDNAME(a,b,c,d,e) {#a,b##_main,c,d}, |
| | 56 | +#endif |
| | 57 | + |
| | 58 | +#ifdef CONFIG_INSTALL_NO_USR |
| | 59 | +# define _BB_DIR_USR_BIN _BB_DIR_BIN |
| | 60 | +# define _BB_DIR_USR_SBIN _BB_DIR_SBIN |
| | 61 | +#endif |
| | 62 | + |
| | 63 | +// _BB_SUID_ALWAYS: will complain if busybox isn't suid |
| | 64 | +// and is run by non-root (applet_main() will not be called at all) |
| | 65 | +// _BB_SUID_NEVER: will drop suid prior to applet_main() |
| | 66 | +// _BB_SUID_MAYBE: neither of the above |
| | 67 | + |
| | 68 | +USE_TEST(APPLET_NOUSAGE([, test, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 69 | +USE_TEST(APPLET_NOUSAGE([[, test, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 70 | +USE_ADDGROUP(APPLET(addgroup, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 71 | +USE_ADDUSER(APPLET(adduser, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 72 | +USE_ADJTIMEX(APPLET(adjtimex, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 73 | +USE_AR(APPLET(ar, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 74 | +USE_ARP(APPLET(arp, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 75 | +USE_ARPING(APPLET(arping, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 76 | +USE_ASH(APPLET_NOUSAGE(ash, ash, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 77 | +USE_AWK(APPLET(awk, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 78 | +USE_BASENAME(APPLET(basename, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 79 | +USE_BBCONFIG(APPLET(bbconfig, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 80 | +//USE_BBSH(APPLET(bbsh, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 81 | +USE_BUNZIP2(APPLET(bunzip2, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 82 | +USE_BUNZIP2(APPLET_ODDNAME(bzcat, bunzip2, _BB_DIR_USR_BIN, _BB_SUID_NEVER, bzcat)) |
| | 83 | +USE_CAL(APPLET(cal, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 84 | +USE_CAT(APPLET(cat, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 85 | +USE_CATV(APPLET(catv, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 86 | +USE_CHATTR(APPLET(chattr, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 87 | +USE_CHCON(APPLET(chcon, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 88 | +USE_CHGRP(APPLET(chgrp, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 89 | +USE_CHMOD(APPLET(chmod, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 90 | +USE_CHOWN(APPLET(chown, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 91 | +USE_CHPST(APPLET(chpst, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 92 | +USE_CHROOT(APPLET(chroot, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) |
| | 93 | +USE_CHRT(APPLET(chrt, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 94 | +USE_CHVT(APPLET(chvt, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 95 | +USE_CKSUM(APPLET(cksum, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 96 | +USE_CLEAR(APPLET(clear, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 97 | +USE_CMP(APPLET(cmp, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 98 | +USE_COMM(APPLET(comm, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 99 | +USE_CP(APPLET(cp, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 100 | +USE_CPIO(APPLET(cpio, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 101 | +USE_CROND(APPLET(crond, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) |
| | 102 | +USE_CRONTAB(APPLET(crontab, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS)) |
| | 103 | +USE_CUT(APPLET(cut, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 104 | +USE_DATE(APPLET(date, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 105 | +USE_DC(APPLET(dc, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 106 | +USE_DD(APPLET(dd, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 107 | +USE_DEALLOCVT(APPLET(deallocvt, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 108 | +USE_DELGROUP(APPLET_ODDNAME(delgroup, deluser, _BB_DIR_BIN, _BB_SUID_NEVER, delgroup)) |
| | 109 | +USE_DELUSER(APPLET(deluser, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 110 | +USE_DEVFSD(APPLET(devfsd, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 111 | +USE_DF(APPLET(df, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 112 | +USE_APP_DHCPRELAY(APPLET(dhcprelay, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) |
| | 113 | +USE_DIFF(APPLET(diff, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 114 | +USE_DIRNAME(APPLET(dirname, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 115 | +USE_DMESG(APPLET(dmesg, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 116 | +USE_DNSD(APPLET(dnsd, _BB_DIR_USR_SBIN, _BB_SUID_ALWAYS)) |
| | 117 | +USE_DOS2UNIX(APPLET(dos2unix, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 118 | +USE_DPKG(APPLET(dpkg, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 119 | +USE_DPKG_DEB(APPLET_ODDNAME(dpkg-deb, dpkg_deb, _BB_DIR_USR_BIN, _BB_SUID_NEVER, dpkg_deb)) |
| | 120 | +USE_DU(APPLET(du, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 121 | +USE_DUMPKMAP(APPLET(dumpkmap, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 122 | +USE_APP_DUMPLEASES(APPLET(dumpleases, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 123 | +//USE_E2FSCK(APPLET(e2fsck, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 124 | +//USE_E2LABEL(APPLET_NOUSAGE(e2label, tune2fs, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 125 | +USE_ECHO(APPLET(echo, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 126 | +USE_ED(APPLET(ed, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 127 | +USE_FEATURE_GREP_EGREP_ALIAS(APPLET_NOUSAGE(egrep, grep, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 128 | +USE_EJECT(APPLET(eject, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 129 | +USE_ENV(APPLET(env, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 130 | +USE_ENVDIR(APPLET_ODDNAME(envdir, chpst, _BB_DIR_USR_BIN, _BB_SUID_NEVER, envdir)) |
| | 131 | +USE_ENVUIDGID(APPLET_ODDNAME(envuidgid, chpst, _BB_DIR_USR_BIN, _BB_SUID_NEVER, envuidgid)) |
| | 132 | +USE_ETHER_WAKE(APPLET_ODDNAME(ether-wake, ether_wake, _BB_DIR_USR_BIN, _BB_SUID_NEVER, ether_wake)) |
| | 133 | +USE_EXPR(APPLET(expr, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 134 | +USE_FAKEIDENTD(APPLET(fakeidentd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) |
| | 135 | +USE_FALSE(APPLET(false, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 136 | +USE_FBSET(APPLET(fbset, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) |
| | 137 | +USE_FDFLUSH(APPLET_ODDNAME(fdflush, freeramdisk, _BB_DIR_BIN, _BB_SUID_NEVER, fdflush)) |
| | 138 | +USE_FDFORMAT(APPLET(fdformat, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 139 | +USE_FDISK(APPLET(fdisk, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 140 | +USE_FEATURE_GREP_FGREP_ALIAS(APPLET_NOUSAGE(fgrep, grep, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 141 | +USE_FIND(APPLET(find, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 142 | +//USE_FINDFS(APPLET_NOUSAGE(findfs, tune2fs, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 143 | +USE_FOLD(APPLET(fold, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 144 | +USE_FREE(APPLET(free, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 145 | +USE_FREERAMDISK(APPLET(freeramdisk, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 146 | +USE_FSCK(APPLET(fsck, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 147 | +//USE_E2FSCK(APPLET_NOUSAGE(fsck.ext2, e2fsck, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 148 | +//USE_E2FSCK(APPLET_NOUSAGE(fsck.ext3, e2fsck, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 149 | +USE_FSCK_MINIX(APPLET_ODDNAME(fsck.minix, fsck_minix, _BB_DIR_SBIN, _BB_SUID_NEVER, fsck_minix)) |
| | 150 | +USE_FTPGET(APPLET_ODDNAME(ftpget, ftpgetput, _BB_DIR_USR_BIN, _BB_SUID_NEVER,ftpget)) |
| | 151 | +USE_FTPPUT(APPLET_ODDNAME(ftpput, ftpgetput, _BB_DIR_USR_BIN, _BB_SUID_NEVER,ftpput)) |
| | 152 | +USE_FUSER(APPLET(fuser, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 153 | +USE_GETENFORCE(APPLET(getenforce, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) |
| | 154 | +USE_GETOPT(APPLET(getopt, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 155 | +USE_GETSEBOOL(APPLET(getsebool, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) |
| | 156 | +USE_GETTY(APPLET(getty, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 157 | +USE_GREP(APPLET(grep, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 158 | +USE_GUNZIP(APPLET(gunzip, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 159 | +USE_GZIP(APPLET(gzip, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 160 | +USE_HALT(APPLET(halt, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 161 | +USE_HDPARM(APPLET(hdparm, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 162 | +USE_HEAD(APPLET(head, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 163 | +USE_HEXDUMP(APPLET(hexdump, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 164 | +USE_HOSTID(APPLET(hostid, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 165 | +USE_HOSTNAME(APPLET(hostname, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 166 | +USE_HTTPD(APPLET(httpd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) |
| | 167 | +USE_HUSH(APPLET_NOUSAGE(hush, hush, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 168 | +USE_HWCLOCK(APPLET(hwclock, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 169 | +USE_ID(APPLET(id, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 170 | +USE_IFCONFIG(APPLET(ifconfig, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 171 | +USE_IFUPDOWN(APPLET_ODDNAME(ifdown, ifupdown, _BB_DIR_SBIN, _BB_SUID_NEVER, ifdown)) |
| | 172 | +USE_IFUPDOWN(APPLET_ODDNAME(ifup, ifupdown, _BB_DIR_SBIN, _BB_SUID_NEVER, ifup)) |
| | 173 | +USE_INETD(APPLET(inetd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) |
| | 174 | +USE_INIT(APPLET(init, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 175 | +USE_INSMOD(APPLET(insmod, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 176 | +USE_INSTALL(APPLET(install, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 177 | +USE_IP(APPLET(ip, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 178 | +USE_IPADDR(APPLET(ipaddr, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 179 | +USE_IPCALC(APPLET(ipcalc, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 180 | +USE_IPCRM(APPLET(ipcrm, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS)) |
| | 181 | +USE_IPCS(APPLET(ipcs, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS)) |
| | 182 | +USE_IPLINK(APPLET(iplink, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 183 | +USE_IPROUTE(APPLET(iproute, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 184 | +USE_IPRULE(APPLET(iprule, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 185 | +USE_IPTUNNEL(APPLET(iptunnel, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 186 | +USE_KILL(APPLET(kill, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 187 | +USE_KILLALL(APPLET_ODDNAME(killall, kill, _BB_DIR_USR_BIN, _BB_SUID_NEVER, killall)) |
| | 188 | +USE_KILLALL5(APPLET_ODDNAME(killall5, kill, _BB_DIR_USR_BIN, _BB_SUID_NEVER, killall5)) |
| | 189 | +USE_KLOGD(APPLET(klogd, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 190 | +USE_LASH(APPLET(lash, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 191 | +USE_LAST(APPLET(last, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 192 | +USE_LENGTH(APPLET(length, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 193 | +USE_LESS(APPLET(less, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 194 | +USE_SETARCH(APPLET_NOUSAGE(linux32, setarch, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 195 | +USE_SETARCH(APPLET_NOUSAGE(linux64, setarch, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 196 | +USE_FEATURE_INITRD(APPLET_NOUSAGE(linuxrc, init, _BB_DIR_ROOT, _BB_SUID_NEVER)) |
| | 197 | +USE_LN(APPLET(ln, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 198 | +USE_LOADFONT(APPLET(loadfont, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 199 | +USE_LOADKMAP(APPLET(loadkmap, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 200 | +USE_LOGGER(APPLET(logger, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 201 | +USE_LOGIN(APPLET(login, _BB_DIR_BIN, _BB_SUID_ALWAYS)) |
| | 202 | +USE_LOGNAME(APPLET(logname, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 203 | +USE_LOGREAD(APPLET(logread, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 204 | +USE_LOSETUP(APPLET(losetup, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 205 | +USE_LS(APPLET(ls, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 206 | +USE_LSATTR(APPLET(lsattr, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 207 | +USE_LSMOD(APPLET(lsmod, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 208 | +USE_UNLZMA(APPLET_ODDNAME(lzmacat, unlzma, _BB_DIR_USR_BIN, _BB_SUID_NEVER, lzmacat)) |
| | 209 | +USE_MATCHPATHCON(APPLET(matchpathcon, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) |
| | 210 | +USE_MAKEDEVS(APPLET(makedevs, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 211 | +USE_MD5SUM(APPLET_ODDNAME(md5sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_NEVER, md5sum)) |
| | 212 | +USE_MDEV(APPLET(mdev, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 213 | +USE_MESG(APPLET(mesg, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 214 | +USE_MKDIR(APPLET(mkdir, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 215 | +//USE_MKE2FS(APPLET(mke2fs, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 216 | +USE_MKFIFO(APPLET(mkfifo, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 217 | +//USE_MKE2FS(APPLET_NOUSAGE(mkfs.ext2, mke2fs, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 218 | +//USE_MKE2FS(APPLET_NOUSAGE(mkfs.ext3, mke2fs, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 219 | +USE_MKFS_MINIX(APPLET_ODDNAME(mkfs.minix, mkfs_minix, _BB_DIR_SBIN, _BB_SUID_NEVER, mkfs_minix)) |
| | 220 | +USE_MKNOD(APPLET(mknod, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 221 | +USE_MKSWAP(APPLET(mkswap, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 222 | +USE_MKTEMP(APPLET(mktemp, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 223 | +USE_MODPROBE(APPLET(modprobe, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 224 | +USE_MORE(APPLET(more, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 225 | +USE_MOUNT(APPLET(mount, _BB_DIR_BIN, USE_DESKTOP(_BB_SUID_MAYBE) SKIP_DESKTOP(_BB_SUID_NEVER))) |
| | 226 | +USE_MOUNTPOINT(APPLET(mountpoint, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 227 | +USE_MSH(APPLET_NOUSAGE(msh, msh, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 228 | +USE_MT(APPLET(mt, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 229 | +USE_MV(APPLET(mv, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 230 | +USE_NAMEIF(APPLET(nameif, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 231 | +USE_NC(APPLET(nc, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 232 | +USE_NETSTAT(APPLET(netstat, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 233 | +USE_NICE(APPLET(nice, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 234 | +USE_NMETER(APPLET(nmeter, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 235 | +USE_NOHUP(APPLET(nohup, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 236 | +USE_NSLOOKUP(APPLET(nslookup, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 237 | +USE_OD(APPLET(od, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 238 | +USE_OPENVT(APPLET(openvt, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 239 | +USE_PASSWD(APPLET(passwd, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS)) |
| | 240 | +USE_PATCH(APPLET(patch, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 241 | +USE_PIDOF(APPLET(pidof, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 242 | +USE_PING(APPLET(ping, _BB_DIR_BIN, _BB_SUID_MAYBE)) |
| | 243 | +USE_PING6(APPLET(ping6, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 244 | +USE_PIPE_PROGRESS(APPLET_NOUSAGE(pipe_progress, pipe_progress, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 245 | +USE_PIVOT_ROOT(APPLET(pivot_root, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 246 | +USE_HALT(APPLET_ODDNAME(poweroff, halt, _BB_DIR_SBIN, _BB_SUID_NEVER, poweroff)) |
| | 247 | +USE_PRINTENV(APPLET(printenv, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 248 | +USE_PRINTF(APPLET(printf, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 249 | +USE_PS(APPLET(ps, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 250 | +USE_PWD(APPLET(pwd, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 251 | +USE_RAIDAUTORUN(APPLET(raidautorun, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 252 | +USE_RDATE(APPLET(rdate, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) |
| | 253 | +USE_READAHEAD(APPLET(readahead, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 254 | +USE_READLINK(APPLET(readlink, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 255 | +USE_READPROFILE(APPLET(readprofile, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) |
| | 256 | +USE_REALPATH(APPLET(realpath, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 257 | +USE_HALT(APPLET_ODDNAME(reboot, halt, _BB_DIR_SBIN, _BB_SUID_NEVER, reboot)) |
| | 258 | +USE_RENICE(APPLET(renice, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 259 | +USE_RESET(APPLET(reset, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 260 | +USE_RESIZE(APPLET(resize, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 261 | +USE_RM(APPLET(rm, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 262 | +USE_RMDIR(APPLET(rmdir, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 263 | +USE_RMMOD(APPLET(rmmod, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 264 | +USE_ROUTE(APPLET(route, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 265 | +USE_RPM(APPLET(rpm, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 266 | +USE_RPM2CPIO(APPLET(rpm2cpio, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 267 | +USE_RUN_PARTS(APPLET_ODDNAME(run-parts, run_parts, _BB_DIR_BIN, _BB_SUID_NEVER, run_parts)) |
| | 268 | +USE_RUNCON(APPLET(runcon, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 269 | +USE_RUNLEVEL(APPLET(runlevel, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 270 | +USE_RUNSV(APPLET(runsv, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 271 | +USE_RUNSVDIR(APPLET(runsvdir, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 272 | +USE_RX(APPLET(rx, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 273 | +USE_SELINUXENABLED(APPLET(selinuxenabled, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) |
| | 274 | +USE_SED(APPLET(sed, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 275 | +USE_SEQ(APPLET(seq, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 276 | +USE_SETARCH(APPLET(setarch, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 277 | +USE_SETCONSOLE(APPLET(setconsole, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 278 | +USE_SETENFORCE(APPLET(setenforce, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) |
| | 279 | +USE_SETKEYCODES(APPLET(setkeycodes, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 280 | +USE_SETLOGCONS(APPLET(setlogcons, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) |
| | 281 | +USE_SETSID(APPLET(setsid, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 282 | +USE_SETUIDGID(APPLET_ODDNAME(setuidgid, chpst, _BB_DIR_USR_BIN, _BB_SUID_NEVER, setuidgid)) |
| | 283 | +USE_FEATURE_SH_IS_ASH(APPLET_NOUSAGE(sh, ash, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 284 | +USE_FEATURE_SH_IS_HUSH(APPLET_NOUSAGE(sh, hush, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 285 | +USE_FEATURE_SH_IS_LASH(APPLET_NOUSAGE(sh, lash, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 286 | +USE_FEATURE_SH_IS_MSH(APPLET_NOUSAGE(sh, msh, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 287 | +USE_SHA1SUM(APPLET_ODDNAME(sha1sum, md5_sha1_sum, _BB_DIR_USR_BIN, _BB_SUID_NEVER, sha1sum)) |
| | 288 | +USE_SLEEP(APPLET(sleep, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 289 | +USE_SOFTLIMIT(APPLET_ODDNAME(softlimit, chpst, _BB_DIR_USR_BIN, _BB_SUID_NEVER, softlimit)) |
| | 290 | +USE_SORT(APPLET(sort, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 291 | +USE_START_STOP_DAEMON(APPLET_ODDNAME(start-stop-daemon, start_stop_daemon, _BB_DIR_SBIN, _BB_SUID_NEVER, start_stop_daemon)) |
| | 292 | +USE_STAT(APPLET(stat, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 293 | +USE_STRINGS(APPLET(strings, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 294 | +USE_STTY(APPLET(stty, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 295 | +USE_SU(APPLET(su, _BB_DIR_BIN, _BB_SUID_ALWAYS)) |
| | 296 | +USE_SULOGIN(APPLET(sulogin, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 297 | +USE_SUM(APPLET(sum, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 298 | +USE_SV(APPLET(sv, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 299 | +USE_SVLOGD(APPLET(svlogd, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 300 | +USE_SWAPONOFF(APPLET_ODDNAME(swapoff, swap_on_off, _BB_DIR_SBIN, _BB_SUID_NEVER,swapoff)) |
| | 301 | +USE_SWAPONOFF(APPLET_ODDNAME(swapon, swap_on_off, _BB_DIR_SBIN, _BB_SUID_NEVER, swapon)) |
| | 302 | +USE_SWITCH_ROOT(APPLET(switch_root, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 303 | +USE_SYNC(APPLET(sync, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 304 | +USE_BB_SYSCTL(APPLET(sysctl, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 305 | +USE_SYSLOGD(APPLET(syslogd, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 306 | +USE_TAIL(APPLET(tail, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 307 | +USE_TAR(APPLET(tar, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 308 | +USE_TASKSET(APPLET(taskset, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 309 | +USE_TEE(APPLET(tee, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 310 | +USE_TELNET(APPLET(telnet, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 311 | +USE_TELNETD(APPLET(telnetd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) |
| | 312 | +USE_TEST(APPLET(test, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 313 | +#if ENABLE_FEATURE_TFTP_GET || ENABLE_FEATURE_TFTP_PUT |
| | 314 | +USE_TFTP(APPLET(tftp, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 315 | +#endif |
| | 316 | +USE_TIME(APPLET(time, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 317 | +USE_TOP(APPLET(top, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 318 | +USE_TOUCH(APPLET(touch, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 319 | +USE_TR(APPLET(tr, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 320 | +USE_TRACEROUTE(APPLET(traceroute, _BB_DIR_USR_BIN, _BB_SUID_MAYBE)) |
| | 321 | +USE_TRUE(APPLET(true, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 322 | +USE_TTY(APPLET(tty, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 323 | +//USE_TUNE2FS(APPLET(tune2fs, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 324 | +USE_APP_UDHCPC(APPLET(udhcpc, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 325 | +USE_APP_UDHCPD(APPLET(udhcpd, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) |
| | 326 | +USE_UMOUNT(APPLET(umount, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 327 | +USE_UNAME(APPLET(uname, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 328 | +USE_UNCOMPRESS(APPLET(uncompress, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 329 | +USE_UNIQ(APPLET(uniq, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 330 | +USE_UNIX2DOS(APPLET_ODDNAME(unix2dos, dos2unix, _BB_DIR_USR_BIN, _BB_SUID_NEVER, unix2dos)) |
| | 331 | +USE_UNLZMA(APPLET(unlzma, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 332 | +USE_UNZIP(APPLET(unzip, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 333 | +USE_UPTIME(APPLET(uptime, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 334 | +USE_USLEEP(APPLET(usleep, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 335 | +USE_UUDECODE(APPLET(uudecode, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 336 | +USE_UUENCODE(APPLET(uuencode, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 337 | +USE_VCONFIG(APPLET(vconfig, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 338 | +USE_VI(APPLET(vi, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 339 | +USE_VLOCK(APPLET(vlock, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS)) |
| | 340 | +USE_WATCH(APPLET(watch, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 341 | +USE_WATCHDOG(APPLET(watchdog, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 342 | +USE_WC(APPLET(wc, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 343 | +USE_WGET(APPLET(wget, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 344 | +USE_WHICH(APPLET(which, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 345 | +USE_WHO(APPLET(who, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 346 | +USE_WHOAMI(APPLET(whoami, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 347 | +USE_XARGS(APPLET(xargs, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 348 | +USE_YES(APPLET(yes, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 349 | +USE_GUNZIP(APPLET_ODDNAME(zcat, gunzip, _BB_DIR_BIN, _BB_SUID_NEVER, zcat)) |
| | 350 | +USE_ZCIP(APPLET(zcip, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
| | 351 | + |
| | 352 | +#if !defined(PROTOTYPES) && !defined(MAKE_USAGE) |
| | 353 | + { 0,NULL,0,0 } |
| | 354 | +}; |
| | 355 | + |
| | 356 | +#endif |
| | 357 | diff -urN busybox-1.5.0/include/applets.h.rej busybox-1.5.0-cryptpw/include/applets.h.rej |
| | 358 | --- busybox-1.5.0/include/applets.h.rej 1969-12-31 17:00:00.000000000 -0700 |
| | 359 | +++ busybox-1.5.0-cryptpw/include/applets.h.rej 2007-04-25 11:32:08.000000000 -0600 |
| | 360 | @@ -0,0 +1,16 @@ |
| | 361 | +*************** |
| | 362 | +*** 85,90 **** |
| | 363 | + USE_CPIO(APPLET(cpio, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 364 | + USE_CROND(APPLET(crond, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) |
| | 365 | + USE_CRONTAB(APPLET(crontab, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS)) |
| | 366 | + USE_CUT(APPLET(cut, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 367 | + USE_DATE(APPLET(date, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 368 | + USE_DC(APPLET(dc, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 369 | +--- 85,91 ---- |
| | 370 | + USE_CPIO(APPLET(cpio, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 371 | + USE_CROND(APPLET(crond, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)) |
| | 372 | + USE_CRONTAB(APPLET(crontab, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS)) |
| | 373 | ++ USE_CRYPTPW(APPLET(cryptpw, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 374 | + USE_CUT(APPLET(cut, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 375 | + USE_DATE(APPLET(date, _BB_DIR_BIN, _BB_SUID_NEVER)) |
| | 376 | + USE_DC(APPLET(dc, _BB_DIR_USR_BIN, _BB_SUID_NEVER)) |
| | 377 | diff -urN busybox-1.5.0/include/libbb.h.orig busybox-1.5.0-cryptpw/include/libbb.h.orig |
| | 378 | --- busybox-1.5.0/include/libbb.h.orig 1969-12-31 17:00:00.000000000 -0700 |
| | 379 | +++ busybox-1.5.0-cryptpw/include/libbb.h.orig 2007-04-25 00:57:41.000000000 -0600 |
| | 380 | @@ -0,0 +1,902 @@ |
| | 381 | +/* vi: set sw=4 ts=4: */ |
| | 382 | +/* |
| | 383 | + * Busybox main internal header file |
| | 384 | + * |
| | 385 | + * Based in part on code from sash, Copyright (c) 1999 by David I. Bell |
| | 386 | + * Permission has been granted to redistribute this code under the GPL. |
| | 387 | + * |
| | 388 | + * Licensed under the GPL version 2, see the file LICENSE in this tarball. |
| | 389 | + */ |
| | 390 | +#ifndef __LIBBUSYBOX_H__ |
| | 391 | +#define __LIBBUSYBOX_H__ 1 |
| | 392 | + |
| | 393 | +#include "platform.h" |
| | 394 | + |
| | 395 | +#include <ctype.h> |
| | 396 | +#include <dirent.h> |
| | 397 | +#include <errno.h> |
| | 398 | +#include <fcntl.h> |
| | 399 | +#include <inttypes.h> |
| | 400 | +#include <netdb.h> |
| | 401 | +#include <setjmp.h> |
| | 402 | +#include <signal.h> |
| | 403 | +#include <stdio.h> |
| | 404 | +#include <stdlib.h> |
| | 405 | +#include <stdarg.h> |
| | 406 | +#include <stddef.h> |
| | 407 | +#include <string.h> |
| | 408 | +#include <strings.h> |
| | 409 | +#include <sys/ioctl.h> |
| | 410 | +#include <sys/mman.h> |
| | 411 | +#include <sys/socket.h> |
| | 412 | +#include <sys/stat.h> |
| | 413 | +#include <sys/statfs.h> |
| | 414 | +#include <sys/time.h> |
| | 415 | +#include <sys/types.h> |
| | 416 | +#include <sys/wait.h> |
| | 417 | +#include <termios.h> |
| | 418 | +#include <time.h> |
| | 419 | +#include <unistd.h> |
| | 420 | +#include <utime.h> |
| | 421 | + |
| | 422 | +#if ENABLE_SELINUX |
| | 423 | +#include <selinux/selinux.h> |
| | 424 | +#include <selinux/context.h> |
| | 425 | +#endif |
| | 426 | + |
| | 427 | +#if ENABLE_LOCALE_SUPPORT |
| | 428 | +#include <locale.h> |
| | 429 | +#else |
| | 430 | +#define setlocale(x,y) ((void)0) |
| | 431 | +#endif |
| | 432 | + |
| | 433 | +#include "pwd_.h" |
| | 434 | +#include "grp_.h" |
| | 435 | +/* ifdef it out, because it may include <shadow.h> */ |
| | 436 | +/* and we may not even _have_ <shadow.h>! */ |
| | 437 | +#if ENABLE_FEATURE_SHADOWPASSWDS |
| | 438 | +#include "shadow_.h" |
| | 439 | +#endif |
| | 440 | + |
| | 441 | +/* Try to pull in PATH_MAX */ |
| | 442 | +#include <limits.h> |
| | 443 | +#include <sys/param.h> |
| | 444 | +#ifndef PATH_MAX |
| | 445 | +#define PATH_MAX 256 |
| | 446 | +#endif |
| | 447 | + |
| | 448 | +/* Tested to work correctly (IIRC :]) */ |
| | 449 | +#define MAXINT(T) (T)( \ |
| | 450 | + ((T)-1) > 0 \ |
| | 451 | + ? (T)-1 \ |
| | 452 | + : (T)~((T)1 << (sizeof(T)*8-1)) \ |
| | 453 | + ) |
| | 454 | + |
| | 455 | +#define MININT(T) (T)( \ |
| | 456 | + ((T)-1) > 0 \ |
| | 457 | + ? (T)0 \ |
| | 458 | + : ((T)1 << (sizeof(T)*8-1)) \ |
| | 459 | + ) |
| | 460 | + |
| | 461 | +/* Large file support */ |
| | 462 | +/* Note that CONFIG_LFS forces bbox to be built with all common ops |
| | 463 | + * (stat, lseek etc) mapped to "largefile" variants by libc. |
| | 464 | + * Practically it means that open() automatically has O_LARGEFILE added |
| | 465 | + * and all filesize/file_offset parameters and struct members are "large" |
| | 466 | + * (in today's world - signed 64bit). For full support of large files, |
| | 467 | + * we need a few helper #defines (below) and careful use of off_t |
| | 468 | + * instead of int/ssize_t. No lseek64(), O_LARGEFILE etc necessary */ |
| | 469 | +#if ENABLE_LFS |
| | 470 | +/* CONFIG_LFS is on */ |
| | 471 | +# if ULONG_MAX > 0xffffffff |
| | 472 | +/* "long" is long enough on this system */ |
| | 473 | +# define XATOOFF(a) xatoul_range(a, 0, LONG_MAX) |
| | 474 | +/* usage: sz = BB_STRTOOFF(s, NULL, 10); if (errno || sz < 0) die(); */ |
| | 475 | +# define BB_STRTOOFF bb_strtoul |
| | 476 | +# define STRTOOFF strtoul |
| | 477 | +/* usage: printf("size: %"OFF_FMT"d (%"OFF_FMT"x)\n", sz, sz); */ |
| | 478 | +# define OFF_FMT "l" |
| | 479 | +# else |
| | 480 | +/* "long" is too short, need "long long" */ |
| | 481 | +# define XATOOFF(a) xatoull_range(a, 0, LLONG_MAX) |
| | 482 | +# define BB_STRTOOFF bb_strtoull |
| | 483 | +# define STRTOOFF strtoull |
| | 484 | +# define OFF_FMT "ll" |
| | 485 | +# endif |
| | 486 | +#else |
| | 487 | +/* CONFIG_LFS is off */ |
| | 488 | +# if UINT_MAX == 0xffffffff |
| | 489 | +/* While sizeof(off_t) == sizeof(int), off_t is typedef'ed to long anyway. |
| | 490 | + * gcc will throw warnings on printf("%d", off_t). Crap... */ |
| | 491 | +# define XATOOFF(a) xatoi_u(a) |
| | 492 | +# define BB_STRTOOFF bb_strtou |
| | 493 | +# define STRTOOFF strtol |
| | 494 | +# define OFF_FMT "l" |
| | 495 | +# else |
| | 496 | +# define XATOOFF(a) xatoul_range(a, 0, LONG_MAX) |
| | 497 | +# define BB_STRTOOFF bb_strtoul |
| | 498 | +# define STRTOOFF strtol |
| | 499 | +# define OFF_FMT "l" |
| | 500 | +# endif |
| | 501 | +#endif |
| | 502 | +/* scary. better ideas? (but do *test* them first!) */ |
| | 503 | +#define OFF_T_MAX ((off_t)~((off_t)1 << (sizeof(off_t)*8-1))) |
| | 504 | + |
| | 505 | +/* This structure defines protocol families and their handlers. */ |
| | 506 | +struct aftype { |
| | 507 | + const char *name; |
| | 508 | + const char *title; |
| | 509 | + int af; |
| | 510 | + int alen; |
| | 511 | + char *(*print) (unsigned char *); |
| | 512 | + const char *(*sprint) (struct sockaddr *, int numeric); |
| | 513 | + int (*input) (/*int type,*/ const char *bufp, struct sockaddr *); |
| | 514 | + void (*herror) (char *text); |
| | 515 | + int (*rprint) (int options); |
| | 516 | + int (*rinput) (int typ, int ext, char **argv); |
| | 517 | + |
| | 518 | + /* may modify src */ |
| | 519 | + int (*getmask) (char *src, struct sockaddr * mask, char *name); |
| | 520 | +}; |
| | 521 | + |
| | 522 | +/* This structure defines hardware protocols and their handlers. */ |
| | 523 | +struct hwtype { |
| | 524 | + const char *name; |
| | 525 | + const char *title; |
| | 526 | + int type; |
| | 527 | + int alen; |
| | 528 | + char *(*print) (unsigned char *); |
| | 529 | + int (*input) (const char *, struct sockaddr *); |
| | 530 | + int (*activate) (int fd); |
| | 531 | + int suppress_null_addr; |
| | 532 | +}; |
| | 533 | + |
| | 534 | +/* Some useful definitions */ |
| | 535 | +#undef FALSE |
| | 536 | +#define FALSE ((int) 0) |
| | 537 | +#undef TRUE |
| | 538 | +#define TRUE ((int) 1) |
| | 539 | +#undef SKIP |
| | 540 | +#define SKIP ((int) 2) |
| | 541 | + |
| | 542 | +/* for mtab.c */ |
| | 543 | +#define MTAB_GETMOUNTPT '1' |
| | 544 | +#define MTAB_GETDEVICE '2' |
| | 545 | + |
| | 546 | +#define BUF_SIZE 8192 |
| | 547 | +#define EXPAND_ALLOC 1024 |
| | 548 | + |
| | 549 | +/* Macros for min/max. */ |
| | 550 | +#ifndef MIN |
| | 551 | +#define MIN(a,b) (((a)<(b))?(a):(b)) |
| | 552 | +#endif |
| | 553 | + |
| | 554 | +#ifndef MAX |
| | 555 | +#define MAX(a,b) (((a)>(b))?(a):(b)) |
| | 556 | +#endif |
| | 557 | + |
| | 558 | +/* buffer allocation schemes */ |
| | 559 | +#if ENABLE_FEATURE_BUFFERS_GO_ON_STACK |
| | 560 | +#define RESERVE_CONFIG_BUFFER(buffer,len) char buffer[len] |
| | 561 | +#define RESERVE_CONFIG_UBUFFER(buffer,len) unsigned char buffer[len] |
| | 562 | +#define RELEASE_CONFIG_BUFFER(buffer) ((void)0) |
| | 563 | +#else |
| | 564 | +#if ENABLE_FEATURE_BUFFERS_GO_IN_BSS |
| | 565 | +#define RESERVE_CONFIG_BUFFER(buffer,len) static char buffer[len] |
| | 566 | +#define RESERVE_CONFIG_UBUFFER(buffer,len) static unsigned char buffer[len] |
| | 567 | +#define RELEASE_CONFIG_BUFFER(buffer) ((void)0) |
| | 568 | +#else |
| | 569 | +#define RESERVE_CONFIG_BUFFER(buffer,len) char *buffer=xmalloc(len) |
| | 570 | +#define RESERVE_CONFIG_UBUFFER(buffer,len) unsigned char *buffer=xmalloc(len) |
| | 571 | +#define RELEASE_CONFIG_BUFFER(buffer) free (buffer) |
| | 572 | +#endif |
| | 573 | +#endif |
| | 574 | + |
| | 575 | + |
| | 576 | +#if defined(__GLIBC__) && __GLIBC__ < 2 |
| | 577 | +int vdprintf(int d, const char *format, va_list ap); |
| | 578 | +#endif |
| | 579 | +// This is declared here rather than #including <libgen.h> in order to avoid |
| | 580 | +// confusing the two versions of basename. See the dirname/basename man page |
| | 581 | +// for details. |
| | 582 | +char *dirname(char *path); |
| | 583 | +/* Include our own copy of struct sysinfo to avoid binary compatibility |
| | 584 | + * problems with Linux 2.4, which changed things. Grumble, grumble. */ |
| | 585 | +struct sysinfo { |
| | 586 | + long uptime; /* Seconds since boot */ |
| | 587 | + unsigned long loads[3]; /* 1, 5, and 15 minute load averages */ |
| | 588 | + unsigned long totalram; /* Total usable main memory size */ |
| | 589 | + unsigned long freeram; /* Available memory size */ |
| | 590 | + unsigned long sharedram; /* Amount of shared memory */ |
| | 591 | + unsigned long bufferram; /* Memory used by buffers */ |
| | 592 | + unsigned long totalswap; /* Total swap space size */ |
| | 593 | + unsigned long freeswap; /* swap space still available */ |
| | 594 | + unsigned short procs; /* Number of current processes */ |
| | 595 | + unsigned short pad; /* Padding needed for m68k */ |
| | 596 | + unsigned long totalhigh; /* Total high memory size */ |
| | 597 | + unsigned long freehigh; /* Available high memory size */ |
| | 598 | + unsigned int mem_unit; /* Memory unit size in bytes */ |
| | 599 | + char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding: libc5 uses this.. */ |
| | 600 | +}; |
| | 601 | +extern int sysinfo(struct sysinfo* info); |
| | 602 | + |
| | 603 | + |
| | 604 | +extern void chomp(char *s); |
| | 605 | +extern void trim(char *s); |
| | 606 | +extern char *skip_whitespace(const char *); |
| | 607 | +extern char *skip_non_whitespace(const char *); |
| | 608 | + |
| | 609 | +//TODO: supply a pointer to char[11] buffer (avoid statics)? |
| | 610 | +extern const char *bb_mode_string(mode_t mode); |
| | 611 | +extern int is_directory(const char *name, int followLinks, struct stat *statBuf); |
| | 612 | +extern int remove_file(const char *path, int flags); |
| | 613 | +extern int copy_file(const char *source, const char *dest, int flags); |
| | 614 | +extern int recursive_action(const char *fileName, int recurse, |
| | 615 | + int followLinks, int depthFirst, |
| | 616 | + int (*fileAction) (const char *fileName, struct stat* statbuf, void* userData, int depth), |
| | 617 | + int (*dirAction) (const char *fileName, struct stat* statbuf, void* userData, int depth), |
| | 618 | + void* userData, int depth); |
| | 619 | +extern int device_open(const char *device, int mode); |
| | 620 | +extern int get_console_fd(void); |
| | 621 | +extern char *find_block_device(const char *path); |
| | 622 | +/* bb_copyfd_XX print read/write errors and return -1 if they occur */ |
| | 623 | +extern off_t bb_copyfd_eof(int fd1, int fd2); |
| | 624 | +extern off_t bb_copyfd_size(int fd1, int fd2, off_t size); |
| | 625 | +extern void bb_copyfd_exact_size(int fd1, int fd2, off_t size); |
| | 626 | +/* "short" copy can be detected by return value < size */ |
| | 627 | +/* this helper yells "short read!" if param is not -1 */ |
| | 628 | +extern void complain_copyfd_and_die(off_t sz) ATTRIBUTE_NORETURN; |
| | 629 | +extern char bb_process_escape_sequence(const char **ptr); |
| | 630 | +/* TODO: sometimes modifies its parameter, which |
| | 631 | + * makes it rather inconvenient at times: */ |
| | 632 | +extern char *bb_get_last_path_component(char *path); |
| | 633 | +extern int ndelay_on(int fd); |
| | 634 | +extern int ndelay_off(int fd); |
| | 635 | + |
| | 636 | + |
| | 637 | +extern DIR *xopendir(const char *path); |
| | 638 | +extern DIR *warn_opendir(const char *path); |
| | 639 | + |
| | 640 | +char *xrealloc_getcwd_or_warn(char *cwd); |
| | 641 | +char *xmalloc_readlink_or_warn(const char *path); |
| | 642 | +char *xmalloc_realpath(const char *path); |
| | 643 | +extern void xstat(const char *filename, struct stat *buf); |
| | 644 | +extern pid_t spawn(char **argv); |
| | 645 | +extern pid_t xspawn(char **argv); |
| | 646 | +extern int wait4pid(int pid); |
| | 647 | +extern void xsetgid(gid_t gid); |
| | 648 | +extern void xsetuid(uid_t uid); |
| | 649 | +extern void xdaemon(int nochdir, int noclose); |
| | 650 | +/* More clever/thorough xdaemon */ |
| | 651 | +extern void bb_sanitize_stdio_maybe_daemonize(int daemonize); |
| | 652 | +extern void bb_sanitize_stdio(void); |
| | 653 | +/* NB: be careful: dont open syslog/network sockets before bb_daemonize */ |
| | 654 | +extern void bb_daemonize(void); |
| | 655 | +extern void xchdir(const char *path); |
| | 656 | +extern void xsetenv(const char *key, const char *value); |
| | 657 | +extern int xopen(const char *pathname, int flags); |
| | 658 | +extern int xopen3(const char *pathname, int flags, int mode); |
| | 659 | +extern off_t xlseek(int fd, off_t offset, int whence); |
| | 660 | +extern off_t fdlength(int fd); |
| | 661 | + |
| | 662 | + |
| | 663 | +int xsocket(int domain, int type, int protocol); |
| | 664 | +void xbind(int sockfd, struct sockaddr *my_addr, socklen_t addrlen); |
| | 665 | +void xlisten(int s, int backlog); |
| | 666 | +void xconnect(int s, const struct sockaddr *s_addr, socklen_t addrlen); |
| | 667 | +int setsockopt_reuseaddr(int fd); |
| | 668 | +int setsockopt_broadcast(int fd); |
| | 669 | +/* NB: returns port in host byte order */ |
| | 670 | +unsigned bb_lookup_port(const char *port, const char *protocol, unsigned default_port); |
| | 671 | +typedef struct len_and_sockaddr { |
| | 672 | + socklen_t len; |
| | 673 | + union { |
| | 674 | + struct sockaddr sa; |
| | 675 | + struct sockaddr_in sin; |
| | 676 | +#if ENABLE_FEATURE_IPV6 |
| | 677 | + struct sockaddr_in6 sin6; |
| | 678 | +#endif |
| | 679 | + }; |
| | 680 | +} len_and_sockaddr; |
| | 681 | +/* Create stream socket, and allocated suitable lsa |
| | 682 | + * (lsa of correct size and lsa->sa.sa_family (AF_INET/AF_INET6)) */ |
| | 683 | +int xsocket_stream(len_and_sockaddr **lsap); |
| | 684 | +/* Create server TCP socket bound to bindaddr:port. bindaddr can be NULL, |
| | 685 | + * numeric IP ("N.N.N.N") or numeric IPv6 address, |
| | 686 | + * and can have ":PORT" suffix (for IPv6 use "[X:X:...:X]:PORT"). |
| | 687 | + * If there is no suffix, port argument is used */ |
| | 688 | +int create_and_bind_stream_or_die(const char *bindaddr, int port); |
| | 689 | +/* Create client TCP socket connected to peer:port. Peer cannot be NULL. |
| | 690 | + * Peer can be numeric IP ("N.N.N.N"), numeric IPv6 address or hostname, |
| | 691 | + * and can have ":PORT" suffix (for IPv6 use "[X:X:...:X]:PORT"). |
| | 692 | + * If there is no suffix, port argument is used */ |
| | 693 | +int create_and_connect_stream_or_die(const char *peer, int port); |
| | 694 | +/* Connect to peer identified by lsa */ |
| | 695 | +int xconnect_stream(const len_and_sockaddr *lsa); |
| | 696 | +/* Return malloc'ed len_and_sockaddr with socket address of host:port |
| | 697 | + * Currently will return IPv4 or IPv6 sockaddrs only |
| | 698 | + * (depending on host), but in theory nothing prevents e.g. |
| | 699 | + * UNIX socket address being returned, IPX sockaddr etc... |
| | 700 | + * On error does bb_error_msg and returns NULL */ |
| | 701 | +len_and_sockaddr* host2sockaddr(const char *host, int port); |
| | 702 | +/* Version which dies on error */ |
| | 703 | +len_and_sockaddr* xhost2sockaddr(const char *host, int port); |
| | 704 | +len_and_sockaddr* xdotted2sockaddr(const char *host, int port); |
| | 705 | +#if ENABLE_FEATURE_IPV6 |
| | 706 | +/* Same, useful if you want to force family (e.g. IPv6) */ |
| | 707 | +len_and_sockaddr* host_and_af2sockaddr(const char *host, int port, sa_family_t af); |
| | 708 | +len_and_sockaddr* xhost_and_af2sockaddr(const char *host, int port, sa_family_t af); |
| | 709 | +#else |
| | 710 | +/* [we evaluate af: think about "host_and_af2sockaddr(..., af++)"] */ |
| | 711 | +#define host_and_af2sockaddr(host, port, af) ((void)(af), host2sockaddr((host), (port))) |
| | 712 | +#define xhost_and_af2sockaddr(host, port, af) ((void)(af), xhost2sockaddr((host), (port))) |
| | 713 | +#endif |
| | 714 | +/* Assign sin[6]_port member if the socket is of corresponding type, |
| | 715 | + * otherwise no-op. Useful for ftp. |
| | 716 | + * NB: does NOT do htons() internally, just direct assignment. */ |
| | 717 | +void set_nport(len_and_sockaddr *lsa, unsigned port); |
| | 718 | +/* Retrieve sin[6]_port or return -1 for non-INET[6] lsa's */ |
| | 719 | +int get_nport(const len_and_sockaddr *lsa); |
| | 720 | +/* Reverse DNS. Returns NULL on failure. */ |
| | 721 | +char* xmalloc_sockaddr2host(const struct sockaddr *sa, socklen_t salen); |
| | 722 | +/* This one doesn't append :PORTNUM */ |
| | 723 | +char* xmalloc_sockaddr2host_noport(const struct sockaddr *sa, socklen_t salen); |
| | 724 | +/* This one also doesn't fall back to dotted IP (returns NULL) */ |
| | 725 | +char* xmalloc_sockaddr2hostonly_noport(const struct sockaddr *sa, socklen_t salen); |
| | 726 | +/* inet_[ap]ton on steroids */ |
| | 727 | +char* xmalloc_sockaddr2dotted(const struct sockaddr *sa, socklen_t salen); |
| | 728 | +char* xmalloc_sockaddr2dotted_noport(const struct sockaddr *sa, socklen_t salen); |
| | 729 | +// "old" (ipv4 only) API |
| | 730 | +// users: traceroute.c hostname.c |
| | 731 | +struct hostent *xgethostbyname(const char *name); |
| | 732 | +// Also inetd.c and inetd.c are using gethostbyname(), |
| | 733 | +// + inet_common.c has additional IPv4-only stuff |
| | 734 | + |
| | 735 | + |
| | 736 | +extern char *xstrdup(const char *s); |
| | 737 | +extern char *xstrndup(const char *s, int n); |
| | 738 | +extern char *safe_strncpy(char *dst, const char *src, size_t size); |
| | 739 | +extern char *xasprintf(const char *format, ...) __attribute__ ((format (printf, 1, 2))); |
| | 740 | +// gcc-4.1.1 still isn't good enough at optimizing it |
| | 741 | +// (+200 bytes compared to macro) |
| | 742 | +//static ATTRIBUTE_ALWAYS_INLINE |
| | 743 | +//int LONE_DASH(const char *s) { return s[0] == '-' && !s[1]; } |
| | 744 | +//static ATTRIBUTE_ALWAYS_INLINE |
| | 745 | +//int NOT_LONE_DASH(const char *s) { return s[0] != '-' || s[1]; } |
| | 746 | +#define LONE_DASH(s) ((s)[0] == '-' && !(s)[1]) |
| | 747 | +#define NOT_LONE_DASH(s) ((s)[0] != '-' || (s)[1]) |
| | 748 | +#define LONE_CHAR(s,c) ((s)[0] == (c) && !(s)[1]) |
| | 749 | +#define NOT_LONE_CHAR(s,c) ((s)[0] != (c) || (s)[1]) |
| | 750 | + |
| | 751 | +/* dmalloc will redefine these to it's own implementation. It is safe |
| | 752 | + * to have the prototypes here unconditionally. */ |
| | 753 | +extern void *xmalloc(size_t size); |
| | 754 | +extern void *xrealloc(void *old, size_t size); |
| | 755 | +extern void *xzalloc(size_t size); |
| | 756 | + |
| | 757 | +extern ssize_t safe_read(int fd, void *buf, size_t count); |
| | 758 | +extern ssize_t full_read(int fd, void *buf, size_t count); |
| | 759 | +extern void xread(int fd, void *buf, size_t count); |
| | 760 | +extern unsigned char xread_char(int fd); |
| | 761 | +extern char *reads(int fd, char *buf, size_t count); |
| | 762 | +extern ssize_t read_close(int fd, void *buf, size_t count); |
| | 763 | +extern ssize_t open_read_close(const char *filename, void *buf, size_t count); |
| | 764 | +extern void *xmalloc_open_read_close(const char *filename, size_t *sizep); |
| | 765 | + |
| | 766 | +extern ssize_t safe_write(int fd, const void *buf, size_t count); |
| | 767 | +extern ssize_t full_write(int fd, const void *buf, size_t count); |
| | 768 | +extern void xwrite(int fd, const void *buf, size_t count); |
| | 769 | + |
| | 770 | +/* Reads and prints to stdout till eof, then closes FILE. Exits on error: */ |
| | 771 | +extern void xprint_and_close_file(FILE *file); |
| | 772 | +extern char *xmalloc_fgets(FILE *file); |
| | 773 | +/* Read up to (and including) TERMINATING_STRING: */ |
| | 774 | +extern char *xmalloc_fgets_str(FILE *file, const char *terminating_string); |
| | 775 | +/* Chops off '\n' from the end, unlike fgets: */ |
| | 776 | +extern char *xmalloc_getline(FILE *file); |
| | 777 | +extern char *bb_get_chunk_from_file(FILE *file, int *end); |
| | 778 | +extern void die_if_ferror(FILE *file, const char *msg); |
| | 779 | +extern void die_if_ferror_stdout(void); |
| | 780 | +extern void xfflush_stdout(void); |
| | 781 | +extern void fflush_stdout_and_exit(int retval) ATTRIBUTE_NORETURN; |
| | 782 | +extern int fclose_if_not_stdin(FILE *file); |
| | 783 | +extern FILE *xfopen(const char *filename, const char *mode); |
| | 784 | +/* Prints warning to stderr and returns NULL on failure: */ |
| | 785 | +extern FILE *fopen_or_warn(const char *filename, const char *mode); |
| | 786 | +/* "Opens" stdin if filename is special, else just opens file: */ |
| | 787 | +extern FILE *fopen_or_warn_stdin(const char *filename); |
| | 788 | + |
| | 789 | + |
| | 790 | +extern void utoa_to_buf(unsigned n, char *buf, unsigned buflen); |
| | 791 | +extern char *utoa(unsigned n); |
| | 792 | +extern void itoa_to_buf(int n, char *buf, unsigned buflen); |
| | 793 | +extern char *itoa(int n); |
| | 794 | +extern void smart_ulltoa5(unsigned long long ul, char buf[5]); |
| | 795 | +/* Put a string of hex bytes (ala "1b"), return advanced pointer */ |
| | 796 | +extern char *bin2hex(char *buf, const char *cp, int count); |
| | 797 | + |
| | 798 | +struct suffix_mult { |
| | 799 | + const char *suffix; |
| | 800 | + unsigned mult; |
| | 801 | +}; |
| | 802 | +#include "xatonum.h" |
| | 803 | +/* Specialized: */ |
| | 804 | +/* Using xatoi() instead of naive atoi() is not always convenient - |
| | 805 | + * in many places people want *non-negative* values, but store them |
| | 806 | + * in signed int. Therefore we need this one: |
| | 807 | + * dies if input is not in [0, INT_MAX] range. Also will reject '-0' etc */ |
| | 808 | +int xatoi_u(const char *numstr); |
| | 809 | +/* Useful for reading port numbers */ |
| | 810 | +uint16_t xatou16(const char *numstr); |
| | 811 | + |
| | 812 | + |
| | 813 | +/* These parse entries in /etc/passwd and /etc/group. This is desirable |
| | 814 | + * for BusyBox since we want to avoid using the glibc NSS stuff, which |
| | 815 | + * increases target size and is often not needed on embedded systems. */ |
| | 816 | +long xuname2uid(const char *name); |
| | 817 | +long xgroup2gid(const char *name); |
| | 818 | +/* wrapper: allows string to contain numeric uid or gid */ |
| | 819 | +unsigned long get_ug_id(const char *s, long (*xname2id)(const char *)); |
| | 820 | +/* from chpst. Does not die, returns 0 on failure */ |
| | 821 | +struct bb_uidgid_t { |
| | 822 | + uid_t uid; |
| | 823 | + gid_t gid; |
| | 824 | +}; |
| | 825 | +/* always sets uid and gid */ |
| | 826 | +int get_uidgid(struct bb_uidgid_t*, const char*, int numeric_ok); |
| | 827 | +/* chown-like handling of "user[:[group]" */ |
| | 828 | +void parse_chown_usergroup_or_die(struct bb_uidgid_t *u, char *user_group); |
| | 829 | +/* what is this? */ |
| | 830 | +/*extern char *bb_getug(char *buffer, char *idname, long id, int bufsize, char prefix);*/ |
| | 831 | +char *bb_getpwuid(char *name, long uid, int bufsize); |
| | 832 | +char *bb_getgrgid(char *group, long gid, int bufsize); |
| | 833 | +/* versions which cache results (useful for ps, ls etc) */ |
| | 834 | +const char* get_cached_username(uid_t uid); |
| | 835 | +const char* get_cached_groupname(gid_t gid); |
| | 836 | +void clear_username_cache(void); |
| | 837 | +/* internally usernames are saved in fixed-sized char[] buffers */ |
| | 838 | +enum { USERNAME_MAX_SIZE = 16 - sizeof(int) }; |
| | 839 | + |
| | 840 | + |
| | 841 | +enum { BB_GETOPT_ERROR = 0x80000000 }; |
| | 842 | +extern const char *opt_complementary; |
| | 843 | +#if ENABLE_GETOPT_LONG |
| | 844 | +extern const struct option *applet_long_options; |
| | 845 | +#endif |
| | 846 | +extern uint32_t option_mask32; |
| | 847 | +extern uint32_t getopt32(int argc, char **argv, const char *applet_opts, ...); |
| | 848 | + |
| | 849 | + |
| | 850 | +typedef struct llist_s { |
| | 851 | + char *data; |
| | 852 | + struct llist_s *link; |
| | 853 | +} llist_t; |
| | 854 | +extern void llist_add_to(llist_t **old_head, void *data); |
| | 855 | +extern void llist_add_to_end(llist_t **list_head, void *data); |
| | 856 | +extern void *llist_pop(llist_t **elm); |
| | 857 | +extern void llist_unlink(llist_t **head, llist_t *elm); |
| | 858 | +extern void llist_free(llist_t *elm, void (*freeit)(void *data)); |
| | 859 | +extern llist_t* llist_rev(llist_t *list); |
| | 860 | + |
| | 861 | +enum { |
| | 862 | + LOGMODE_NONE = 0, |
| | 863 | + LOGMODE_STDIO = 1<<0, |
| | 864 | + LOGMODE_SYSLOG = 1<<1, |
| | 865 | + LOGMODE_BOTH = LOGMODE_SYSLOG + LOGMODE_STDIO, |
| | 866 | +}; |
| | 867 | +extern const char *msg_eol; |
| | 868 | +extern int logmode; |
| | 869 | +extern int die_sleep; |
| | 870 | +extern int xfunc_error_retval; |
| | 871 | +extern void sleep_and_die(void) ATTRIBUTE_NORETURN; |
| | 872 | +extern void bb_show_usage(void) ATTRIBUTE_NORETURN ATTRIBUTE_EXTERNALLY_VISIBLE; |
| | 873 | +extern void bb_error_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))); |
| | 874 | +extern void bb_error_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))); |
| | 875 | +extern void bb_perror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))); |
| | 876 | +extern void bb_perror_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))); |
| | 877 | +extern void bb_vherror_msg(const char *s, va_list p); |
| | 878 | +extern void bb_herror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))); |
| | 879 | +extern void bb_herror_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))); |
| | 880 | +extern void bb_perror_nomsg_and_die(void) ATTRIBUTE_NORETURN; |
| | 881 | +extern void bb_perror_nomsg(void); |
| | 882 | +extern void bb_info_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))); |
| | 883 | +/* These are used internally -- you shouldn't need to use them */ |
| | 884 | +extern void bb_verror_msg(const char *s, va_list p, const char *strerr); |
| | 885 | +extern void bb_vperror_msg(const char *s, va_list p); |
| | 886 | +extern void bb_vinfo_msg(const char *s, va_list p); |
| | 887 | + |
| | 888 | + |
| | 889 | +/* applets which are useful from another applets */ |
| | 890 | +int bb_cat(char** argv); |
| | 891 | +int bb_echo(char** argv); |
| | 892 | +int bb_test(int argc, char** argv); |
| | 893 | +#if ENABLE_ROUTE |
| | 894 | +void bb_displayroutes(int noresolve, int netstatfmt); |
| | 895 | +#endif |
| | 896 | +int chown_main(int argc, char **argv); |
| | 897 | +#if ENABLE_GUNZIP |
| | 898 | +int gunzip_main(int argc, char **argv); |
| | 899 | +#endif |
| | 900 | +int bbunpack(char **argv, |
| | 901 | + char* (*make_new_name)(char *filename), |
| | 902 | + USE_DESKTOP(long long) int (*unpacker)(void) |
| | 903 | +); |
| | 904 | + |
| | 905 | + |
| | 906 | +/* Networking */ |
| | 907 | +int create_icmp_socket(void); |
| | 908 | +int create_icmp6_socket(void); |
| | 909 | +/* interface.c */ |
| | 910 | +extern int interface_opt_a; |
| | 911 | +int display_interfaces(char *ifname); |
| | 912 | +const struct aftype *get_aftype(const char *name); |
| | 913 | +const struct hwtype *get_hwtype(const char *name); |
| | 914 | +const struct hwtype *get_hwntype(int type); |
| | 915 | + |
| | 916 | + |
| | 917 | +#ifndef BUILD_INDIVIDUAL |
| | 918 | +extern struct BB_applet *find_applet_by_name(const char *name); |
| | 919 | +extern void run_applet_by_name(const char *name, int argc, char **argv); |
| | 920 | +#endif |
| | 921 | + |
| | 922 | +extern struct mntent *find_mount_point(const char *name, const char *table); |
| | 923 | +extern void erase_mtab(const char * name); |
| | 924 | +extern unsigned int tty_baud_to_value(speed_t speed); |
| | 925 | +extern speed_t tty_value_to_baud(unsigned int value); |
| | 926 | +extern void bb_warn_ignoring_args(int n); |
| | 927 | + |
| | 928 | +extern int get_linux_version_code(void); |
| | 929 | + |
| | 930 | +extern char *query_loop(const char *device); |
| | 931 | +extern int del_loop(const char *device); |
| | 932 | +extern int set_loop(char **device, const char *file, unsigned long long offset); |
| | 933 | + |
| | 934 | + |
| | 935 | +//TODO: provide pointer to buf (avoid statics)? |
| | 936 | +const char *make_human_readable_str(unsigned long long size, |
| | 937 | + unsigned long block_size, unsigned long display_unit); |
| | 938 | + |
| | 939 | +//TODO: pass buf pointer or return allocated buf (avoid statics)? |
| | 940 | +char *bb_askpass(int timeout, const char * prompt); |
| | 941 | +int bb_ask_confirmation(void); |
| | 942 | +int klogctl(int type, char * b, int len); |
| | 943 | + |
| | 944 | +extern int bb_parse_mode(const char* s, mode_t* theMode); |
| | 945 | + |
| | 946 | +char *concat_path_file(const char *path, const char *filename); |
| | 947 | +char *concat_subpath_file(const char *path, const char *filename); |
| | 948 | +char *last_char_is(const char *s, int c); |
| | 949 | + |
| | 950 | +int execable_file(const char *name); |
| | 951 | +char *find_execable(const char *filename); |
| | 952 | +int exists_execable(const char *filename); |
| | 953 | + |
| | 954 | +#if ENABLE_FEATURE_EXEC_PREFER_APPLETS |
| | 955 | +int bb_execvp(const char *file, char *const argv[]); |
| | 956 | +#define BB_EXECVP(prog,cmd) bb_execvp(prog,cmd) |
| | 957 | +#define BB_EXECLP(prog,cmd,...) \ |
| | 958 | + execlp((find_applet_by_name(prog)) ? CONFIG_BUSYBOX_EXEC_PATH : prog, \ |
| | 959 | + cmd, __VA_ARGS__) |
| | 960 | +#else |
| | 961 | +#define BB_EXECVP(prog,cmd) execvp(prog,cmd) |
| | 962 | +#define BB_EXECLP(prog,cmd,...) execlp(prog,cmd, __VA_ARGS__) |
| | 963 | +#endif |
| | 964 | + |
| | 965 | +USE_DESKTOP(long long) int uncompress(int fd_in, int fd_out); |
| | 966 | +int inflate(int in, int out); |
| | 967 | + |
| | 968 | + |
| | 969 | +int bb_make_directory(char *path, long mode, int flags); |
| | 970 | + |
| | 971 | +int get_signum(const char *name); |
| | 972 | +const char *get_signame(int number); |
| | 973 | + |
| | 974 | +char *bb_simplify_path(const char *path); |
| | 975 | + |
| | 976 | +#define FAIL_DELAY 3 |
| | 977 | +extern void bb_do_delay(int seconds); |
| | 978 | +extern void change_identity(const struct passwd *pw); |
| | 979 | +extern const char *change_identity_e2str(const struct passwd *pw); |
| | 980 | +extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args); |
| | 981 | +#if ENABLE_SELINUX |
| | 982 | +extern void renew_current_security_context(void); |
| | 983 | +extern void set_current_security_context(security_context_t sid); |
| | 984 | +extern context_t set_security_context_component(security_context_t cur_context, |
| | 985 | + char *user, char *role, char *type, char *range); |
| | 986 | +extern void setfscreatecon_or_die(security_context_t scontext); |
| | 987 | +#endif |
| | 988 | +extern void selinux_or_die(void); |
| | 989 | +extern int restricted_shell(const char *shell); |
| | 990 | +extern void setup_environment(const char *shell, int loginshell, int changeenv, const struct passwd *pw); |
| | 991 | +extern int correct_password(const struct passwd *pw); |
| | 992 | +extern char *pw_encrypt(const char *clear, const char *salt); |
| | 993 | +extern int obscure(const char *old, const char *newval, const struct passwd *pwdp); |
| | 994 | +extern int index_in_str_array(const char * const string_array[], const char *key); |
| | 995 | +extern int index_in_substr_array(const char * const string_array[], const char *key); |
| | 996 | +extern void print_login_issue(const char *issue_file, const char *tty); |
| | 997 | +extern void print_login_prompt(void); |
| | 998 | +#ifdef BB_NOMMU |
| | 999 | +extern void vfork_daemon(int nochdir, int noclose); |
| | 1000 | +extern void vfork_daemon_rexec(int nochdir, int noclose, |
| | 1001 | + int argc, char **argv, char *foreground_opt); |
| | 1002 | +#endif |
| | 1003 | +extern int get_terminal_width_height(const int fd, int *width, int *height); |
| | 1004 | + |
| | 1005 | +char *is_in_ino_dev_hashtable(const struct stat *statbuf); |
| | 1006 | +void add_to_ino_dev_hashtable(const struct stat *statbuf, const char *name); |
| | 1007 | +void reset_ino_dev_hashtable(void); |
| | 1008 | +#ifdef __GLIBC__ |
| | 1009 | +/* At least glibc has horrendously large inline for this, so wrap it */ |
| | 1010 | +extern unsigned long long bb_makedev(unsigned int major, unsigned int minor); |
| | 1011 | +#undef makedev |
| | 1012 | +#define makedev(a,b) bb_makedev(a,b) |
| | 1013 | +#endif |
| | 1014 | + |
| | 1015 | + |
| | 1016 | +#if ENABLE_FEATURE_EDITING |
| | 1017 | +/* It's NOT just ENABLEd or disabled. It's a number: */ |
| | 1018 | +#ifdef CONFIG_FEATURE_EDITING_HISTORY |
| | 1019 | +#define MAX_HISTORY (CONFIG_FEATURE_EDITING_HISTORY + 0) |
| | 1020 | +#else |
| | 1021 | +#define MAX_HISTORY 0 |
| | 1022 | +#endif |
| | 1023 | +struct line_input_t { |
| | 1024 | + int flags; |
| | 1025 | + const char *path_lookup; |
| | 1026 | +#if MAX_HISTORY |
| | 1027 | + int cnt_history; |
| | 1028 | + int cur_history; |
| | 1029 | + USE_FEATURE_EDITING_SAVEHISTORY(const char *hist_file;) |
| | 1030 | + char *history[MAX_HISTORY + 1]; |
| | 1031 | +#endif |
| | 1032 | +}; |
| | 1033 | +enum { |
| | 1034 | + DO_HISTORY = 1 * (MAX_HISTORY > 0), |
| | 1035 | + SAVE_HISTORY = 2 * (MAX_HISTORY > 0) * ENABLE_FEATURE_EDITING_SAVEHISTORY, |
| | 1036 | + TAB_COMPLETION = 4 * ENABLE_FEATURE_TAB_COMPLETION, |
| | 1037 | + USERNAME_COMPLETION = 8 * ENABLE_FEATURE_USERNAME_COMPLETION, |
| | 1038 | + VI_MODE = 0x10 * ENABLE_FEATURE_EDITING_VI, |
| | 1039 | + WITH_PATH_LOOKUP = 0x20, |
| | 1040 | + FOR_SHELL = DO_HISTORY | SAVE_HISTORY | TAB_COMPLETION | USERNAME_COMPLETION, |
| | 1041 | +}; |
| | 1042 | +typedef struct line_input_t line_input_t; |
| | 1043 | +line_input_t *new_line_input_t(int flags); |
| | 1044 | +int read_line_input(const char* prompt, char* command, int maxsize, line_input_t *state); |
| | 1045 | +#else |
| | 1046 | +int read_line_input(const char* prompt, char* command, int maxsize); |
| | 1047 | +#define read_line_input(prompt, command, maxsize, state) \ |
| | 1048 | + read_line_input(prompt, command, maxsize) |
| | 1049 | +#endif |
| | 1050 | + |
| | 1051 | + |
| | 1052 | +#ifndef COMM_LEN |
| | 1053 | +#ifdef TASK_COMM_LEN |
| | 1054 | +enum { COMM_LEN = TASK_COMM_LEN }; |
| | 1055 | +#else |
| | 1056 | +/* synchronize with sizeof(task_struct.comm) in /usr/include/linux/sched.h */ |
| | 1057 | +enum { COMM_LEN = 16 }; |
| | 1058 | +#endif |
| | 1059 | +#endif |
| | 1060 | +typedef struct { |
| | 1061 | + DIR *dir; |
| | 1062 | +/* Fields are set to 0/NULL if failed to determine (or not requested) */ |
| | 1063 | + char *cmd; |
| | 1064 | + unsigned long vsz; |
| | 1065 | + unsigned long stime, utime; |
| | 1066 | + unsigned pid; |
| | 1067 | + unsigned ppid; |
| | 1068 | + unsigned pgid; |
| | 1069 | + unsigned sid; |
| | 1070 | + unsigned uid; |
| | 1071 | + unsigned gid; |
| | 1072 | + /* basename of executable file in call to exec(2), size from */ |
| | 1073 | + /* sizeof(task_struct.comm) in /usr/include/linux/sched.h */ |
| | 1074 | + char state[4]; |
| | 1075 | + char comm[COMM_LEN]; |
| | 1076 | +// user/group? - use passwd/group parsing functions |
| | 1077 | +} procps_status_t; |
| | 1078 | +enum { |
| | 1079 | + PSSCAN_PID = 1 << 0, |
| | 1080 | + PSSCAN_PPID = 1 << 1, |
| | 1081 | + PSSCAN_PGID = 1 << 2, |
| | 1082 | + PSSCAN_SID = 1 << 3, |
| | 1083 | + PSSCAN_UIDGID = 1 << 4, |
| | 1084 | + PSSCAN_COMM = 1 << 5, |
| | 1085 | + PSSCAN_CMD = 1 << 6, |
| | 1086 | + PSSCAN_STATE = 1 << 7, |
| | 1087 | + PSSCAN_VSZ = 1 << 8, |
| | 1088 | + PSSCAN_STIME = 1 << 9, |
| | 1089 | + PSSCAN_UTIME = 1 << 10, |
| | 1090 | + /* These are all retrieved from proc/NN/stat in one go: */ |
| | 1091 | + PSSCAN_STAT = PSSCAN_PPID | PSSCAN_PGID | PSSCAN_SID |
| | 1092 | + | PSSCAN_COMM | PSSCAN_STATE |
| | 1093 | + | PSSCAN_VSZ | PSSCAN_STIME | PSSCAN_UTIME, |
| | 1094 | +}; |
| | 1095 | +procps_status_t* alloc_procps_scan(int flags); |
| | 1096 | +void free_procps_scan(procps_status_t* sp); |
| | 1097 | +procps_status_t* procps_scan(procps_status_t* sp, int flags); |
| | 1098 | +pid_t *find_pid_by_name(const char* procName); |
| | 1099 | +pid_t *pidlist_reverse(pid_t *pidList); |
| | 1100 | + |
| | 1101 | + |
| | 1102 | +extern const char bb_uuenc_tbl_base64[]; |
| | 1103 | +extern const char bb_uuenc_tbl_std[]; |
| | 1104 | +void bb_uuencode(const unsigned char *s, char *store, const int length, const char *tbl); |
| | 1105 | + |
| | 1106 | +typedef struct sha1_ctx_t { |
| | 1107 | + uint32_t count[2]; |
| | 1108 | + uint32_t hash[5]; |
| | 1109 | + uint32_t wbuf[16]; |
| | 1110 | +} sha1_ctx_t; |
| | 1111 | +void sha1_begin(sha1_ctx_t *ctx); |
| | 1112 | +void sha1_hash(const void *data, size_t length, sha1_ctx_t *ctx); |
| | 1113 | +void *sha1_end(void *resbuf, sha1_ctx_t *ctx); |
| | 1114 | + |
| | 1115 | +typedef struct md5_ctx_t { |
| | 1116 | + uint32_t A; |
| | 1117 | + uint32_t B; |
| | 1118 | + uint32_t C; |
| | 1119 | + uint32_t D; |
| | 1120 | + uint64_t total; |
| | 1121 | + uint32_t buflen; |
| | 1122 | + char buffer[128]; |
| | 1123 | +} md5_ctx_t; |
| | 1124 | +void md5_begin(md5_ctx_t *ctx); |
| | 1125 | +void md5_hash(const void *data, size_t length, md5_ctx_t *ctx); |
| | 1126 | +void *md5_end(void *resbuf, md5_ctx_t *ctx); |
| | 1127 | + |
| | 1128 | +uint32_t *crc32_filltable(int endian); |
| | 1129 | + |
| | 1130 | + |
| | 1131 | +enum { /* DO NOT CHANGE THESE VALUES! cp.c, mv.c, install.c depend on them. */ |
| | 1132 | + FILEUTILS_PRESERVE_STATUS = 1, |
| | 1133 | + FILEUTILS_DEREFERENCE = 2, |
| | 1134 | + FILEUTILS_RECUR = 4, |
| | 1135 | + FILEUTILS_FORCE = 8, |
| | 1136 | + FILEUTILS_INTERACTIVE = 0x10, |
| | 1137 | + FILEUTILS_MAKE_HARDLINK = 0x20, |
| | 1138 | + FILEUTILS_MAKE_SOFTLINK = 0x40, |
| | 1139 | +#if ENABLE_SELINUX |
| | 1140 | + FILEUTILS_PRESERVE_SECURITY_CONTEXT = 0x80, |
| | 1141 | + FILEUTILS_SET_SECURITY_CONTEXT = 0x100 |
| | 1142 | +#endif |
| | 1143 | +}; |
| | 1144 | + |
| | 1145 | +#define FILEUTILS_CP_OPTSTR "pdRfils" USE_SELINUX("c") |
| | 1146 | +extern const char *applet_name; |
| | 1147 | +extern const char BB_BANNER[]; |
| | 1148 | + |
| | 1149 | +extern const char bb_msg_full_version[]; |
| | 1150 | +extern const char bb_msg_memory_exhausted[]; |
| | 1151 | +extern const char bb_msg_invalid_date[]; |
| | 1152 | +extern const char bb_msg_read_error[]; |
| | 1153 | +extern const char bb_msg_write_error[]; |
| | 1154 | +extern const char bb_msg_unknown[]; |
| | 1155 | +extern const char bb_msg_can_not_create_raw_socket[]; |
| | 1156 | +extern const char bb_msg_perm_denied_are_you_root[]; |
| | 1157 | +extern const char bb_msg_requires_arg[]; |
| | 1158 | +extern const char bb_msg_invalid_arg[]; |
| | 1159 | +extern const char bb_msg_standard_input[]; |
| | 1160 | +extern const char bb_msg_standard_output[]; |
| | 1161 | + |
| | 1162 | +extern const char bb_str_default[]; |
| | 1163 | +/* NB: (bb_hexdigits_upcase[i] | 0x20) -> lowercase hex digit */ |
| | 1164 | +extern const char bb_hexdigits_upcase[]; |
| | 1165 | + |
| | 1166 | +extern const char bb_path_mtab_file[]; |
| | 1167 | +extern const char bb_path_nologin_file[]; |
| | 1168 | +extern const char bb_path_passwd_file[]; |
| | 1169 | +extern const char bb_path_shadow_file[]; |
| | 1170 | +extern const char bb_path_gshadow_file[]; |
| | 1171 | +extern const char bb_path_group_file[]; |
| | 1172 | +extern const char bb_path_securetty_file[]; |
| | 1173 | +extern const char bb_path_motd_file[]; |
| | 1174 | +extern const char bb_path_wtmp_file[]; |
| | 1175 | +extern const char bb_dev_null[]; |
| | 1176 | + |
| | 1177 | +extern const int const_int_0; |
| | 1178 | +extern const int const_int_1; |
| | 1179 | + |
| | 1180 | +#ifndef BUFSIZ |
| | 1181 | +#define BUFSIZ 4096 |
| | 1182 | +#endif |
| | 1183 | +extern char bb_common_bufsiz1[BUFSIZ+1]; |
| | 1184 | +/* This struct is deliberately not defined. */ |
| | 1185 | +/* See docs/keep_data_small.txt */ |
| | 1186 | +struct globals; |
| | 1187 | +/* Magic prevents this from going into rodata */ |
| | 1188 | +/* If you want to assign a value, use PTR_TO_GLOBALS = xxx */ |
| | 1189 | +extern struct globals *const ptr_to_globals; |
| | 1190 | +#define PTR_TO_GLOBALS (*(struct globals**)&ptr_to_globals) |
| | 1191 | + |
| | 1192 | +/* You can change LIBBB_DEFAULT_LOGIN_SHELL, but don't use it, |
| | 1193 | + * use bb_default_login_shell and following defines. |
| | 1194 | + * If you change LIBBB_DEFAULT_LOGIN_SHELL, |
| | 1195 | + * don't forget to change increment constant. */ |
| | 1196 | +#define LIBBB_DEFAULT_LOGIN_SHELL "-/bin/sh" |
| | 1197 | +extern const char bb_default_login_shell[]; |
| | 1198 | +/* "/bin/sh" */ |
| | 1199 | +#define DEFAULT_SHELL (bb_default_login_shell+1) |
| | 1200 | +/* "sh" */ |
| | 1201 | +#define DEFAULT_SHELL_SHORT_NAME (bb_default_login_shell+6) |
| | 1202 | + |
| | 1203 | + |
| | 1204 | +#if ENABLE_FEATURE_DEVFS |
| | 1205 | +# define CURRENT_VC "/dev/vc/0" |
| | 1206 | +# define VC_1 "/dev/vc/1" |
| | 1207 | +# define VC_2 "/dev/vc/2" |
| | 1208 | +# define VC_3 "/dev/vc/3" |
| | 1209 | +# define VC_4 "/dev/vc/4" |
| | 1210 | +# define VC_5 "/dev/vc/5" |
| | 1211 | +#if defined(__sh__) || defined(__H8300H__) || defined(__H8300S__) |
| | 1212 | +/* Yes, this sucks, but both SH (including sh64) and H8 have a SCI(F) for their |
| | 1213 | + respective serial ports .. as such, we can't use the common device paths for |
| | 1214 | + these. -- PFM */ |
| | 1215 | +# define SC_0 "/dev/ttsc/0" |
| | 1216 | +# define SC_1 "/dev/ttsc/1" |
| | 1217 | +# define SC_FORMAT "/dev/ttsc/%d" |
| | 1218 | +#else |
| | 1219 | +# define SC_0 "/dev/tts/0" |
| | 1220 | +# define SC_1 "/dev/tts/1" |
| | 1221 | +# define SC_FORMAT "/dev/tts/%d" |
| | 1222 | +#endif |
| | 1223 | +# define VC_FORMAT "/dev/vc/%d" |
| | 1224 | +# define LOOP_FORMAT "/dev/loop/%d" |
| | 1225 | +# define LOOP_NAME "/dev/loop/" |
| | 1226 | +# define FB_0 "/dev/fb/0" |
| | 1227 | +#else |
| | 1228 | +# define CURRENT_VC "/dev/tty0" |
| | 1229 | +# define VC_1 "/dev/tty1" |
| | 1230 | +# define VC_2 "/dev/tty2" |
| | 1231 | +# define VC_3 "/dev/tty3" |
| | 1232 | +# define VC_4 "/dev/tty4" |
| | 1233 | +# define VC_5 "/dev/tty5" |
| | 1234 | +#if defined(__sh__) || defined(__H8300H__) || defined(__H8300S__) |
| | 1235 | +# define SC_0 "/dev/ttySC0" |
| | 1236 | +# define SC_1 "/dev/ttySC1" |
| | 1237 | +# define SC_FORMAT "/dev/ttySC%d" |
| | 1238 | +#else |
| | 1239 | +# define SC_0 "/dev/ttyS0" |
| | 1240 | +# define SC_1 "/dev/ttyS1" |
| | 1241 | +# define SC_FORMAT "/dev/ttyS%d" |
| | 1242 | +#endif |
| | 1243 | +# define VC_FORMAT "/dev/tty%d" |
| | 1244 | +# define LOOP_FORMAT "/dev/loop%d" |
| | 1245 | +# define LOOP_NAME "/dev/loop" |
| | 1246 | +# define FB_0 "/dev/fb0" |
| | 1247 | +#endif |
| | 1248 | + |
| | 1249 | +/* The following devices are the same on devfs and non-devfs systems. */ |
| | 1250 | +#define CURRENT_TTY "/dev/tty" |
| | 1251 | +#define DEV_CONSOLE "/dev/console" |
| | 1252 | + |
| | 1253 | + |
| | 1254 | +#ifndef RB_POWER_OFF |
| | 1255 | +/* Stop system and switch power off if possible. */ |
| | 1256 | +#define RB_POWER_OFF 0x4321fedc |
| | 1257 | +#endif |
| | 1258 | + |
| | 1259 | +/* Make sure we call functions instead of macros. */ |
| | 1260 | +#undef isalnum |
| | 1261 | +#undef isalpha |
| | 1262 | +#undef isascii |
| | 1263 | +#undef isblank |
| | 1264 | +#undef iscntrl |
| | 1265 | +#undef isgraph |
| | 1266 | +#undef islower |
| | 1267 | +#undef isprint |
| | 1268 | +#undef ispunct |
| | 1269 | +#undef isspace |
| | 1270 | +#undef isupper |
| | 1271 | +#undef isxdigit |
| | 1272 | + |
| | 1273 | +/* This one is more efficient - we save ~400 bytes */ |
| | 1274 | +#undef isdigit |
| | 1275 | +#define isdigit(a) ((unsigned)((a) - '0') <= 9) |
| | 1276 | + |
| | 1277 | + |
| | 1278 | +#ifdef DMALLOC |
| | 1279 | +#include <dmalloc.h> |
| | 1280 | +#endif |
| | 1281 | + |
| | 1282 | +#endif /* __LIBBUSYBOX_H__ */ |
| | 1283 | diff -urN busybox-1.5.0/include/libbb.h.rej busybox-1.5.0-cryptpw/include/libbb.h.rej |
| | 1284 | --- busybox-1.5.0/include/libbb.h.rej 1969-12-31 17:00:00.000000000 -0700 |
| | 1285 | +++ busybox-1.5.0-cryptpw/include/libbb.h.rej 2007-04-25 11:32:08.000000000 -0600 |
| | 1286 | @@ -0,0 +1,17 @@ |
| | 1287 | +*************** |
| | 1288 | +*** 461,466 **** |
| | 1289 | + extern char *pw_encrypt(const char *clear, const char *salt); |
| | 1290 | + extern struct spwd *pwd_to_spwd(const struct passwd *pw); |
| | 1291 | + extern int obscure(const char *old, const char *newval, const struct passwd *pwdp); |
| | 1292 | + |
| | 1293 | + extern int bb_xopen(const char *pathname, int flags); |
| | 1294 | + extern int bb_xopen3(const char *pathname, int flags, int mode); |
| | 1295 | +--- 461,468 ---- |
| | 1296 | + extern char *pw_encrypt(const char *clear, const char *salt); |
| | 1297 | + extern struct spwd *pwd_to_spwd(const struct passwd *pw); |
| | 1298 | + extern int obscure(const char *old, const char *newval, const struct passwd *pwdp); |
| | 1299 | ++ extern int get_algo(char *a); |
| | 1300 | ++ extern char *crypt_make_salt(void); |
| | 1301 | + |
| | 1302 | + extern int bb_xopen(const char *pathname, int flags); |
| | 1303 | + extern int bb_xopen3(const char *pathname, int flags, int mode); |
| | 1304 | diff -urN busybox-1.5.0/include/usage.h busybox-1.5.0-cryptpw/include/usage.h |
| | 1305 | --- busybox-1.5.0/include/usage.h 2007-03-22 13:21:35.000000000 -0700 |
| | 1306 | +++ busybox-1.5.0-cryptpw/include/usage.h 2007-04-25 11:32:08.000000000 -0600 |
| | 1307 | @@ -474,6 +474,20 @@ |
| | 1308 | " -d [user] delete crontab for user\n" \ |
| | 1309 | " -c dir specify crontab directory" |
| 58 | | # conditionally compiled objects: |
| 59 | | LIBBB-$(CONFIG_FEATURE_SHADOWPASSWDS)+=pwd2spwd.c |
| 60 | | LIBBB-$(CONFIG_FEATURE_MOUNT_LOOP)+= loop.c |
| 61 | | LIBBB-$(CONFIG_LOSETUP)+= loop.c |
| 62 | | LIBBB-$(CONFIG_FEATURE_MTAB_SUPPORT)+= mtab.c |
| 63 | | +LIBBB-$(CONFIG_CRYPTPW)+= pw_encrypt.c |
| 64 | | LIBBB-$(CONFIG_PASSWD)+= pw_encrypt.c |
| 65 | | LIBBB-$(CONFIG_SULOGIN)+= pw_encrypt.c |
| 66 | | LIBBB-$(CONFIG_FEATURE_HTTPD_AUTH_MD5)+= pw_encrypt.c |
| 67 | | diff -urN busybox/libbb/crypt_make_salt.c busybox.cryptpw/libbb/crypt_make_salt.c |
| 68 | | --- busybox/libbb/crypt_make_salt.c 1969-12-31 17:00:00.000000000 -0700 |
| 69 | | +++ busybox.cryptpw/libbb/crypt_make_salt.c 2006-06-13 15:01:36.000000000 -0600 |
| | 1332 | +#ifdef CONFIG_FEATURE_SHA1_PASSWORDS |
| | 1333 | + #define CRYPTPW_ALG_TYPES(a) a |
| | 1334 | +#else |
| | 1335 | + #define CRYPTPW_ALG_TYPES(a) |
| | 1336 | +#endif |
| | 1337 | +#define cryptpw_trivial_usage \ |
| | 1338 | + "[OPTION] string" |
| | 1339 | +#define cryptpw_full_usage \ |
| | 1340 | + "Outputs a crypted version of the string.\n" \ |
| | 1341 | + "Options:\n" \ |
| | 1342 | + "\t-a\tDefine which algorithm shall be used for the password.\n" \ |
| | 1343 | + "\t\t\t(Choices: des, md5" \ |
| | 1344 | + CRYPTPW_ALG_TYPES(", sha1") \ |
| | 1345 | + ". Default is md5.)" |
| | 1346 | |
| | 1347 | #if ENABLE_DESKTOP |
| | 1348 | |
| | 1349 | diff -urN busybox-1.5.0/include/usage.h.orig busybox-1.5.0-cryptpw/include/usage.h.orig |
| | 1350 | --- busybox-1.5.0/include/usage.h.orig 1969-12-31 17:00:00.000000000 -0700 |
| | 1351 | +++ busybox-1.5.0-cryptpw/include/usage.h.orig 2007-04-25 00:57:41.000000000 -0600 |
| | 1352 | @@ -0,0 +1,3702 @@ |
| | 1353 | +/* vi: set sw=8 ts=8: */ |
| | 1354 | +/* |
| | 1355 | + * This file suffers from chronically incorrect tabification |
| | 1356 | + * of messages. Before editing this file: |
| | 1357 | + * 1. Switch you editor to 8-space tab mode. |
| | 1358 | + * 2. Do not use \t in messages, use real tab character. |
| | 1359 | + * 3. Start each source line with message as follows: |
| | 1360 | + * |<7 spaces>"text with tabs".... |
| | 1361 | + */ |
| | 1362 | + |
| | 1363 | +#ifndef __BB_USAGE_H__ |
| | 1364 | +#define __BB_USAGE_H__ |
| | 1365 | + |
| | 1366 | +#define addgroup_trivial_usage \ |
| | 1367 | + "[-g GID] group_name [user_name]" |
| | 1368 | +#define addgroup_full_usage \ |
| | 1369 | + "Add a group to the system" \ |
| | 1370 | + "\n\nOptions:\n" \ |
| | 1371 | + " -g GID Specify gid" |
| | 1372 | + |
| | 1373 | +#define adduser_trivial_usage \ |
| | 1374 | + "[OPTIONS] user_name" |
| | 1375 | +#define adduser_full_usage \ |
| | 1376 | + "Add a user to the system" \ |
| | 1377 | + "\n\nOptions:\n" \ |
| | 1378 | + " -h DIR Assign home directory DIR\n" \ |
| | 1379 | + " -g GECOS Assign gecos field GECOS\n" \ |
| | 1380 | + " -s SHELL Assign login shell SHELL\n" \ |
| | 1381 | + " -G Add the user to existing group GROUP\n" \ |
| | 1382 | + " -S Create a system user (ignored)\n" \ |
| | 1383 | + " -D Do not assign a password (logins still possible via ssh)\n" \ |
| | 1384 | + " -H Do not create the home directory" |
| | 1385 | + |
| | 1386 | +#define adjtimex_trivial_usage \ |
| | 1387 | + "[-q] [-o offset] [-f frequency] [-p timeconstant] [-t tick]" |
| | 1388 | +#define adjtimex_full_usage \ |
| | 1389 | + "Read and optionally set system timebase parameters.\n" \ |
| | 1390 | + "See adjtimex(2)." \ |
| | 1391 | + "\n\nOptions:\n" \ |
| | 1392 | + " -q Quiet mode - do not print\n" \ |
| | 1393 | + " -o offset Time offset, microseconds\n" \ |
| | 1394 | + " -f frequency Frequency adjust, integer kernel units (65536 is 1ppm)\n" \ |
| | 1395 | + " (positive values make the system clock run fast)\n" \ |
| | 1396 | + " -t tick Microseconds per tick, usually 10000\n" \ |
| | 1397 | + " -p timeconstant" |
| | 1398 | + |
| | 1399 | +#define ar_trivial_usage \ |
| | 1400 | + "[-o] [-v] [-p] [-t] [-x] ARCHIVE FILES" |
| | 1401 | +#define ar_full_usage \ |
| | 1402 | + "Extract or list FILES from an ar archive" \ |
| | 1403 | + "\n\nOptions:\n" \ |
| | 1404 | + " -o Preserve original dates\n" \ |
| | 1405 | + " -p Extract to stdout\n" \ |
| | 1406 | + " -t List\n" \ |
| | 1407 | + " -x Extract\n" \ |
| | 1408 | + " -v Verbosely list files processed" |
| | 1409 | + |
| | 1410 | +#define arp_trivial_usage \ |
| | 1411 | + "\n" \ |
| | 1412 | + "[-vn] [-H type] [-i if] -a [hostname]\n" \ |
| | 1413 | + "[-v] [-i if] -d hostname [pub]\n" \ |
| | 1414 | + "[-v] [-H type] [-i if] -s hostname hw_addr [temp]\n" \ |
| | 1415 | + "[-v] [-H type] [-i if] -s hostname hw_addr [netmask nm] pub\n" \ |
| | 1416 | + "[-v] [-H type] [-i if] -Ds hostname ifa [netmask nm] pub\n" |
| | 1417 | +#define arp_full_usage \ |
| | 1418 | + "Manipulate the system ARP cache" \ |
| | 1419 | + "\n\nOptions:" \ |
| | 1420 | + "\n -a Display (all) hosts" \ |
| | 1421 | + "\n -s Set a new ARP entry" \ |
| | 1422 | + "\n -d Delete a specified entry" \ |
| | 1423 | + "\n -v Verbose" \ |
| | 1424 | + "\n -n Don't resolve names" \ |
| | 1425 | + "\n -i if Specify network interface (e.g. eth0)" \ |
| | 1426 | + "\n -D Read <hwaddr> from given device" \ |
| | 1427 | + "\n -A, -p Specify protocol family" \ |
| | 1428 | + "\n -H hwtype Specify hardware address type" |
| | 1429 | + |
| | 1430 | +#define arping_trivial_usage \ |
| | 1431 | + "[-fqbDUA] [-c count] [-w timeout] [-i device] [-s sender] target" |
| | 1432 | +#define arping_full_usage \ |
| | 1433 | + "Ping hosts by ARP requests/replies" \ |
| | 1434 | + "\n\nOptions:\n" \ |
| | 1435 | + " -f Quit on first ARP reply\n" \ |
| | 1436 | + " -q Be quiet\n" \ |
| | 1437 | + " -b Keep broadcasting, don't go unicast\n" \ |
| | 1438 | + " -D Duplicated address detection mode\n" \ |
| | 1439 | + " -U Unsolicited ARP mode, update your neighbours\n" \ |
| | 1440 | + " -A ARP answer mode, update your neighbours\n" \ |
| | 1441 | + " -c count Stop after sending count ARP request packets\n" \ |
| | 1442 | + " -w timeout Time to wait for ARP reply, in seconds\n" \ |
| | 1443 | + " -i device Outgoing interface name, default is eth0\n" \ |
| | 1444 | + " -s sender Set specific sender IP address\n" \ |
| | 1445 | + " target Target IP address of ARP request" |
| | 1446 | + |
| | 1447 | +#define ash_trivial_usage \ |
| | 1448 | + "[FILE]...\n" \ |
| | 1449 | + "or: ash -c command [args]..." |
| | 1450 | +#define ash_full_usage \ |
| | 1451 | + "The ash shell (command interpreter)" |
| | 1452 | + |
| | 1453 | +#define awk_trivial_usage \ |
| | 1454 | + "[OPTION]... [program-text] [FILE ...]" |
| | 1455 | +#define awk_full_usage \ |
| | 1456 | + "Options:\n" \ |
| | 1457 | + " -v var=val Assign value 'val' to variable 'var'\n" \ |
| | 1458 | + " -F sep Use 'sep' as field separator\n" \ |
| | 1459 | + " -f progname Read program source from file 'progname'" |
| | 1460 | + |
| | 1461 | +#define basename_trivial_usage \ |
| | 1462 | + "FILE [SUFFIX]" |
| | 1463 | +#define basename_full_usage \ |
| | 1464 | + "Strip directory path and suffixes from FILE.\n" \ |
| | 1465 | + "If specified, also remove any trailing SUFFIX." |
| | 1466 | +#define basename_example_usage \ |
| | 1467 | + "$ basename /usr/local/bin/foo\n" \ |
| | 1468 | + "foo\n" \ |
| | 1469 | + "$ basename /usr/local/bin/\n" \ |
| | 1470 | + "bin\n" \ |
| | 1471 | + "$ basename /foo/bar.txt .txt\n" \ |
| | 1472 | + "bar" |
| | 1473 | + |
| | 1474 | +#define bunzip2_trivial_usage \ |
| | 1475 | + "[OPTION]... [FILE]" |
| | 1476 | +#define bunzip2_full_usage \ |
| | 1477 | + "Uncompress FILE (or standard input if FILE is '-' or omitted)" \ |
| | 1478 | + "\n\nOptions:\n" \ |
| | 1479 | + " -c Write output to standard output\n" \ |
| | 1480 | + " -f Force" |
| | 1481 | + |
| | 1482 | +#define busybox_notes_usage \ |
| | 1483 | + "Hello world!\n" |
| | 1484 | + |
| | 1485 | +#define bzcat_trivial_usage \ |
| | 1486 | + "FILE" |
| | 1487 | +#define bzcat_full_usage \ |
| | 1488 | + "Uncompress to stdout" |
| | 1489 | + |
| | 1490 | +#define unlzma_trivial_usage \ |
| | 1491 | + "[OPTION]... [FILE]" |
| | 1492 | +#define unlzma_full_usage \ |
| | 1493 | + "Uncompress FILE (or standard input if FILE is '-' or omitted)" \ |
| | 1494 | + "\n\nOptions:\n" \ |
| | 1495 | + " -c Write output to standard output\n" \ |
| | 1496 | + " -f Force" |
| | 1497 | + |
| | 1498 | +#define lzmacat_trivial_usage \ |
| | 1499 | + "FILE" |
| | 1500 | +#define lzmacat_full_usage \ |
| | 1501 | + "Uncompress to stdout" |
| | 1502 | + |
| | 1503 | +#define cal_trivial_usage \ |
| | 1504 | + "[-jy] [[month] year]" |
| | 1505 | +#define cal_full_usage \ |
| | 1506 | + "Display a calendar" \ |
| | 1507 | + "\n\nOptions:" \ |
| | 1508 | + "\n -j Use julian dates" \ |
| | 1509 | + "\n -y Display the entire year" |
| | 1510 | + |
| | 1511 | +#define cat_trivial_usage \ |
| | 1512 | + "[-u] [FILE]..." |
| | 1513 | +#define cat_full_usage \ |
| | 1514 | + "Concatenate FILE(s) and print them to stdout" \ |
| | 1515 | + "\n\nOptions:" \ |
| | 1516 | + "\n -u Ignored since unbuffered i/o is always used" |
| | 1517 | +#define cat_example_usage \ |
| | 1518 | + "$ cat /proc/uptime\n" \ |
| | 1519 | + "110716.72 17.67" |
| | 1520 | + |
| | 1521 | +#define catv_trivial_usage \ |
| | 1522 | + "[-etv] [FILE]..." |
| | 1523 | +#define catv_full_usage \ |
| | 1524 | + "Display nonprinting characters as ^x or M-x" \ |
| | 1525 | + "\n\nOptions:\n" \ |
| | 1526 | + " -e End each line with $\n" \ |
| | 1527 | + " -t Show tabs as ^I\n" \ |
| | 1528 | + " -v Don't use ^x or M-x escapes" |
| | 1529 | +#define chattr_trivial_usage \ |
| | 1530 | + "[-R] [-+=AacDdijsStTu] [-v version] files..." |
| | 1531 | +#define chattr_full_usage \ |
| | 1532 | + "Change file attributes on an ext2 fs\n\n" \ |
| | 1533 | + "Modifiers:\n" \ |
| | 1534 | + " - Remove attributes\n" \ |
| | 1535 | + " + Add attributes\n" \ |
| | 1536 | + " = Set attributes\n" \ |
| | 1537 | + "Attributes:\n" \ |
| | 1538 | + " A Don't track atime\n" \ |
| | 1539 | + " a Append mode only\n" \ |
| | 1540 | + " c Enable compress\n" \ |
| | 1541 | + " D Write dir contents synchronously\n" \ |
| | 1542 | + " d Do not backup with dump\n" \ |
| | 1543 | + " i Cannot be modified (immutable)\n" \ |
| | 1544 | + " j Write all data to journal first\n" \ |
| | 1545 | + " s Zero disk storage when deleted\n" \ |
| | 1546 | + " S Write file contents synchronously\n" \ |
| | 1547 | + " t Disable tail-merging of partial blocks with other files\n" \ |
| | 1548 | + " u Allow file to be undeleted\n" \ |
| | 1549 | + "Options:\n" \ |
| | 1550 | + " -R Recursively list subdirectories\n" \ |
| | 1551 | + " -v Set the file's version/generation number" |
| | 1552 | + |
| | 1553 | +#define chcon_trivial_usage \ |
| | 1554 | + "[OPTIONS] CONTEXT FILE...\n" \ |
| | 1555 | + " chcon [OPTIONS] [-u USER] [-r ROLE] [-l RANGE] [-t TYPE] FILE...\n" \ |
| | 1556 | + " chcon [OPTIONS] --reference=RFILE FILE...\n" |
| | 1557 | +#define chcon_full_usage \ |
| | 1558 | + "Change the security context of each FILE to CONTEXT\n" \ |
| | 1559 | + "\n -v, --verbose Verbose" \ |
| | 1560 | + "\n -c, --changes Report changes made" \ |
| | 1561 | + "\n -h, --no-dereference Affect symlinks instead of their targets" \ |
| | 1562 | + "\n -f, --silent, --quiet Suppress most error messages" \ |
| | 1563 | + "\n --reference=RFILE Use RFILE's group instead of using a CONTEXT value" \ |
| | 1564 | + "\n -u, --user=USER Set user USER in the target security context" \ |
| | 1565 | + "\n -r, --role=ROLE Set role ROLE in the target security context" \ |
| | 1566 | + "\n -t, --type=TYPE Set type TYPE in the target security context" \ |
| | 1567 | + "\n -l, --range=RANGE Set range RANGE in the target security context" \ |
| | 1568 | + "\n -R, --recursive Recurse subdirectories" \ |
| | 1569 | + |
| | 1570 | +#define chmod_trivial_usage \ |
| | 1571 | + "[-R"USE_DESKTOP("cvf")"] MODE[,MODE]... FILE..." |
| | 1572 | +#define chmod_full_usage \ |
| | 1573 | + "Each MODE is one or more of the letters ugoa, one of the\n" \ |
| | 1574 | + "symbols +-= and one or more of the letters rwxst" \ |
| | 1575 | + "\n\nOptions:" \ |
| | 1576 | + "\n -R Changes files and directories recursively" \ |
| | 1577 | + USE_DESKTOP( \ |
| | 1578 | + "\n -c List changed files" \ |
| | 1579 | + "\n -v List all files" \ |
| | 1580 | + "\n -f Hide errors" \ |
| | 1581 | + ) |
| | 1582 | +#define chmod_example_usage \ |
| | 1583 | + "$ ls -l /tmp/foo\n" \ |
| | 1584 | + "-rw-rw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n" \ |
| | 1585 | + "$ chmod u+x /tmp/foo\n" \ |
| | 1586 | + "$ ls -l /tmp/foo\n" \ |
| | 1587 | + "-rwxrw-r-- 1 root root 0 Apr 12 18:25 /tmp/foo*\n" \ |
| | 1588 | + "$ chmod 444 /tmp/foo\n" \ |
| | 1589 | + "$ ls -l /tmp/foo\n" \ |
| | 1590 | + "-r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n" |
| | 1591 | + |
| | 1592 | +#define chgrp_trivial_usage \ |
| | 1593 | + "[-RhLHP"USE_DESKTOP("cvf")"]... GROUP FILE..." |
| | 1594 | +#define chgrp_full_usage \ |
| | 1595 | + "Change the group membership of each FILE to GROUP" \ |
| | 1596 | + "\n\nOptions:" \ |
| | 1597 | + "\n -R Recurse directories" \ |
| | 1598 | + "\n -h Affect symlinks instead of symlink targets" \ |
| | 1599 | + "\n -L Traverse all symlinks to directories" \ |
| | 1600 | + "\n -H Traverse symlinks on command line only" \ |
| | 1601 | + "\n -P Do not traverse symlinks (default)" \ |
| | 1602 | + USE_DESKTOP( \ |
| | 1603 | + "\n -c List changed files" \ |
| | 1604 | + "\n -v Verbose" \ |
| | 1605 | + "\n -f Hide errors" \ |
| | 1606 | + ) |
| | 1607 | +#define chgrp_example_usage \ |
| | 1608 | + "$ ls -l /tmp/foo\n" \ |
| | 1609 | + "-r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo\n" \ |
| | 1610 | + "$ chgrp root /tmp/foo\n" \ |
| | 1611 | + "$ ls -l /tmp/foo\n" \ |
| | 1612 | + "-r--r--r-- 1 andersen root 0 Apr 12 18:25 /tmp/foo\n" |
| | 1613 | + |
| | 1614 | +#define chown_trivial_usage \ |
| | 1615 | + "[-RhLHP"USE_DESKTOP("cvf")"]... OWNER[<.|:>[GROUP]] FILE..." |
| | 1616 | +#define chown_full_usage \ |
| | 1617 | + "Change the owner and/or group of each FILE to OWNER and/or GROUP" \ |
| | 1618 | + "\n\nOptions:" \ |
| | 1619 | + "\n -R Recurse directories" \ |
| | 1620 | + "\n -h Affect symlinks instead of symlink targets" \ |
| | 1621 | + "\n -L Traverse all symlinks to directories" \ |
| | 1622 | + "\n -H Traverse symlinks on command line only" \ |
| | 1623 | + "\n -P Do not traverse symlinks (default)" \ |
| | 1624 | + USE_DESKTOP( \ |
| | 1625 | + "\n -c List changed files" \ |
| | 1626 | + "\n -v List all files" \ |
| | 1627 | + "\n -f Hide errors" \ |
| | 1628 | + ) |
| | 1629 | +#define chown_example_usage \ |
| | 1630 | + "$ ls -l /tmp/foo\n" \ |
| | 1631 | + "-r--r--r-- 1 andersen andersen 0 Apr 12 18:25 /tmp/foo\n" \ |
| | 1632 | + "$ chown root /tmp/foo\n" \ |
| | 1633 | + "$ ls -l /tmp/foo\n" \ |
| | 1634 | + "-r--r--r-- 1 root andersen 0 Apr 12 18:25 /tmp/foo\n" \ |
| | 1635 | + "$ chown root.root /tmp/foo\n" \ |
| | 1636 | + "ls -l /tmp/foo\n" \ |
| | 1637 | + "-r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n" |
| | 1638 | + |
| | 1639 | +#define chpst_trivial_usage \ |
| | 1640 | + "[-vP012] [-u user[:group]] [-U user[:group]] [-e dir] " \ |
| | 1641 | + "[-/ dir] [-n nice] [-m bytes] [-d bytes] [-o files] " \ |
| | 1642 | + "[-p processes] [-f bytes] [-c bytes] prog args" |
| | 1643 | +#define chpst_full_usage \ |
| | 1644 | + "Change the process state and run specified program" \ |
| | 1645 | + "\n\nOptions:\n" \ |
| | 1646 | + " -u user[:grp] Set uid and gid\n" \ |
| | 1647 | + " -U user[:grp] Set environment variables UID and GID\n" \ |
| | 1648 | + " -e dir Set environment variables as specified by files\n" \ |
| | 1649 | + " in the directory: file=1st_line_of_file\n" \ |
| | 1650 | + " -/ dir Chroot to dir\n" \ |
| | 1651 | + " -n inc Add inc to nice value\n" \ |
| | 1652 | + " -m bytes Limit data segment, stack segment, locked physical pages,\n" \ |
| | 1653 | + " and total of all segment per process to bytes bytes each\n" \ |
| | 1654 | + " -d bytes Limit data segment\n" \ |
| | 1655 | + " -o n Limit the number of open file descriptors per process to n\n" \ |
| | 1656 | + " -p n Limit number of processes per uid to n\n" \ |
| | 1657 | + " -f bytes Limit output file size to bytes bytes\n" \ |
| | 1658 | + " -c bytes Limit core file size to bytes bytes\n" \ |
| | 1659 | + " -v Verbose\n" \ |
| | 1660 | + " -P Run prog in a new process group\n" \ |
| | 1661 | + " -0 Close standard input\n" \ |
| | 1662 | + " -1 Close standard output\n" \ |
| | 1663 | + " -2 Close standard error" |
| | 1664 | +#define setuidgid_trivial_usage \ |
| | 1665 | + "account prog args" |
| | 1666 | +#define setuidgid_full_usage \ |
| | 1667 | + "Set uid and gid to account's uid and gid, removing all supplementary\n" \ |
| | 1668 | + "groups, then run prog" |
| | 1669 | +#define envuidgid_trivial_usage \ |
| | 1670 | + "account prog args" |
| | 1671 | +#define envuidgid_full_usage \ |
| | 1672 | + "Set $UID to account's uid and $GID to account's gid, then run prog" |
| | 1673 | +#define envdir_trivial_usage \ |
| | 1674 | + "dir prog args" |
| | 1675 | +#define envdir_full_usage \ |
| | 1676 | + "Set various environment variables as specified by files\n" \ |
| | 1677 | + "in the directory dir, then run prog" |
| | 1678 | +#define softlimit_trivial_usage \ |
| | 1679 | + "[-a allbytes] [-c corebytes] [-d databytes] [-f filebytes] " \ |
| | 1680 | + "[-l lockbytes] [-m membytes] [-o openfiles] [-p processes] " \ |
| | 1681 | + "[-r residentbytes] [-s stackbytes] [-t cpusecs] prog args" |
| | 1682 | +#define softlimit_full_usage \ |
| | 1683 | + "Set soft resource limits, then run prog" \ |
| | 1684 | + "\n\nOptions:\n" \ |
| | 1685 | + " -m n Same as -d n -s n -l n -a n\n" \ |
| | 1686 | + " -d n Limit the data segment per process to n bytes\n" \ |
| | 1687 | + " -s n Limit the stack segment per process to n bytes\n" \ |
| | 1688 | + " -l n Limit the locked physical pages per process to n bytes\n" \ |
| | 1689 | + " -a n Limit the total of all segments per process to n bytes\n" \ |
| | 1690 | + " -o n Limit the number of open file descriptors per process to n\n" \ |
| | 1691 | + " -p n Limit the number of processes per uid to n\n" \ |
| | 1692 | + "Options controlling file sizes:\n" \ |
| | 1693 | + " -f n Limit output file sizes to n bytes\n" \ |
| | 1694 | + " -c n Limit core file sizes to n bytes\n" \ |
| | 1695 | + "Efficiency opts:\n" \ |
| | 1696 | + " -r n Limit the resident set size to n bytes. This limit is not\n" \ |
| | 1697 | + " enforced unless physical memory is full\n" \ |
| | 1698 | + " -t n Limit the CPU time to n seconds. This limit is not enforced\n" \ |
| | 1699 | + " except that the process receives a SIGXCPU signal after n seconds\n" \ |
| | 1700 | + "\n" \ |
| | 1701 | + "Some options may have no effect on some operating systems\n" \ |
| | 1702 | + "n may be =, indicating that soft limit should be set equal to hard limit" |
| | 1703 | + |
| | 1704 | +#define chroot_trivial_usage \ |
| | 1705 | + "NEWROOT [COMMAND...]" |
| | 1706 | +#define chroot_full_usage \ |
| | 1707 | + "Run COMMAND with root directory set to NEWROOT" |
| | 1708 | +#define chroot_example_usage \ |
| | 1709 | + "$ ls -l /bin/ls\n" \ |
| | 1710 | + "lrwxrwxrwx 1 root root 12 Apr 13 00:46 /bin/ls -> /BusyBox\n" \ |
| | 1711 | + "# mount /dev/hdc1 /mnt -t minix\n" \ |
| | 1712 | + "# chroot /mnt\n" \ |
| | 1713 | + "# ls -l /bin/ls\n" \ |
| | 1714 | + "-rwxr-xr-x 1 root root 40816 Feb 5 07:45 /bin/ls*\n" |
| | 1715 | + |
| | 1716 | +#define chvt_trivial_usage \ |
| | 1717 | + "N" |
| | 1718 | +#define chvt_full_usage \ |
| | 1719 | + "Change the foreground virtual terminal to /dev/ttyN" |
| | 1720 | + |
| | 1721 | +#define cksum_trivial_usage \ |
| | 1722 | + "FILES..." |
| | 1723 | +#define cksum_full_usage \ |
| | 1724 | + "Calculate the CRC32 checksums of FILES" |
| | 1725 | + |
| | 1726 | +#define clear_trivial_usage \ |
| | 1727 | + "" |
| | 1728 | +#define clear_full_usage \ |
| | 1729 | + "Clear screen" |
| | 1730 | + |
| | 1731 | +#define cmp_trivial_usage \ |
| | 1732 | + "[-l] [-s] FILE1 [FILE2" USE_DESKTOP(" [SKIP1 [SKIP2]") "]]" |
| | 1733 | +#define cmp_full_usage \ |
| | 1734 | + "Compares FILE1 vs stdin if FILE2 is not specified" \ |
| | 1735 | + "\n\nOptions:\n" \ |
| | 1736 | + " -l Write the byte numbers (decimal) and values (octal)\n" \ |
| | 1737 | + " for all differing bytes\n" \ |
| | 1738 | + " -s Quiet mode - do not print" |
| | 1739 | + |
| | 1740 | +#define comm_trivial_usage \ |
| | 1741 | + "[-123] FILE1 FILE2" |
| | 1742 | +#define comm_full_usage \ |
| | 1743 | + "Compare FILE1 to FILE2, or to stdin if - is specified" \ |
| | 1744 | + "\n\nOptions:\n" \ |
| | 1745 | + " -1 Suppress lines unique to FILE1\n" \ |
| | 1746 | + " -2 Suppress lines unique to FILE2\n" \ |
| | 1747 | + " -3 Suppress lines common to both files" |
| | 1748 | + |
| | 1749 | +#define bbconfig_trivial_usage \ |
| | 1750 | + "" |
| | 1751 | +#define bbconfig_full_usage \ |
| | 1752 | + "Print the config file which built busybox" |
| | 1753 | + |
| | 1754 | +#define bbsh_trivial_usage \ |
| | 1755 | + "[FILE]...\n" \ |
| | 1756 | + "or: bbsh -c command [args]..." |
| | 1757 | +#define bbsh_full_usage \ |
| | 1758 | + "The bbsh shell (command interpreter)" |
| | 1759 | + |
| | 1760 | +#define chrt_trivial_usage \ |
| | 1761 | + "[OPTION]... [prio] [pid | command [arg]...]" |
| | 1762 | +#define chrt_full_usage \ |
| | 1763 | + "manipulate real-time attributes of a process" \ |
| | 1764 | + "\n\nOptions:\n" \ |
| | 1765 | + " -p operate on pid\n" \ |
| | 1766 | + " -r set scheduling policy to SCHED_RR\n" \ |
| | 1767 | + " -f set scheduling policy to SCHED_FIFO\n" \ |
| | 1768 | + " -o set scheduling policy to SCHED_OTHER\n" \ |
| | 1769 | + " -m show min and max priorities" |
| | 1770 | + |
| | 1771 | +#define chrt_example_usage \ |
| | 1772 | + "$ chrt -r 4 sleep 900 ; x=$!\n" \ |
| | 1773 | + "$ chrt -f -p 3 $x\n" \ |
| | 1774 | + "You need CAP_SYS_NICE privileges to set scheduling attributes of a process" |
| | 1775 | + |
| | 1776 | +#define cp_trivial_usage \ |
| | 1777 | + "[OPTION]... SOURCE DEST" |
| | 1778 | +#define cp_full_usage \ |
| | 1779 | + "Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY" \ |
| | 1780 | + "\n\nOptions:" \ |
| | 1781 | + "\n -a Same as -dpR" \ |
| | 1782 | + USE_SELINUX( \ |
| | 1783 | + "\n -c Preserves security context" \ |
| | 1784 | + ) \ |
| | 1785 | + "\n -d,-P Preserve links" \ |
| | 1786 | + "\n -H,-L Dereference all symlinks (default)" \ |
| | 1787 | + "\n -p Preserve file attributes if possible" \ |
| | 1788 | + "\n -f Force overwrite" \ |
| | 1789 | + "\n -i Prompt before overwrite" \ |
| | 1790 | + "\n -R,-r Recurse directories" \ |
| | 1791 | + "\n -l,-s Create (sym)links" |
| | 1792 | + |
| | 1793 | +#define cpio_trivial_usage \ |
| | 1794 | + "-[dimtuv][F cpiofile]" |
| | 1795 | +#define cpio_full_usage \ |
| | 1796 | + "Extract or list files from a cpio archive\n" \ |
| | 1797 | + "Main operation mode:\n" \ |
| | 1798 | + " d Make leading directories\n" \ |
| | 1799 | + " i Extract\n" \ |
| | 1800 | + " m Preserve mtime\n" \ |
| | 1801 | + " t List\n" \ |
| | 1802 | + " v Verbose\n" \ |
| | 1803 | + " u Unconditional overwrite\n" \ |
| | 1804 | + " F Input from file" |
| | 1805 | + |
| | 1806 | +#define crond_trivial_usage \ |
| | 1807 | + "-d[#] -c <crondir> -f -b" |
| | 1808 | +#define crond_full_usage \ |
| | 1809 | + " -d [#] -l [#] -S -L logfile -f -b -c dir\n" \ |
| | 1810 | + " -d num Debug level\n" \ |
| | 1811 | + " -l num Log level (8 - default)\n" \ |
| | 1812 | + " -S Log to syslogd (default)\n" \ |
| | 1813 | + " -L file Log to file\n" \ |
| | 1814 | + " -f Run in foreground\n" \ |
| | 1815 | + " -b Run in background (default)\n" \ |
| | 1816 | + " -c dir Working dir" |
| | 1817 | + |
| | 1818 | +#define crontab_trivial_usage \ |
| | 1819 | + "[-c dir] {file|-}|[-u|-l|-e|-d user]" |
| | 1820 | +#define crontab_full_usage \ |
| | 1821 | + " File <opts> replace crontab from file\n" \ |
| | 1822 | + " - <opts> replace crontab from stdin\n" \ |
| | 1823 | + " -u user specify user\n" \ |
| | 1824 | + " -l [user] list crontab for user\n" \ |
| | 1825 | + " -e [user] edit crontab for user\n" \ |
| | 1826 | + " -d [user] delete crontab for user\n" \ |
| | 1827 | + " -c dir specify crontab directory" |
| | 1828 | + |
| | 1829 | +#ifdef CONFIG_FEATURE_SHA1_PASSWORDS |
| | 1830 | + #define CRYPTPW_ALG_TYPES(a) a |
| | 1831 | +#else |
| | 1832 | + #define CRYPTPW_ALG_TYPES(a) |
| | 1833 | +#endif |
| | 1834 | +#define cryptpw_trivial_usage \ |
| | 1835 | + "[OPTION] string" |
| | 1836 | +#define cryptpw_full_usage \ |
| | 1837 | + "Outputs a crypted version of the string.\n" \ |
| | 1838 | + "Options:\n" \ |
| | 1839 | + "\t-a\tDefine which algorithm shall be used for the password.\n" \ |
| | 1840 | + "\t\t\t(Choices: des, md5" \ |
| | 1841 | + CRYPTPW_ALG_TYPES(", sha1") \ |
| | 1842 | + ". Default is md5.)" |
| | 1843 | + |
| | 1844 | +#define cut_trivial_usage \ |
| | 1845 | + "[OPTION]... [FILE]..." |
| | 1846 | +#define cut_full_usage \ |
| | 1847 | + "Print selected fields from each input FILE to standard output" \ |
| | 1848 | + "\n\nOptions:\n" \ |
| | 1849 | + " -b LIST Output only bytes from LIST\n" \ |
| | 1850 | + " -c LIST Output only characters from LIST\n" \ |
| | 1851 | + " -d CHAR Use CHAR instead of tab as the field delimiter\n" \ |
| | 1852 | + " -s Output only the lines containing delimiter\n" \ |
| | 1853 | + " -f N Print only these fields\n" \ |
| | 1854 | + " -n Ignored" |
| | 1855 | +#define cut_example_usage \ |
| | 1856 | + "$ echo \"Hello world\" | cut -f 1 -d ' '\n" \ |
| | 1857 | + "Hello\n" \ |
| | 1858 | + "$ echo \"Hello world\" | cut -f 2 -d ' '\n" \ |
| | 1859 | + "world\n" |
| | 1860 | + |
| | 1861 | +#define date_trivial_usage \ |
| | 1862 | + "[OPTION]... [MMDDhhmm[[CC]YY][.ss]] [+FORMAT]" |
| | 1863 | +#define date_full_usage \ |
| | 1864 | + "Display current time in the given FORMAT, or set system date" \ |
| | 1865 | + "\n\nOptions:\n" \ |
| | 1866 | + " -R Outputs RFC-822 compliant date string\n" \ |
| | 1867 | + " -d STRING Displays time described by STRING, not 'now'\n" \ |
| | 1868 | + USE_FEATURE_DATE_ISOFMT( \ |
| | 1869 | + " -I[TIMESPEC] Outputs an ISO-8601 compliant date/time string\n" \ |
| | 1870 | + " TIMESPEC='date' (or missing) for date only,\n" \ |
| | 1871 | + " 'hours', 'minutes', or 'seconds' for date and,\n" \ |
| | 1872 | + " time to the indicated precision\n" \ |
| | 1873 | + " -D hint Use 'hint' as date format, via strptime()\n" \ |
| | 1874 | + ) \ |
| | 1875 | + " -s Sets time described by STRING\n" \ |
| | 1876 | + " -r FILE Displays the last modification time of FILE\n" \ |
| | 1877 | + " -u Prints or sets Coordinated Universal Time" |
| | 1878 | +#define date_example_usage \ |
| | 1879 | + "$ date\n" \ |
| | 1880 | + "Wed Apr 12 18:52:41 MDT 2000\n" |
| | 1881 | + |
| | 1882 | +#define dc_trivial_usage \ |
| | 1883 | + "expression ..." |
| | 1884 | +#define dc_full_usage \ |
| | 1885 | + "This is a Tiny RPN calculator that understands the\n" \ |
| | 1886 | + "following operations: +, add, -, sub, *, mul, /, div, %, mod, " \ |
| | 1887 | + "**, exp, and, or, not, eor.\n" \ |
| | 1888 | + "For example: 'dc 2 2 add' -> 4, and 'dc 8 8 \\* 2 2 + /' -> 16." \ |
| | 1889 | + "\n\nOptions:\n" \ |
| | 1890 | + "p - Prints the value on the top of the stack, without altering the stack\n" \ |
| | 1891 | + "f - Prints the entire contents of the stack without altering anything\n" \ |
| | 1892 | + "o - Pops the value off the top of the stack and uses it to set the output radix\n" \ |
| | 1893 | + " Only 10 and 16 are supported" |
| | 1894 | +#define dc_example_usage \ |
| | 1895 | + "$ dc 2 2 + p\n" \ |
| | 1896 | + "4\n" \ |
| | 1897 | + "$ dc 8 8 \\* 2 2 + / p\n" \ |
| | 1898 | + "16\n" \ |
| | 1899 | + "$ dc 0 1 and p\n" \ |
| | 1900 | + "0\n" \ |
| | 1901 | + "$ dc 0 1 or p\n" \ |
| | 1902 | + "1\n" \ |
| | 1903 | + "$ echo 72 9 div 8 mul p | dc\n" \ |
| | 1904 | + "64\n" |
| | 1905 | + |
| | 1906 | +#define dd_trivial_usage \ |
| | 1907 | + "[if=FILE] [of=FILE] " USE_FEATURE_DD_IBS_OBS("[ibs=N] [obs=N] ") "[bs=N] [count=N] [skip=N]\n" \ |
| | 1908 | + " [seek=N]" USE_FEATURE_DD_IBS_OBS(" [conv=notrunc|noerror|sync]") |
| | 1909 | +#define dd_full_usage \ |
| | 1910 | + "Copy a file with converting and formatting" \ |
| | 1911 | + "\n\nOptions:\n" \ |
| | 1912 | + " if=FILE Read from FILE instead of stdin\n" \ |
| | 1913 | + " of=FILE Write to FILE instead of stdout\n" \ |
| | 1914 | + " bs=N Read and write N bytes at a time\n" \ |
| | 1915 | + USE_FEATURE_DD_IBS_OBS( \ |
| | 1916 | + " ibs=N Read N bytes at a time\n") \ |
| | 1917 | + USE_FEATURE_DD_IBS_OBS( \ |
| | 1918 | + " obs=N Write N bytes at a time\n") \ |
| | 1919 | + " count=N Copy only N input blocks\n" \ |
| | 1920 | + " skip=N Skip N input blocks\n" \ |
| | 1921 | + " seek=N Skip N output blocks\n" \ |
| | 1922 | + USE_FEATURE_DD_IBS_OBS( \ |
| | 1923 | + " conv=notrunc Don't truncate output file\n" \ |
| | 1924 | + " conv=noerror Continue after read errors\n" \ |
| | 1925 | + " conv=sync Pad blocks with zeros\n") \ |
| | 1926 | + "\n" \ |
| | 1927 | + "Numbers may be suffixed by c (x1), w (x2), b (x512), kD (x1000), k (x1024),\n" \ |
| | 1928 | + "MD (x1000000), M (x1048576), GD (x1000000000) or G (x1073741824)" |
| | 1929 | +#define dd_example_usage \ |
| | 1930 | + "$ dd if=/dev/zero of=/dev/ram1 bs=1M count=4\n" \ |
| | 1931 | + "4+0 records in\n" \ |
| | 1932 | + "4+0 records out\n" |
| | 1933 | + |
| | 1934 | +#define deallocvt_trivial_usage \ |
| | 1935 | + "[N]" |
| | 1936 | +#define deallocvt_full_usage \ |
| | 1937 | + "Deallocate unused virtual terminal /dev/ttyN" |
| | 1938 | + |
| | 1939 | +#define delgroup_trivial_usage \ |
| | 1940 | + "GROUP" |
| | 1941 | +#define delgroup_full_usage \ |
| | 1942 | + "Delete group GROUP from the system" |
| | 1943 | + |
| | 1944 | +#define deluser_trivial_usage \ |
| | 1945 | + "USER" |
| | 1946 | +#define deluser_full_usage \ |
| | 1947 | + "Delete user USER from the system" |
| | 1948 | + |
| | 1949 | +#define devfsd_trivial_usage \ |
| | 1950 | + "mntpnt [-v]" \ |
| | 1951 | + USE_DEVFSD_FG_NP("[-fg][-np]" ) |
| | 1952 | +#define devfsd_full_usage \ |
| | 1953 | + "Manage devfs permissions and old device name symlinks" \ |
| | 1954 | + "\n\nOptions:" \ |
| | 1955 | + "\n mntpnt The mount point where devfs is mounted" \ |
| | 1956 | + "\n -v Print the protocol version numbers for devfsd" \ |
| | 1957 | + "\n and the kernel-side protocol version and exits" \ |
| | 1958 | + USE_DEVFSD_FG_NP( \ |
| | 1959 | + "\n -fg Run the daemon in the foreground" \ |
| | 1960 | + "\n -np Exit after parsing the configuration file" \ |
| | 1961 | + "\n and processing synthetic REGISTER events," \ |
| | 1962 | + "\n do not poll for events") |
| | 1963 | + |
| | 1964 | +#define df_trivial_usage \ |
| | 1965 | + "[-" USE_FEATURE_HUMAN_READABLE("hm") "k] [FILESYSTEM ...]" |
| | 1966 | +#define df_full_usage \ |
| | 1967 | + "Print the filesystem space used and space available" \ |
| | 1968 | + "\n\nOptions:\n" \ |
| | 1969 | + USE_FEATURE_HUMAN_READABLE( \ |
| | 1970 | + "\n -h Print sizes in human readable format (e.g., 1K 243M 2G )\n" \ |
| | 1971 | + " -m Print sizes in megabytes\n" \ |
| | 1972 | + " -k Print sizes in kilobytes(default)") \ |
| | 1973 | + SKIP_FEATURE_HUMAN_READABLE( \ |
| | 1974 | + "\n -k Ignored") |
| | 1975 | +#define df_example_usage \ |
| | 1976 | + "$ df\n" \ |
| | 1977 | + "Filesystem 1k-blocks Used Available Use% Mounted on\n" \ |
| | 1978 | + "/dev/sda3 8690864 8553540 137324 98% /\n" \ |
| | 1979 | + "/dev/sda1 64216 36364 27852 57% /boot\n" \ |
| | 1980 | + "$ df /dev/sda3\n" \ |
| | 1981 | + "Filesystem 1k-blocks Used Available Use% Mounted on\n" \ |
| | 1982 | + "/dev/sda3 8690864 8553540 137324 98% /\n" |
| | 1983 | + |
| | 1984 | +#define dhcprelay_trivial_usage \ |
| | 1985 | + "[client_device_list] [server_device]" |
| | 1986 | +#define dhcprelay_full_usage \ |
| | 1987 | + "Relay dhcp requests from client devices to server device" |
| | 1988 | + |
| | 1989 | +#define dhcprelay_trivial_usage \ |
| | 1990 | + "[client_device_list] [server_device]" |
| | 1991 | +#define dhcprelay_full_usage \ |
| | 1992 | + "Relay dhcp requests from client devices to server device" |
| | 1993 | + |
| | 1994 | +#define diff_trivial_usage \ |
| | 1995 | + "[-abdiNqrTstw] [-L LABEL] [-S FILE] [-U LINES] FILE1 FILE2" |
| | 1996 | +#define diff_full_usage \ |
| | 1997 | + "Compare files line by line and output the differences between them.\n" \ |
| | 1998 | + "This diff implementation only supports unified diffs." \ |
| | 1999 | + "\n\nOptions:\n" \ |
| | 2000 | + " -a Treat all files as text\n" \ |
| | 2001 | + " -b Ignore changes in the amount of whitespace\n" \ |
| | 2002 | + " -d Try hard to find a smaller set of changes\n" \ |
| | 2003 | + " -i Ignore case differences\n" \ |
| | 2004 | + " -L Use LABEL instead of the filename in the unified header\n" \ |
| | 2005 | + " -N Treat absent files as empty\n" \ |
| | 2006 | + " -q Output only whether files differ\n" \ |
| | 2007 | + " -r Recursively compare subdirectories\n" \ |
| | 2008 | + " -S Start with FILE when comparing directories\n" \ |
| | 2009 | + " -T Make tabs line up by prefixing a tab when necessary\n" \ |
| | 2010 | + " -s Report when two files are the same\n" \ |
| | 2011 | + " -t Expand tabs to spaces in output\n" \ |
| | 2012 | + " -U Output LINES lines of context\n" \ |
| | 2013 | + " -w Ignore all whitespace" |
| | 2014 | + |
| | 2015 | +#define dirname_trivial_usage \ |
| | 2016 | + "FILENAME" |
| | 2017 | +#define dirname_full_usage \ |
| | 2018 | + "Strip non-directory suffix from FILENAME" |
| | 2019 | +#define dirname_example_usage \ |
| | 2020 | + "$ dirname /tmp/foo\n" \ |
| | 2021 | + "/tmp\n" \ |
| | 2022 | + "$ dirname /tmp/foo/\n" \ |
| | 2023 | + "/tmp\n" |
| | 2024 | + |
| | 2025 | +#define dmesg_trivial_usage \ |
| | 2026 | + "[-c] [-n LEVEL] [-s SIZE]" |
| | 2027 | +#define dmesg_full_usage \ |
| | 2028 | + "Print or control the kernel ring buffer" \ |
| | 2029 | + "\n\nOptions:\n" \ |
| | 2030 | + " -c Clears the ring buffer's contents after printing\n" \ |
| | 2031 | + " -n LEVEL Sets console logging level\n" \ |
| | 2032 | + " -s SIZE Use a buffer of size SIZE" |
| | 2033 | + |
| | 2034 | +#define dnsd_trivial_usage \ |
| | 2035 | + "[-c config] [-t seconds] [-p port] [-i iface-ip] [-d]" |
| | 2036 | +#define dnsd_full_usage \ |
| | 2037 | + "Small and static DNS server daemon" \ |
| | 2038 | + "\n\nOptions:\n" \ |
| | 2039 | + " -c Config filename\n" \ |
| | 2040 | + " -t TTL in seconds\n" \ |
| | 2041 | + " -p Listening port\n" \ |
| | 2042 | + " -i Listening iface ip (default all)\n" \ |
| | 2043 | + " -d Daemonize" |
| | 2044 | + |
| | 2045 | +#define dos2unix_trivial_usage \ |
| | 2046 | + "[option] [FILE]" |
| | 2047 | +#define dos2unix_full_usage \ |
| | 2048 | + "Convert FILE from dos format to unix format. When no option\n" \ |
| | 2049 | + "is given, the input is converted to the opposite output format.\n" \ |
| | 2050 | + "When no file is given, use stdin for input and stdout for output." \ |
| | 2051 | + "\n\nOptions:\n" \ |
| | 2052 | + " -u Output will be in UNIX format\n" \ |
| | 2053 | + " -d Output will be in DOS format" |
| | 2054 | + |
| | 2055 | +#define dpkg_trivial_usage \ |
| | 2056 | + "[-ilCPru] [-F option] package_name" |
| | 2057 | +#define dpkg_full_usage \ |
| | 2058 | + "Install, remove and manage Debian packages" \ |
| | 2059 | + "\n\nOptions:\n" \ |
| | 2060 | + " -i Install the package\n" \ |
| | 2061 | + " -l List of installed packages\n" \ |
| | 2062 | + " -C Configure an unpackaged package\n" \ |
| | 2063 | + " -F depends Ignore dependency problems\n" \ |
| | 2064 | + " -P Purge all files of a package\n" \ |
| | 2065 | + " -r Remove all but the configuration files for a package\n" \ |
| | 2066 | + " -u Unpack a package, but don't configure it" |
| | 2067 | + |
| | 2068 | +#define dpkg_deb_trivial_usage \ |
| | 2069 | + "[-cefxX] FILE [argument]" |
| | 2070 | +#define dpkg_deb_full_usage \ |
| | 2071 | + "Perform actions on Debian packages (.debs)" \ |
| | 2072 | + "\n\nOptions:\n" \ |
| | 2073 | + " -c List contents of filesystem tree\n" \ |
| | 2074 | + " -e Extract control files to [argument] directory\n" \ |
| | 2075 | + " -f Display control field name starting with [argument]\n" \ |
| | 2076 | + " -x Extract packages filesystem tree to directory\n" \ |
| | 2077 | + " -X Verbose extract" |
| | 2078 | +#define dpkg_deb_example_usage \ |
| | 2079 | + "$ dpkg-deb -X ./busybox_0.48-1_i386.deb /tmp\n" |
| | 2080 | + |
| | 2081 | +#define du_trivial_usage \ |
| | 2082 | + "[-aHLdclsx" USE_FEATURE_HUMAN_READABLE("hm") "k] [FILE]..." |
| | 2083 | +#define du_full_usage \ |
| | 2084 | + "Summarize disk space used for each FILE and/or directory.\n" \ |
| | 2085 | + "Disk space is printed in units of " \ |
| | 2086 | + USE_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("1024") \ |
| | 2087 | + SKIP_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("512") \ |
| | 2088 | + " bytes." \ |
| | 2089 | + "\n\nOptions:\n" \ |
| | 2090 | + " -a Show sizes of files in addition to directories\n" \ |
| | 2091 | + " -H Follow symlinks that are FILE command line args\n" \ |
| | 2092 | + " -L Follow all symlinks encountered\n" \ |
| | 2093 | + " -d N Limit output to directories (and files with -a) of depth < N\n" \ |
| | 2094 | + " -c Output a grand total\n" \ |
| | 2095 | + " -l Count sizes many times if hard linked\n" \ |
| | 2096 | + " -s Display only a total for each argument\n" \ |
| | 2097 | + " -x Skip directories on different filesystems\n" \ |
| | 2098 | + USE_FEATURE_HUMAN_READABLE( \ |
| | 2099 | + " -h Print sizes in human readable format (e.g., 1K 243M 2G )\n" \ |
| | 2100 | + " -m Print sizes in megabytes\n" \ |
| | 2101 | + ) \ |
| | 2102 | + " -k Print sizes in kilobytes" \ |
| | 2103 | + USE_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("(default)") |
| | 2104 | +#define du_example_usage \ |
| | 2105 | + "$ du\n" \ |
| | 2106 | + "16 ./CVS\n" \ |
| | 2107 | + "12 ./kernel-patches/CVS\n" \ |
| | 2108 | + "80 ./kernel-patches\n" \ |
| | 2109 | + "12 ./tests/CVS\n" \ |
| | 2110 | + "36 ./tests\n" \ |
| | 2111 | + "12 ./scripts/CVS\n" \ |
| | 2112 | + "16 ./scripts\n" \ |
| | 2113 | + "12 ./docs/CVS\n" \ |
| | 2114 | + "104 ./docs\n" \ |
| | 2115 | + "2417 .\n" |
| | 2116 | + |
| | 2117 | +#define dumpkmap_trivial_usage \ |
| | 2118 | + "> keymap" |
| | 2119 | +#define dumpkmap_full_usage \ |
| | 2120 | + "Print out a binary keyboard translation table to standard output" |
| | 2121 | +#define dumpkmap_example_usage \ |
| | 2122 | + "$ dumpkmap > keymap\n" |
| | 2123 | + |
| | 2124 | +#define dumpleases_trivial_usage \ |
| | 2125 | + "[-r|-a] [-f LEASEFILE]" |
| | 2126 | +#define dumpleases_full_usage \ |
| | 2127 | + "Display DHCP leases granted by udhcpd" \ |
| | 2128 | + "\n\nOptions:\n" \ |
| | 2129 | + " -f, --file=FILENAME Leases file to load\n" \ |
| | 2130 | + " -r, --remaining Interpret lease times as time remaining\n" \ |
| | 2131 | + " -a, --absolute Interpret lease times as expire time" |
| | 2132 | + |
| | 2133 | +#define e2fsck_trivial_usage \ |
| | 2134 | + "[-panyrcdfvstDFSV] [-b superblock] [-B blocksize] " \ |
| | 2135 | + "[-I inode_buffer_blocks] [-P process_inode_size] " \ |
| | 2136 | + "[-l|-L bad_blocks_file] [-C fd] [-j external_journal] " \ |
| | 2137 | + "[-E extended-options] device" |
| | 2138 | +#define e2fsck_full_usage \ |
| | 2139 | + "Check ext2/ext3 file system" \ |
| | 2140 | + "\n\nOptions:\n" \ |
| | 2141 | + " -p Automatic repair (no questions)\n" \ |
| | 2142 | + " -n Make no changes to the filesystem\n" \ |
| | 2143 | + " -y Assume 'yes' to all questions\n" \ |
| | 2144 | + " -c Check for bad blocks and add them to the badblock list\n" \ |
| | 2145 | + " -f Force checking even if filesystem is marked clean\n" \ |
| | 2146 | + " -v Be verbose\n" \ |
| | 2147 | + " -b superblock Use alternative superblock\n" \ |
| | 2148 | + " -B blocksize Force blocksize when looking for superblock\n" \ |
| | 2149 | + " -j journal Set location of the external journal\n" \ |
| | 2150 | + " -l file Add to badblocks list\n" \ |
| | 2151 | + " -L file Set badblocks list" |
| | 2152 | + |
| | 2153 | +#define echo_trivial_usage \ |
| | 2154 | + USE_FEATURE_FANCY_ECHO("[-neE] ") "[ARG ...]" |
| | 2155 | +#define echo_full_usage \ |
| | 2156 | + "Print the specified ARGs to stdout" \ |
| | 2157 | + USE_FEATURE_FANCY_ECHO( \ |
| | 2158 | + "\n\nOptions:\n" \ |
| | 2159 | + " -n Suppress trailing newline\n" \ |
| | 2160 | + " -e Interpret backslash-escaped characters (i.e., \\t=tab)\n" \ |
| | 2161 | + " -E Disable interpretation of backslash-escaped characters" \ |
| | 2162 | + ) |
| | 2163 | +#define echo_example_usage \ |
| | 2164 | + "$ echo \"Erik is cool\"\n" \ |
| | 2165 | + "Erik is cool\n" \ |
| | 2166 | + USE_FEATURE_FANCY_ECHO("$ echo -e \"Erik\\nis\\ncool\"\n" \ |
| | 2167 | + "Erik\n" \ |
| | 2168 | + "is\n" \ |
| | 2169 | + "cool\n" \ |
| | 2170 | + "$ echo \"Erik\\nis\\ncool\"\n" \ |
| | 2171 | + "Erik\\nis\\ncool\n") |
| | 2172 | + |
| | 2173 | +#define eject_trivial_usage \ |
| | 2174 | + "[-t] [-T] [DEVICE]" |
| | 2175 | +#define eject_full_usage \ |
| | 2176 | + "Eject specified DEVICE (or default /dev/cdrom)" \ |
| | 2177 | + "\n\nOptions:\n" \ |
| | 2178 | + " -t Close tray\n" \ |
| | 2179 | + " -T Open/close tray (toggle)" |
| | 2180 | + |
| | 2181 | +#define ed_trivial_usage "" |
| | 2182 | +#define ed_full_usage "" |
| | 2183 | + |
| | 2184 | +#define env_trivial_usage \ |
| | 2185 | + "[-iu] [-] [name=value]... [command]" |
| | 2186 | +#define env_full_usage \ |
| | 2187 | + "Print the current environment or run a program after setting\n" \ |
| | 2188 | + "up the specified environment" \ |
| | 2189 | + "\n\nOptions:\n" \ |
| | 2190 | + " -, -i Start with an empty environment\n" \ |
| | 2191 | + " -u Remove variable from the environment" |
| | 2192 | + |
| | 2193 | +#define ether_wake_trivial_usage \ |
| | 2194 | + "[-b] [-i iface] [-p aa:bb:cc:dd[:ee:ff]] MAC" |
| | 2195 | +#define ether_wake_full_usage \ |
| | 2196 | + "Send a magic packet to wake up sleeping machines.\n" \ |
| | 2197 | + "MAC must be a station address (00:11:22:33:44:55) or\n" \ |
| | 2198 | + "a hostname with a known 'ethers' entry." \ |
| | 2199 | + "\n\nOptions:\n" \ |
| | 2200 | + " -b Send wake-up packet to the broadcast address\n" \ |
| | 2201 | + " -i iface Use interface ifname instead of the default \"eth0\"\n" \ |
| | 2202 | + " -p pass Append the four or six byte password PW to the packet" |
| | 2203 | + |
| | 2204 | +#define expr_trivial_usage \ |
| | 2205 | + "EXPRESSION" |
| | 2206 | +#define expr_full_usage \ |
| | 2207 | + "Print the value of EXPRESSION to standard output.\n\n" \ |
| | 2208 | + "EXPRESSION may be:\n" \ |
| | 2209 | + " ARG1 | ARG2 ARG1 if it is neither null nor 0, otherwise ARG2\n" \ |
| | 2210 | + " ARG1 & ARG2 ARG1 if neither argument is null or 0, otherwise 0\n" \ |
| | 2211 | + " ARG1 < ARG2 ARG1 is less than ARG2\n" \ |
| | 2212 | + " ARG1 <= ARG2 ARG1 is less than or equal to ARG2\n" \ |
| | 2213 | + " ARG1 = ARG2 ARG1 is equal to ARG2\n" \ |
| | 2214 | + " ARG1 != ARG2 ARG1 is unequal to ARG2\n" \ |
| | 2215 | + " ARG1 >= ARG2 ARG1 is greater than or equal to ARG2\n" \ |
| | 2216 | + " ARG1 > ARG2 ARG1 is greater than ARG2\n" \ |
| | 2217 | + " ARG1 + ARG2 Sum of ARG1 and ARG2\n" \ |
| | 2218 | + " ARG1 - ARG2 Difference of ARG1 and ARG2\n" \ |
| | 2219 | + " ARG1 * ARG2 Product of ARG1 and ARG2\n" \ |
| | 2220 | + " ARG1 / ARG2 Quotient of ARG1 divided by ARG2\n" \ |
| | 2221 | + " ARG1 % ARG2 Remainder of ARG1 divided by ARG2\n" \ |
| | 2222 | + " STRING : REGEXP Anchored pattern match of REGEXP in STRING\n" \ |
| | 2223 | + " match STRING REGEXP Same as STRING : REGEXP\n" \ |
| | 2224 | + " substr STRING POS LENGTH Substring of STRING, POS counted from 1\n" \ |
| | 2225 | + " index STRING CHARS Index in STRING where any CHARS is found, or 0\n" \ |
| | 2226 | + " length STRING Length of STRING\n" \ |
| | 2227 | + " quote TOKEN Interpret TOKEN as a string, even if\n" \ |
| | 2228 | + " it is a keyword like 'match' or an\n" \ |
| | 2229 | + " operator like '/'\n" \ |
| | 2230 | + " (EXPRESSION) Value of EXPRESSION\n\n" \ |
| | 2231 | + "Beware that many operators need to be escaped or quoted for shells.\n" \ |
| | 2232 | + "Comparisons are arithmetic if both ARGs are numbers, else\n" \ |
| | 2233 | + "lexicographical. Pattern matches return the string matched between\n" \ |
| | 2234 | + "\\( and \\) or null; if \\( and \\) are not used, they return the number\n" \ |
| | 2235 | + "of characters matched or 0." |
| | 2236 | + |
| | 2237 | +#define fakeidentd_trivial_usage \ |
| | 2238 | + "[-fiw] [-b ADDR] [STRING]" |
| | 2239 | +#define fakeidentd_full_usage \ |
| | 2240 | + "Provide fake ident (auth) service" \ |
| | 2241 | + "\n\nOptions:" \ |
| | 2242 | + "\n -f Run in foreground" \ |
| | 2243 | + "\n -i Inetd mode" \ |
| | 2244 | + "\n -w Inetd 'wait' mode" \ |
| | 2245 | + "\n -b ADDR Bind to specified address" \ |
| | 2246 | + "\n STRING Ident answer string (default is 'nobody')" |
| | 2247 | + |
| | 2248 | +#define false_trivial_usage \ |
| | 2249 | + "" |
| | 2250 | +#define false_full_usage \ |
| | 2251 | + "Return an exit code of FALSE (1)" |
| | 2252 | +#define false_example_usage \ |
| | 2253 | + "$ false\n" \ |
| | 2254 | + "$ echo $?\n" \ |
| | 2255 | + "1\n" |
| | 2256 | + |
| | 2257 | +#define fbset_trivial_usage \ |
| | 2258 | + "[options] [mode]" |
| | 2259 | +#define fbset_full_usage \ |
| | 2260 | + "Show and modify frame buffer settings" |
| | 2261 | +#define fbset_example_usage \ |
| | 2262 | + "$ fbset\n" \ |
| | 2263 | + "mode \"1024x768-76\"\n" \ |
| | 2264 | + " # D: 78.653 MHz, H: 59.949 kHz, V: 75.694 Hz\n" \ |
| | 2265 | + " geometry 1024 768 1024 768 16\n" \ |
| | 2266 | + " timings 12714 128 32 16 4 128 4\n" \ |
| | 2267 | + " accel false\n" \ |
| | 2268 | + " rgba 5/11,6/5,5/0,0/0\n" \ |
| | 2269 | + "endmode\n" |
| | 2270 | + |
| | 2271 | +#define fdflush_trivial_usage \ |
| | 2272 | + "DEVICE" |
| | 2273 | +#define fdflush_full_usage \ |
| | 2274 | + "Force floppy disk drive to detect disk change" |
| | 2275 | + |
| | 2276 | +#define fdformat_trivial_usage \ |
| | 2277 | + "[-n] DEVICE" |
| | 2278 | +#define fdformat_full_usage \ |
| | 2279 | + "Format floppy disk" \ |
| | 2280 | + "\n\nOptions:\n" \ |
| | 2281 | + " -n Don't verify after format" |
| | 2282 | + |
| | 2283 | +#define fdisk_trivial_usage \ |
| | 2284 | + "[-luv] [-C CYLINDERS] [-H HEADS] [-S SECTORS] [-b SSZ] DISK" |
| | 2285 | +#define fdisk_full_usage \ |
| | 2286 | + "Change partition table" \ |
| | 2287 | + "\n\nOptions:\n" \ |
| | 2288 | + " -l List partition table(s)\n" \ |
| | 2289 | + " -u Give Start and End in sector (instead of cylinder) units\n" \ |
| | 2290 | + " -s PARTITION Give partition size(s) in blocks\n" \ |
| | 2291 | + " -b 2048 (for certain MO disks) use 2048-byte sectors\n" \ |
| | 2292 | + " -C CYLINDERS Set the number of cylinders\n" \ |
| | 2293 | + " -H HEADS Set the number of heads\n" \ |
| | 2294 | + " -S SECTORS Set the number of sectors\n" \ |
| | 2295 | + " -v Give fdisk version" |
| | 2296 | + |
| | 2297 | +#define find_trivial_usage \ |
| | 2298 | + "[PATH...] [EXPRESSION]" |
| | 2299 | +#define find_full_usage \ |
| | 2300 | + "Search for files in a directory hierarchy. The default PATH is\n" \ |
| | 2301 | + "the current directory; default EXPRESSION is '-print'\n" \ |
| | 2302 | + "\nEXPRESSION may consist of:\n" \ |
| | 2303 | + " -follow Dereference symlinks\n" \ |
| | 2304 | + " -name PATTERN File name (leading directories removed) matches PATTERN\n" \ |
| | 2305 | + " -print Print (default and assumed)" \ |
| | 2306 | + USE_FEATURE_FIND_PRINT0( \ |
| | 2307 | + "\n -print0 Delimit output with null characters rather than" \ |
| | 2308 | + "\n newlines" \ |
| | 2309 | + ) USE_FEATURE_FIND_TYPE( \ |
| | 2310 | + "\n -type X Filetype matches X (where X is one of: f,d,l,b,c,...)" \ |
| | 2311 | + ) USE_FEATURE_FIND_PERM( \ |
| | 2312 | + "\n -perm PERMS Permissions match any of (+NNN); all of (-NNN);" \ |
| | 2313 | + "\n or exactly (NNN)" \ |
| | 2314 | + ) USE_FEATURE_FIND_MTIME( \ |
| | 2315 | + "\n -mtime DAYS Modified time is greater than (+N); less than (-N);" \ |
| | 2316 | + "\n Or exactly (N) days" \ |
| | 2317 | + ) USE_FEATURE_FIND_MMIN( \ |
| | 2318 | + "\n -mmin MINS Modified time is greater than (+N); less than (-N);" \ |
| | 2319 | + "\n or exactly (N) minutes" \ |
| | 2320 | + ) USE_FEATURE_FIND_NEWER( \ |
| | 2321 | + "\n -newer FILE Modified time is more recent than FILE's" \ |
| | 2322 | + ) USE_FEATURE_FIND_INUM( \ |
| | 2323 | + "\n -inum N File has inode number N" \ |
| | 2324 | + ) USE_FEATURE_FIND_EXEC( \ |
| | 2325 | + "\n -exec CMD Execute CMD with all instances of {} replaced by the" \ |
| | 2326 | + "\n files matching EXPRESSION" \ |
| | 2327 | + ) USE_DESKTOP( \ |
| | 2328 | + "\n -size N File size is N" \ |
| | 2329 | + "\n -prune Stop traversing current subtree" \ |
| | 2330 | + "\n (expr) Group" \ |
| | 2331 | + ) |
| | 2332 | + |
| | 2333 | +#define find_example_usage \ |
| | 2334 | + "$ find / -name passwd\n" \ |
| | 2335 | + "/etc/passwd\n" |
| | 2336 | + |
| | 2337 | +#define fold_trivial_usage \ |
| | 2338 | + "[-bs] [-w WIDTH] [FILE]" |
| | 2339 | +#define fold_full_usage \ |
| | 2340 | + "Wrap input lines in each FILE (standard input by default), writing to\n" \ |
| | 2341 | + "standard output" \ |
| | 2342 | + "\n\nOptions:\n" \ |
| | 2343 | + " -b Count bytes rather than columns\n" \ |
| | 2344 | + " -s Break at spaces\n" \ |
| | 2345 | + " -w Use WIDTH columns instead of 80" |
| | 2346 | + |
| | 2347 | +#define free_trivial_usage \ |
| | 2348 | + "" |
| | 2349 | +#define free_full_usage \ |
| | 2350 | + "Display the amount of free and used system memory" |
| | 2351 | +#define free_example_usage \ |
| | 2352 | + "$ free\n" \ |
| | 2353 | + " total used free shared buffers\n" \ |
| | 2354 | + " Mem: 257628 248724 8904 59644 93124\n" \ |
| | 2355 | + " Swap: 128516 8404 120112\n" \ |
| | 2356 | + "Total: 386144 257128 129016\n" \ |
| | 2357 | + |
| | 2358 | +#define freeramdisk_trivial_usage \ |
| | 2359 | + "DEVICE" |
| | 2360 | +#define freeramdisk_full_usage \ |
| | 2361 | + "Free all memory used by the specified ramdisk" |
| | 2362 | +#define freeramdisk_example_usage \ |
| | 2363 | + "$ freeramdisk /dev/ram2\n" |
| | 2364 | + |
| | 2365 | +#define fsck_trivial_usage \ |
| | 2366 | + "[-ANPRTV] [ -C fd ] [-t fstype] [fs-options] [filesys ...]" |
| | 2367 | +#define fsck_full_usage \ |
| | 2368 | + "Check and repair filesystems" \ |
| | 2369 | + "\n\nOptions:\n" \ |
| | 2370 | + " -A Walk /etc/fstab and check all filesystems\n" \ |
| | 2371 | + " -N Don't execute, just show what would be done\n" \ |
| | 2372 | + " -P When using -A, check filesystems in parallel\n" \ |
| | 2373 | + " -R When using -A, skip the root filesystem\n" \ |
| | 2374 | + " -T Don't show title on startup\n" \ |
| | 2375 | + " -V Verbose\n" \ |
| | 2376 | + " -C n Write status information to specified filedescriptor\n" \ |
| | 2377 | + " -t type List of filesystem types to check" |
| | 2378 | + |
| | 2379 | +#define fsck_minix_trivial_usage \ |
| | 2380 | + "[-larvsmf] /dev/name" |
| | 2381 | +#define fsck_minix_full_usage \ |
| | 2382 | + "Perform a consistency check for MINIX filesystems" \ |
| | 2383 | + "\n\nOptions:\n" \ |
| | 2384 | + " -l Lists all filenames\n" \ |
| | 2385 | + " -r Perform interactive repairs\n" \ |
| | 2386 | + " -a Perform automatic repairs\n" \ |
| | 2387 | + " -v Verbose\n" \ |
| | 2388 | + " -s Outputs super-block information\n" \ |
| | 2389 | + " -m Activates MINIX-like \"mode not cleared\" warnings\n" \ |
| | 2390 | + " -f Force file system check" |
| | 2391 | + |
| | 2392 | +#define ftpget_trivial_usage \ |
| | 2393 | + "[options] remote-host local-file remote-file" |
| | 2394 | +#define ftpget_full_usage \ |
| | 2395 | + "Retrieve a remote file via FTP" \ |
| | 2396 | + "\n\nOptions:\n" \ |
| | 2397 | + " -c, --continue Continue a previous transfer\n" \ |
| | 2398 | + " -v, --verbose Verbose\n" \ |
| | 2399 | + " -u, --username Username to be used\n" \ |
| | 2400 | + " -p, --password Password to be used\n" \ |
| | 2401 | + " -P, --port Port number to be used" |
| | 2402 | + |
| | 2403 | +#define ftpput_trivial_usage \ |
| | 2404 | + "[options] remote-host remote-file local-file" |
| | 2405 | +#define ftpput_full_usage \ |
| | 2406 | + "Store a local file on a remote machine via FTP" \ |
| | 2407 | + "\n\nOptions:\n" \ |
| | 2408 | + " -v, --verbose Verbose\n" \ |
| | 2409 | + " -u, --username Username to be used\n" \ |
| | 2410 | + " -p, --password Password to be used\n" \ |
| | 2411 | + " -P, --port Port number to be used" |
| | 2412 | + |
| | 2413 | +#define fuser_trivial_usage \ |
| | 2414 | + "[options] file OR port/proto" |
| | 2415 | +#define fuser_full_usage \ |
| | 2416 | + "Options:\n" \ |
| | 2417 | + " -m Show all processes on the same mounted fs\n" \ |
| | 2418 | + " -k Kill all processes that match\n" \ |
| | 2419 | + " -s Don't print or kill anything\n" \ |
| | 2420 | + " -4 When using port/proto only search IPv4 space\n" \ |
| | 2421 | + " -6 When using port/proto only search IPv6 space\n" \ |
| | 2422 | + " -SIGNAL When used with -k, this signal will be used to kill" |
| | 2423 | + |
| | 2424 | +#define getenforce_trivial_usage |
| | 2425 | +#define getenforce_full_usage |
| | 2426 | + |
| | 2427 | +#define getopt_trivial_usage \ |
| | 2428 | + "[OPTIONS]..." |
| | 2429 | +#define getopt_full_usage \ |
| | 2430 | + "Parse command options\n" \ |
| | 2431 | + " -a, --alternative Allow long options starting with single -\n" \ |
| | 2432 | + " -l, --longoptions=longopts Long options to be recognized\n" \ |
| | 2433 | + " -n, --name=progname The name under which errors are reported\n" \ |
| | 2434 | + " -o, --options=optstring Short options to be recognized\n" \ |
| | 2435 | + " -q, --quiet Disable error reporting by getopt(3)\n" \ |
| | 2436 | + " -Q, --quiet-output No normal output\n" \ |
| | 2437 | + " -s, --shell=shell Set shell quoting conventions\n" \ |
| | 2438 | + " -T, --test Test for getopt(1) version\n" \ |
| | 2439 | + " -u, --unquoted Do not quote the output" |
| | 2440 | +#define getopt_example_usage \ |
| | 2441 | + "$ cat getopt.test\n" \ |
| | 2442 | + "#!/bin/sh\n" \ |
| | 2443 | + "GETOPT=`getopt -o ab:c:: --long a-long,b-long:,c-long:: \\\n" \ |
| | 2444 | + " -n 'example.busybox' -- \"$@\"`\n" \ |
| | 2445 | + "if [ $? != 0 ] ; then exit 1 ; fi\n" \ |
| | 2446 | + "eval set -- \"$GETOPT\"\n" \ |
| | 2447 | + "while true ; do\n" \ |
| | 2448 | + " case $1 in\n" \ |
| | 2449 | + " -a|--a-long) echo \"Option a\" ; shift ;;\n" \ |
| | 2450 | + " -b|--b-long) echo \"Option b, argument '$2'\" ; shift 2 ;;\n" \ |
| | 2451 | + " -c|--c-long)\n" \ |
| | 2452 | + " case \"$2\" in\n" \ |
| | 2453 | + " \"\") echo \"Option c, no argument\"; shift 2 ;;\n" \ |
| | 2454 | + " *) echo \"Option c, argument '$2'\" ; shift 2 ;;\n" \ |
| | 2455 | + " esac ;;\n" \ |
| | 2456 | + " --) shift ; break ;;\n" \ |
| | 2457 | + " *) echo \"Internal error!\" ; exit 1 ;;\n" \ |
| | 2458 | + " esac\n" \ |
| | 2459 | + "done\n" |
| | 2460 | + |
| | 2461 | +#define getsebool_trivial_usage \ |
| | 2462 | + "-a or getsebool boolean..." |
| | 2463 | +#define getsebool_full_usage \ |
| | 2464 | + " -a Show all SELinux booleans" |
| | 2465 | + |
| | 2466 | +#define getty_trivial_usage \ |
| | 2467 | + "[OPTIONS]... baud_rate,... line [termtype]" |
| | 2468 | +#define getty_full_usage \ |
| | 2469 | + "Open a tty, prompt for a login name, then invoke /bin/login" \ |
| | 2470 | + "\n\nOptions:\n" \ |
| | 2471 | + " -h Enable hardware (RTS/CTS) flow control\n" \ |
| | 2472 | + " -i Do not display /etc/issue before running login\n" \ |
| | 2473 | + " -L Local line, so do not do carrier detect\n" \ |
| | 2474 | + " -m Get baud rate from modem's CONNECT status message\n" \ |
| | 2475 | + " -w Wait for a CR or LF before sending /etc/issue\n" \ |
| | 2476 | + " -n Do not prompt the user for a login name\n" \ |
| | 2477 | + " -f issue_file Display issue_file instead of /etc/issue\n" \ |
| | 2478 | + " -l login_app Invoke login_app instead of /bin/login\n" \ |
| | 2479 | + " -t timeout Terminate after timeout if no username is read\n" \ |
| | 2480 | + " -I initstring Sets the init string to send before anything else\n" \ |
| | 2481 | + " -H login_host Log login_host into the utmp file as the hostname" |
| | 2482 | + |
| | 2483 | +#define grep_trivial_usage \ |
| | 2484 | + "[-HhrilLnqvso" \ |
| | 2485 | + USE_DESKTOP("w") \ |
| | 2486 | + "eF" \ |
| | 2487 | + USE_FEATURE_GREP_EGREP_ALIAS("E") \ |
| | 2488 | + USE_FEATURE_GREP_CONTEXT("ABC") \ |
| | 2489 | + "] PATTERN [FILEs...]" |
| | 2490 | +#define grep_full_usage \ |
| | 2491 | + "Search for PATTERN in each FILE or standard input" \ |
| | 2492 | + "\n\nOptions:" \ |
| | 2493 | + "\n -H Prefix output lines with filename where match was found" \ |
| | 2494 | + "\n -h Suppress the prefixing filename on output" \ |
| | 2495 | + "\n -r Recurse subdirectories" \ |
| | 2496 | + "\n -i Ignore case distinctions" \ |
| | 2497 | + "\n -l List names of files that match" \ |
| | 2498 | + "\n -L List names of files that do not match" \ |
| | 2499 | + "\n -n Print line number with output lines" \ |
| | 2500 | + "\n -q Be quiet. Returns 0 if PATTERN was found, 1 otherwise" \ |
| | 2501 | + "\n -v Select non-matching lines" \ |
| | 2502 | + "\n -s Suppress file open/read error messages" \ |
| | 2503 | + "\n -c Only print count of matching lines" \ |
| | 2504 | + "\n -f Read PATTERN from file" \ |
| | 2505 | + "\n -o Show only the part of a line that matches PATTERN" \ |
| | 2506 | + USE_DESKTOP( \ |
| | 2507 | + "\n -w Match whole words only") \ |
| | 2508 | + "\n -e PATTERN is a regular expression" \ |
| | 2509 | + "\n -F PATTERN is a set of newline-separated strings" \ |
| | 2510 | + USE_FEATURE_GREP_EGREP_ALIAS( \ |
| | 2511 | + "\n -E PATTERN is an extended regular expression") \ |
| | 2512 | + USE_FEATURE_GREP_CONTEXT( \ |
| | 2513 | + "\n -A Print NUM lines of trailing context" \ |
| | 2514 | + "\n -B Print NUM lines of leading context" \ |
| | 2515 | + "\n -C Print NUM lines of output context") \ |
| | 2516 | + |
| | 2517 | +#define grep_example_usage \ |
| | 2518 | + "$ grep root /etc/passwd\n" \ |
| | 2519 | + "root:x:0:0:root:/root:/bin/bash\n" \ |
| | 2520 | + "$ grep ^[rR]oo. /etc/passwd\n" \ |
| | 2521 | + "root:x:0:0:root:/root:/bin/bash\n" |
| | 2522 | + |
| | 2523 | +#define gunzip_trivial_usage \ |
| | 2524 | + "[OPTION]... FILE" |
| | 2525 | +#define gunzip_full_usage \ |
| | 2526 | + "Uncompress FILE (or standard input if FILE is '-')" \ |
| | 2527 | + "\n\nOptions:\n" \ |
| | 2528 | + " -c Write output to standard output\n" \ |
| | 2529 | + " -f Force read when source is a terminal\n" \ |
| | 2530 | + " -t Test compressed file integrity" |
| | 2531 | +#define gunzip_example_usage \ |
| | 2532 | + "$ ls -la /tmp/BusyBox*\n" \ |
| | 2533 | + "-rw-rw-r-- 1 andersen andersen 557009 Apr 11 10:55 /tmp/BusyBox-0.43.tar.gz\n" \ |
| | 2534 | + "$ gunzip /tmp/BusyBox-0.43.tar.gz\n" \ |
| | 2535 | + "$ ls -la /tmp/BusyBox*\n" \ |
| | 2536 | + "-rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar\n" |
| | 2537 | + |
| | 2538 | +#define gzip_trivial_usage \ |
| | 2539 | + "[OPTION]... [FILE]..." |
| | 2540 | +#define gzip_full_usage \ |
| | 2541 | + "Compress FILE(s) with maximum compression.\n" \ |
| | 2542 | + "When FILE is '-' or unspecified, reads standard input. Implies -c." \ |
| | 2543 | + "\n\nOptions:\n" \ |
| | 2544 | + " -c Write output to standard output instead of FILE.gz\n" \ |
| | 2545 | + " -d Decompress\n" \ |
| | 2546 | + " -f Force write when destination is a terminal" |
| | 2547 | +#define gzip_example_usage \ |
| | 2548 | + "$ ls -la /tmp/busybox*\n" \ |
| | 2549 | + "-rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/busybox.tar\n" \ |
| | 2550 | + "$ gzip /tmp/busybox.tar\n" \ |
| | 2551 | + "$ ls -la /tmp/busybox*\n" \ |
| | 2552 | + "-rw-rw-r-- 1 andersen andersen 554058 Apr 14 17:49 /tmp/busybox.tar.gz\n" |
| | 2553 | + |
| | 2554 | +#define halt_trivial_usage \ |
| | 2555 | + "[-d<delay>] [-n<nosync>] [-f<force>]" |
| | 2556 | +#define halt_full_usage \ |
| | 2557 | + "Halt the system" \ |
| | 2558 | + "\n\nOptions:\n" \ |
| | 2559 | + " -d Delay interval for halting\n" \ |
| | 2560 | + " -n No call to sync()\n" \ |
| | 2561 | + " -f Force halt (don't go through init)" |
| | 2562 | + |
| | 2563 | +#define hdparm_trivial_usage \ |
| | 2564 | + "[options] [device] .." |
| | 2565 | +#define hdparm_full_usage \ |
| | 2566 | + USE_FEATURE_HDPARM_GET_IDENTITY( \ |
| | 2567 | + "If no device name is specified try to read from stdin.\n\n") \ |
| | 2568 | + "Options:\n" \ |
| | 2569 | + " -a Get/set fs readahead\n" \ |
| | 2570 | + " -A Set drive read-lookahead flag (0/1)\n" \ |
| | 2571 | + " -b Get/set bus state (0 == off, 1 == on, 2 == tristate)\n" \ |
| | 2572 | + " -B Set Advanced Power Management setting (1-255)\n" \ |
| | 2573 | + " -c Get/set IDE 32-bit IO setting\n" \ |
| | 2574 | + " -C Check IDE power mode status\n" \ |
| | 2575 | + USE_FEATURE_HDPARM_HDIO_GETSET_DMA( \ |
| | 2576 | + " -d Get/set using_dma flag\n") \ |
| | 2577 | + " -D Enable/disable drive defect-mgmt\n" \ |
| | 2578 | + " -f Flush buffer cache for device on exit\n" \ |
| | 2579 | + " -g Display drive geometry\n" \ |
| | 2580 | + " -h Display terse usage information\n" \ |
| | 2581 | + USE_FEATURE_HDPARM_GET_IDENTITY( \ |
| | 2582 | + " -i Display drive identification\n") \ |
| | 2583 | + USE_FEATURE_HDPARM_GET_IDENTITY( \ |
| | 2584 | + " -I Detailed/current information directly from drive\n") \ |
| | 2585 | + " -k Get/set keep_settings_over_reset flag (0/1)\n" \ |
| | 2586 | + " -K Set drive keep_features_over_reset flag (0/1)\n" \ |
| | 2587 | + " -L Set drive doorlock (0/1) (removable harddisks only)\n" \ |
| | 2588 | + " -m Get/set multiple sector count\n" \ |
| | 2589 | + " -n Get/set ignore-write-errors flag (0/1)\n" \ |
| | 2590 | + " -p Set PIO mode on IDE interface chipset (0,1,2,3,4,...)\n" \ |
| | 2591 | + " -P Set drive prefetch count\n" \ |
| | 2592 | + " -q Change next setting quietly\n" \ |
| | 2593 | + " -Q Get/set DMA tagged-queuing depth (if supported)\n" \ |
| | 2594 | + " -r Get/set readonly flag (DANGEROUS to set)\n" \ |
| | 2595 | + USE_FEATURE_HDPARM_HDIO_SCAN_HWIF( \ |
| | 2596 | + " -R Register an IDE interface (DANGEROUS)\n") \ |
| | 2597 | + " -S Set standby (spindown) timeout\n" \ |
| | 2598 | + " -t Perform device read timings\n" \ |
| | 2599 | + " -T Perform cache read timings\n" \ |
| | 2600 | + " -u Get/set unmaskirq flag (0/1)\n" \ |
| | 2601 | + USE_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF( \ |
| | 2602 | + " -U Un-register an IDE interface (DANGEROUS)\n") \ |
| | 2603 | + " -v Defaults; same as -mcudkrag for IDE drives\n" \ |
| | 2604 | + " -V Display program version and exit immediately\n" \ |
| | 2605 | + USE_FEATURE_HDPARM_HDIO_DRIVE_RESET( \ |
| | 2606 | + " -w Perform device reset (DANGEROUS)\n") \ |
| | 2607 | + " -W Set drive write-caching flag (0/1) (DANGEROUS)\n" \ |
| | 2608 | + USE_FEATURE_HDPARM_HDIO_TRISTATE_HWIF( \ |
| | 2609 | + " -x Tristate device for hotswap (0/1) (DANGEROUS)\n") \ |
| | 2610 | + " -X Set IDE xfer mode (DANGEROUS)\n" \ |
| | 2611 | + " -y Put IDE drive in standby mode\n" \ |
| | 2612 | + " -Y Put IDE drive to sleep\n" \ |
| | 2613 | + " -Z Disable Seagate auto-powersaving mode\n" \ |
| | 2614 | + " -z Re-read partition table" |
| | 2615 | + |
| | 2616 | +#define head_trivial_usage \ |
| | 2617 | + "[OPTION]... [FILE]..." |
| | 2618 | +#define head_full_usage \ |
| | 2619 | + "Print first 10 lines of each FILE to standard output.\n" \ |
| | 2620 | + "With more than one FILE, precede each with a header giving the\n" \ |
| | 2621 | + "file name. With no FILE, or when FILE is -, read standard input." \ |
| | 2622 | + "\n\nOptions:" \ |
| | 2623 | + "\n -n NUM Print first NUM lines instead of first 10" \ |
| | 2624 | + USE_FEATURE_FANCY_HEAD( \ |
| | 2625 | + "\n -c NUM Output the first NUM bytes" \ |
| | 2626 | + "\n -q Never output headers giving file names" \ |
| | 2627 | + "\n -v Always output headers giving file names") |
| | 2628 | +#define head_example_usage \ |
| | 2629 | + "$ head -n 2 /etc/passwd\n" \ |
| | 2630 | + "root:x:0:0:root:/root:/bin/bash\n" \ |
| | 2631 | + "daemon:x:1:1:daemon:/usr/sbin:/bin/sh\n" |
| | 2632 | + |
| | 2633 | +#define hexdump_trivial_usage \ |
| | 2634 | + "[-[bcCdefnosvx]] [OPTION] FILE" |
| | 2635 | +#define hexdump_full_usage \ |
| | 2636 | + "Display file(s) or standard input in a user specified format" \ |
| | 2637 | + "\n\nOptions:\n" \ |
| | 2638 | + " -b One-byte octal display\n" \ |
| | 2639 | + " -c One-byte character display\n" \ |
| | 2640 | + " -C Canonical hex+ASCII, 16 bytes per line\n" \ |
| | 2641 | + " -d Two-byte decimal display\n" \ |
| | 2642 | + " -e FORMAT STRING\n" \ |
| | 2643 | + " -f FORMAT FILE\n" \ |
| | 2644 | + " -n LENGTH Interpret only length bytes of input\n" \ |
| | 2645 | + " -o Two-byte octal display\n" \ |
| | 2646 | + " -s OFFSET Skip offset bytes\n" \ |
| | 2647 | + " -v Display all input data\n" \ |
| | 2648 | + " -x Two-byte hexadecimal display" |
| | 2649 | + |
| | 2650 | +#define hostid_trivial_usage \ |
| | 2651 | + "" |
| | 2652 | +#define hostid_full_usage \ |
| | 2653 | + "Print out a unique 32-bit identifier for the machine" |
| | 2654 | + |
| | 2655 | +#define hostname_trivial_usage \ |
| | 2656 | + "[OPTION] {hostname | -F FILE}" |
| | 2657 | +#define hostname_full_usage \ |
| | 2658 | + "Get or set the hostname or DNS domain name. If a hostname is given\n" \ |
| | 2659 | + "(or FILE with the -F parameter), the host name will be set." \ |
| | 2660 | + "\n\nOptions:\n" \ |
| | 2661 | + " -s Short\n" \ |
| | 2662 | + " -i Addresses for the hostname\n" \ |
| | 2663 | + " -d DNS domain name\n" \ |
| | 2664 | + " -f Fully qualified domain name\n" \ |
| | 2665 | + " -F FILE Use the contents of FILE to specify the hostname" |
| | 2666 | +#define hostname_example_usage \ |
| | 2667 | + "$ hostname\n" \ |
| | 2668 | + "sage\n" |
| | 2669 | + |
| | 2670 | +#define httpd_trivial_usage \ |
| | 2671 | + "[-c <conf file>]" \ |
| | 2672 | + " [-p <port>]" \ |
| | 2673 | + " [-i] [-f]" \ |
| | 2674 | + USE_FEATURE_HTTPD_SETUID(" [-u user[:grp]]") \ |
| | 2675 | + USE_FEATURE_HTTPD_BASIC_AUTH(" [-r <realm>]") \ |
| | 2676 | + USE_FEATURE_HTTPD_AUTH_MD5(" [-m pass]") \ |
| | 2677 | + " [-h home]" \ |
| | 2678 | + " [-d/-e <string>]" |
| | 2679 | +#define httpd_full_usage \ |
| | 2680 | + "Listen for incoming http server requests" \ |
| | 2681 | + "\n\nOptions:\n" \ |
| | 2682 | + " -c FILE Specifies configuration file. (default httpd.conf)\n" \ |
| | 2683 | + " -p PORT Server port (default 80)\n" \ |
| | 2684 | + " -i Assume that we are started from inetd\n" \ |
| | 2685 | + " -f Do not daemonize\n" \ |
| | 2686 | + USE_FEATURE_HTTPD_SETUID( \ |
| | 2687 | + " -u USER[:GRP] Set uid/gid after binding to port\n") \ |
| | 2688 | + USE_FEATURE_HTTPD_BASIC_AUTH( \ |
| | 2689 | + " -r REALM Authentication Realm for Basic Authentication\n") \ |
| | 2690 | + USE_FEATURE_HTTPD_AUTH_MD5( \ |
| | 2691 | + " -m PASS Crypt PASS with md5 algorithm\n") \ |
| | 2692 | + " -h HOME Specifies http HOME directory (default ./)\n" \ |
| | 2693 | + " -e STRING HTML encode STRING\n" \ |
| | 2694 | + " -d STRING URL decode STRING" |
| | 2695 | + |
| | 2696 | +#define hwclock_trivial_usage \ |
| | 2697 | + "[-r|--show] [-s|--hctosys] [-w|--systohc]" \ |
| | 2698 | + " [-l|--localtime] [-u|--utc]" \ |
| | 2699 | + " [-f FILE]" |
| | 2700 | +#define hwclock_full_usage \ |
| | 2701 | + "Query and set a hardware clock (RTC)" \ |
| | 2702 | + "\n\nOptions:\n" \ |
| | 2703 | + " -r Read hardware clock and print result\n" \ |
| | 2704 | + " -s Set the system time from the hardware clock\n" \ |
| | 2705 | + " -w Set the hardware clock to the current system time\n" \ |
| | 2706 | + " -u The hardware clock is kept in coordinated universal time\n" \ |
| | 2707 | + " -l The hardware clock is kept in local time\n" \ |
| | 2708 | + " -f FILE Use the specified clock (e.g. /dev/rtc2)" |
| | 2709 | + |
| | 2710 | +#define id_trivial_usage \ |
| | 2711 | + "[OPTIONS]... [USERNAME]" |
| | 2712 | +#define id_full_usage \ |
| | 2713 | + "Print information for USERNAME or the current user" \ |
| | 2714 | + "\n\nOptions:\n" \ |
| | 2715 | + USE_SELINUX( \ |
| | 2716 | + " -Z prints only the security context\n" \ |
| | 2717 | + ) \ |
| | 2718 | + " -g Prints only the group ID\n" \ |
| | 2719 | + " -u Prints only the user ID\n" \ |
| | 2720 | + " -n Print a name instead of a number\n" \ |
| | 2721 | + " -r Prints the real user ID instead of the effective ID" |
| | 2722 | +#define id_example_usage \ |
| | 2723 | + "$ id\n" \ |
| | 2724 | + "uid=1000(andersen) gid=1000(andersen)\n" |
| | 2725 | + |
| | 2726 | +#define ifconfig_trivial_usage \ |
| | 2727 | + USE_FEATURE_IFCONFIG_STATUS("[-a]") " <interface> [<address>]" |
| | 2728 | +#define ifconfig_full_usage \ |
| | 2729 | + "Configure a network interface" \ |
| | 2730 | + "\n\nOptions:\n" \ |
| | 2731 | + USE_FEATURE_IPV6( \ |
| | 2732 | + " [add <address>[/<prefixlen>]]\n") \ |
| | 2733 | + USE_FEATURE_IPV6( \ |
| | 2734 | + " [del <address>[/<prefixlen>]]\n") \ |
| | 2735 | + " [[-]broadcast [<address>]] [[-]pointopoint [<address>]]\n" \ |
| | 2736 | + " [netmask <address>] [dstaddr <address>]\n" \ |
| | 2737 | + USE_FEATURE_IFCONFIG_SLIP( \ |
| | 2738 | + " [outfill <NN>] [keepalive <NN>]\n") \ |
| | 2739 | + " " USE_FEATURE_IFCONFIG_HW("[hw ether <address>] ") "[metric <NN>] [mtu <NN>]\n" \ |
| | 2740 | + " [[-]trailers] [[-]arp] [[-]allmulti]\n" \ |
| | 2741 | + " [multicast] [[-]promisc] [txqueuelen <NN>] [[-]dynamic]\n" \ |
| | 2742 | + USE_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ( \ |
| | 2743 | + " [mem_start <NN>] [io_addr <NN>] [irq <NN>]\n") \ |
| | 2744 | + " [up|down] ..." |
| | 2745 | + |
| | 2746 | +#define ifup_trivial_usage \ |
| | 2747 | + "<-ahinv> <ifaces...>" |
| | 2748 | +#define ifup_full_usage \ |
| | 2749 | + "Options:\n" \ |
| | 2750 | + " -a De/configure all interfaces automatically\n" \ |
| | 2751 | + " -i FILE Use FILE for interface definitions\n" \ |
| | 2752 | + " -n Print out what would happen, but don't do it\n" \ |
| | 2753 | + " (note that this option doesn't disable mappings)\n" \ |
| | 2754 | + " -v Print out what would happen before doing it\n" \ |
| | 2755 | + " -m Don't run any mappings\n" \ |
| | 2756 | + " -f Force de/configuration" |
| | 2757 | + |
| | 2758 | +#define ifdown_trivial_usage \ |
| | 2759 | + "<-ahinv> <ifaces...>" |
| | 2760 | +#define ifdown_full_usage \ |
| | 2761 | + "Options:\n" \ |
| | 2762 | + " -a De/configure all interfaces automatically\n" \ |
| | 2763 | + " -i FILE Use FILE for interface definitions\n" \ |
| | 2764 | + " -n Print out what would happen, but don't do it\n" \ |
| | 2765 | + " (note that this option doesn't disable mappings)\n" \ |
| | 2766 | + " -v Print out what would happen before doing it\n" \ |
| | 2767 | + " -m Don't run any mappings\n" \ |
| | 2768 | + " -f Force de/configuration" |
| | 2769 | + |
| | 2770 | +#define inetd_trivial_usage \ |
| | 2771 | + "[-f] [-q len] [conf]" |
| | 2772 | +#define inetd_full_usage \ |
| | 2773 | + "Listen for network connections and launch programs" \ |
| | 2774 | + "\n\nOptions:\n" \ |
| | 2775 | + " -f Run in foreground\n" \ |
| | 2776 | + " -q N Set the size of the socket listen queue to N\n" \ |
| | 2777 | + " (default: 128)" |
| | 2778 | + |
| | 2779 | +#define init_trivial_usage \ |
| | 2780 | + "" |
| | 2781 | +#define init_full_usage \ |
| | 2782 | + "Init is the parent of all processes" |
| | 2783 | +#define init_notes_usage \ |
| | 2784 | +"This version of init is designed to be run only by the kernel.\n" \ |
| | 2785 | +"\n" \ |
| | 2786 | +"BusyBox init doesn't support multiple runlevels. The runlevels field of\n" \ |
| | 2787 | +"the /etc/inittab file is completely ignored by BusyBox init. If you want\n" \ |
| | 2788 | +"runlevels, use sysvinit.\n" \ |
| | 2789 | +"\n" \ |
| | 2790 | +"BusyBox init works just fine without an inittab. If no inittab is found,\n" \ |
| | 2791 | +"it has the following default behavior:\n" \ |
| | 2792 | +"\n" \ |
| | 2793 | +" ::sysinit:/etc/init.d/rcS\n" \ |
| | 2794 | +" ::askfirst:/bin/sh\n" \ |
| | 2795 | +" ::ctrlaltdel:/sbin/reboot\n" \ |
| | 2796 | +" ::shutdown:/sbin/swapoff -a\n" \ |
| | 2797 | +" ::shutdown:/bin/umount -a -r\n" \ |
| | 2798 | +" ::restart:/sbin/init\n" \ |
| | 2799 | +"\n" \ |
| | 2800 | +"if it detects that /dev/console is _not_ a serial console, it will also run:\n" \ |
| | 2801 | +"\n" \ |
| | 2802 | +" tty2::askfirst:/bin/sh\n" \ |
| | 2803 | +" tty3::askfirst:/bin/sh\n" \ |
| | 2804 | +" tty4::askfirst:/bin/sh\n" \ |
| | 2805 | +"\n" \ |
| | 2806 | +"If you choose to use an /etc/inittab file, the inittab entry format is as follows:\n" \ |
| | 2807 | +"\n" \ |
| | 2808 | +" <id>:<runlevels>:<action>:<process>\n" \ |
| | 2809 | +"\n" \ |
| | 2810 | +" <id>:\n" \ |
| | 2811 | +"\n" \ |
| | 2812 | +" WARNING: This field has a non-traditional meaning for BusyBox init!\n" \ |
| | 2813 | +" The id field is used by BusyBox init to specify the controlling tty for\n" \ |
| | 2814 | +" the specified process to run on. The contents of this field are\n" \ |
| | 2815 | +" appended to \"/dev/\" and used as-is. There is no need for this field to\n" \ |
| | 2816 | +" be unique, although if it isn't you may have strange results. If this\n" \ |
| | 2817 | +" field is left blank, the controlling tty is set to the console. Also\n" \ |
| | 2818 | +" note that if BusyBox detects that a serial console is in use, then only\n" \ |
| | 2819 | +" entries whose controlling tty is either the serial console or /dev/null\n" \ |
| | 2820 | +" will be run. BusyBox init does nothing with utmp. We don't need no\n" \ |
| | 2821 | +" stinkin' utmp.\n" \ |
| | 2822 | +"\n" \ |
| | 2823 | +" <runlevels>:\n" \ |
| | 2824 | +"\n" \ |
| | 2825 | +" The runlevels field is completely ignored.\n" \ |
| | 2826 | +"\n" \ |
| | 2827 | +" <action>:\n" \ |
| | 2828 | +"\n" \ |
| | 2829 | +" Valid actions include: sysinit, respawn, askfirst, wait,\n" \ |
| | 2830 | +" once, restart, ctrlaltdel, and shutdown.\n" \ |
| | 2831 | +"\n" \ |
| | 2832 | +" The available actions can be classified into two groups: actions\n" \ |
| | 2833 | +" that are run only once, and actions that are re-run when the specified\n" \ |
| | 2834 | +" process exits.\n" \ |
| | 2835 | +"\n" \ |
| | 2836 | +" Run only-once actions:\n" \ |
| | 2837 | +"\n" \ |
| | 2838 | +" 'sysinit' is the first item run on boot. init waits until all\n" \ |
| | 2839 | +" sysinit actions are completed before continuing. Following the\n" \ |
| | 2840 | +" completion of all sysinit actions, all 'wait' actions are run.\n" \ |
| | 2841 | +" 'wait' actions, like 'sysinit' actions, cause init to wait until\n" \ |
| | 2842 | +" the specified task completes. 'once' actions are asynchronous,\n" \ |
| | 2843 | +" therefore, init does not wait for them to complete. 'restart' is\n" \ |
| | 2844 | +" the action taken to restart the init process. By default this should\n" \ |
| | 2845 | +" simply run /sbin/init, but can be a script which runs pivot_root or it\n" \ |
| | 2846 | +" can do all sorts of other interesting things. The 'ctrlaltdel' init\n" \ |
| | 2847 | +" actions are run when the system detects that someone on the system\n" \ |
| | 2848 | +" console has pressed the CTRL-ALT-DEL key combination. Typically one\n" \ |
| | 2849 | +" wants to run 'reboot' at this point to cause the system to reboot.\n" \ |
| | 2850 | +" Finally the 'shutdown' action specifies the actions to taken when\n" \ |
| | 2851 | +" init is told to reboot. Unmounting filesystems and disabling swap\n" \ |
| | 2852 | +" is a very good here.\n" \ |
| | 2853 | +"\n" \ |
| | 2854 | +" Run repeatedly actions:\n" \ |
| | 2855 | +"\n" \ |
| | 2856 | +" 'respawn' actions are run after the 'once' actions. When a process\n" \ |
| | 2857 | +" started with a 'respawn' action exits, init automatically restarts\n" \ |
| | 2858 | +" it. Unlike sysvinit, BusyBox init does not stop processes from\n" \ |
| | 2859 | +" respawning out of control. The 'askfirst' actions acts just like\n" \ |
| | 2860 | +" respawn, except that before running the specified process it\n" \ |
| | 2861 | +" displays the line \"Please press Enter to activate this console.\"\n" \ |
| | 2862 | +" and then waits for the user to press enter before starting the\n" \ |
| | 2863 | +" specified process.\n" \ |
| | 2864 | +"\n" \ |
| | 2865 | +" Unrecognized actions (like initdefault) will cause init to emit an\n" \ |
| | 2866 | +" error message, and then go along with its business. All actions are\n" \ |
| | 2867 | +" run in the order they appear in /etc/inittab.\n" \ |
| | 2868 | +"\n" \ |
| | 2869 | +" <process>:\n" \ |
| | 2870 | +"\n" \ |
| | 2871 | +" Specifies the process to be executed and its command line.\n" \ |
| | 2872 | +"\n" \ |
| | 2873 | +"Example /etc/inittab file:\n" \ |
| | 2874 | +"\n" \ |
| | 2875 | +" # This is run first except when booting in single-user mode\n" \ |
| | 2876 | +" #\n" \ |
| | 2877 | +" ::sysinit:/etc/init.d/rcS\n" \ |
| | 2878 | +" \n" \ |
| | 2879 | +" # /bin/sh invocations on selected ttys\n" \ |
| | 2880 | +" #\n" \ |
| | 2881 | +" # Start an \"askfirst\" shell on the console (whatever that may be)\n" \ |
| | 2882 | +" ::askfirst:-/bin/sh\n" \ |
| | 2883 | +" # Start an \"askfirst\" shell on /dev/tty2-4\n" \ |
| | 2884 | +" tty2::askfirst:-/bin/sh\n" \ |
| | 2885 | +" tty3::askfirst:-/bin/sh\n" \ |
| | 2886 | +" tty4::askfirst:-/bin/sh\n" \ |
| | 2887 | +" \n" \ |
| | 2888 | +" # /sbin/getty invocations for selected ttys\n" \ |
| | 2889 | +" #\n" \ |
| | 2890 | +" tty4::respawn:/sbin/getty 38400 tty4\n" \ |
| | 2891 | +" tty5::respawn:/sbin/getty 38400 tty5\n" \ |
| | 2892 | +" \n" \ |
| | 2893 | +" \n" \ |
| | 2894 | +" # Example of how to put a getty on a serial line (for a terminal)\n" \ |
| | 2895 | +" #\n" \ |
| | 2896 | +" #::respawn:/sbin/getty -L ttyS0 9600 vt100\n" \ |
| | 2897 | +" #::respawn:/sbin/getty -L ttyS1 9600 vt100\n" \ |
| | 2898 | +" #\n" \ |
| | 2899 | +" # Example how to put a getty on a modem line\n" \ |
| | 2900 | +" #::respawn:/sbin/getty 57600 ttyS2\n" \ |
| | 2901 | +" \n" \ |
| | 2902 | +" # Stuff to do when restarting the init process\n" \ |
| | 2903 | +" ::restart:/sbin/init\n" \ |
| | 2904 | +" \n" \ |
| | 2905 | +" # Stuff to do before rebooting\n" \ |
| | 2906 | +" ::ctrlaltdel:/sbin/reboot\n" \ |
| | 2907 | +" ::shutdown:/bin/umount -a -r\n" \ |
| | 2908 | +" ::shutdown:/sbin/swapoff -a\n" |
| | 2909 | + |
| | 2910 | +#define insmod_trivial_usage \ |
| | 2911 | + "[OPTION]... MODULE [symbol=value]..." |
| | 2912 | +#define insmod_full_usage \ |
| | 2913 | + "Load the specified kernel modules into the kernel" \ |
| | 2914 | + "\n\nOptions:\n" \ |
| | 2915 | + " -f Force module to load into the wrong kernel version\n" \ |
| | 2916 | + " -k Make module autoclean-able\n" \ |
| | 2917 | + " -v Verbose output\n" \ |
| | 2918 | + " -q Quiet output\n" \ |
| | 2919 | + " -L Lock to prevent simultaneous loads of a module\n" \ |
| | 2920 | + USE_FEATURE_INSMOD_LOAD_MAP( \ |
| | 2921 | + " -m Output load map to stdout\n") \ |
| | 2922 | + " -o NAME Set internal module name to NAME\n" \ |
| | 2923 | + " -x Do not export externs" |
| | 2924 | + |
| | 2925 | +#define install_trivial_usage \ |
| | 2926 | + "[-cgmops] [sources] <dest|directory>" |
| | 2927 | +#define install_full_usage \ |
| | 2928 | + "Copy files and set attributes" \ |
| | 2929 | + "\n\nOptions:\n" \ |
| | 2930 | + " -c Copy the file, default\n" \ |
| | 2931 | + " -d Create directories\n" \ |
| | 2932 | + " -g Set group ownership\n" \ |
| | 2933 | + " -m Set permission modes\n" \ |
| | 2934 | + " -o Set ownership\n" \ |
| | 2935 | + " -p Preserve date\n" \ |
| | 2936 | + " -s Strip symbol tables" \ |
| | 2937 | + USE_SELINUX( \ |
| | 2938 | + "\n -Z Set security context of copy" \ |
| | 2939 | + ) |
| | 2940 | + |
| | 2941 | +#define ip_trivial_usage \ |
| | 2942 | + "[OPTIONS] {address | link | route | tunnel | rule} {COMMAND}" |
| | 2943 | +#define ip_full_usage \ |
| | 2944 | + "ip [OPTIONS] OBJECT {COMMAND}\n" \ |
| | 2945 | + "where OBJECT := {link | addr | route | tunnel |rule}\n" \ |
| | 2946 | + "OPTIONS := { -f[amily] { inet | inet6 | link } | -o[neline] }" |
| | 2947 | + |
| | 2948 | +#define ipaddr_trivial_usage \ |
| | 2949 | + "{ {add|del} IFADDR dev STRING | {show|flush}\n" \ |
| | 2950 | + " [ dev STRING ] [ to PREFIX ] }" |
| | 2951 | +#define ipaddr_full_usage \ |
| | 2952 | + "ipaddr {add|delete} IFADDR dev STRING\n" \ |
| | 2953 | + "ipaddr {show|flush} [ dev STRING ] [ scope SCOPE-ID ]\n" \ |
| | 2954 | + " [ to PREFIX ] [ label PATTERN ]\n" \ |
| | 2955 | + " IFADDR := PREFIX | ADDR peer PREFIX\n" \ |
| | 2956 | + " [ broadcast ADDR ] [ anycast ADDR ]\n" \ |
| | 2957 | + " [ label STRING ] [ scope SCOPE-ID ]\n" \ |
| | 2958 | + " SCOPE-ID := [ host | link | global | NUMBER ]" |
| | 2959 | + |
| | 2960 | +#define ipcalc_trivial_usage \ |
| | 2961 | + "[OPTION]... <ADDRESS>[[/]<NETMASK>] [NETMASK]" |
| | 2962 | +#define ipcalc_full_usage \ |
| | 2963 | + "Calculate IP network settings from a IP address" \ |
| | 2964 | + "\n\nOptions:" \ |
| | 2965 | + "\n -b --broadcast Display calculated broadcast address" \ |
| | 2966 | + "\n -n --network Display calculated network address" \ |
| | 2967 | + "\n -m --netmask Display default netmask for IP" \ |
| | 2968 | + USE_FEATURE_IPCALC_FANCY( \ |
| | 2969 | + "\n -p --prefix Display the prefix for IP/NETMASK" \ |
| | 2970 | + "\n -h --hostname Display first resolved host name" \ |
| | 2971 | + "\n -s --silent Don't ever display error messages") |
| | 2972 | + |
| | 2973 | +#define ipcrm_trivial_usage \ |
| | 2974 | + "[-[MQS] key] [-[mqs] id]" |
| | 2975 | +#define ipcrm_full_usage \ |
| | 2976 | + "The upper-case options MQS are used to remove a shared memory segment by a\n" \ |
| | 2977 | + "segment by a shmkey value. The lower-case options mqs are used\n" \ |
| | 2978 | + "to remove a segment by shmid value.\n" \ |
| | 2979 | + "\n\nOptions:\n" \ |
| | 2980 | + " -[mM] Remove the memory segment after the last detach\n" \ |
| | 2981 | + " -[qQ] Remove the message queue\n" \ |
| | 2982 | + " -[sS] Remove the semaphore" |
| | 2983 | + |
| | 2984 | +#define ipcs_trivial_usage \ |
| | 2985 | + "[[-smq] -i shmid] | [[-asmq] [-tcplu]]" |
| | 2986 | +#define ipcs_full_usage \ |
| | 2987 | + " -i Specify a specific resource id\n" \ |
| | 2988 | + "Resource specification:\n" \ |
| | 2989 | + " -m Shared memory segments\n" \ |
| | 2990 | + " -q Message queues\n" \ |
| | 2991 | + " -s Semaphore arrays\n" \ |
| | 2992 | + " -a All (default)\n" \ |
| | 2993 | + "Output format:\n" \ |
| | 2994 | + " -t Time\n" \ |
| | 2995 | + " -c Creator\n" \ |
| | 2996 | + " -p Pid\n" \ |
| | 2997 | + " -l Limits\n" \ |
| | 2998 | + " -u Summary" |
| | 2999 | + |
| | 3000 | +#define iplink_trivial_usage \ |
| | 3001 | + "{ set DEVICE { up | down | arp { on | off } | show [ DEVICE ] }" |
| | 3002 | +#define iplink_full_usage \ |
| | 3003 | + "iplink set DEVICE { up | down | arp | multicast { on | off } |\n" \ |
| | 3004 | + " dynamic { on | off } |\n" \ |
| | 3005 | + " mtu MTU }\n" \ |
| | 3006 | + "iplink show [ DEVICE ]" |
| | 3007 | + |
| | 3008 | +#define iproute_trivial_usage \ |
| | 3009 | + "{ list | flush | { add | del | change | append |\n" \ |
| | 3010 | + " replace | monitor } ROUTE }" |
| | 3011 | +#define iproute_full_usage \ |
| | 3012 | + "iproute { list | flush } SELECTOR\n" \ |
| | 3013 | + "iproute get ADDRESS [ from ADDRESS iif STRING ]\n" \ |
| | 3014 | + " [ oif STRING ] [ tos TOS ]\n" \ |
| | 3015 | + "iproute { add | del | change | append | replace | monitor } ROUTE\n" \ |
| | 3016 | + " SELECTOR := [ root PREFIX ] [ match PREFIX ] [ proto RTPROTO ]\n" \ |
| | 3017 | + " ROUTE := [ TYPE ] PREFIX [ tos TOS ] [ proto RTPROTO ]" |
| | 3018 | + |
| | 3019 | +#define iprule_trivial_usage \ |
| | 3020 | + "{[ list | add | del ] RULE}" |
| | 3021 | +#define iprule_full_usage \ |
| | 3022 | + "iprule [ list | add | del ] SELECTOR ACTION\n" \ |
| | 3023 | + " SELECTOR := [ from PREFIX ] [ to PREFIX ] [ tos TOS ] [ fwmark FWMARK ]\n" \ |
| | 3024 | + " [ dev STRING ] [ pref NUMBER ]\n" \ |
| | 3025 | + " ACTION := [ table TABLE_ID ] [ nat ADDRESS ]\n" \ |
| | 3026 | + " [ prohibit | reject | unreachable ]\n" \ |
| | 3027 | + " [ realms [SRCREALM/]DSTREALM ]\n" \ |
| | 3028 | + " TABLE_ID := [ local | main | default | NUMBER ]" |
| | 3029 | + |
| | 3030 | +#define iptunnel_trivial_usage \ |
| | 3031 | + "{ add | change | del | show } [ NAME ]\n" \ |
| | 3032 | + " [ mode { ipip | gre | sit } ]\n" \ |
| | 3033 | + " [ remote ADDR ] [ local ADDR ] [ ttl TTL ]" |
| | 3034 | +#define iptunnel_full_usage \ |
| | 3035 | + "iptunnel { add | change | del | show } [ NAME ]\n" \ |
| | 3036 | + " [ mode { ipip | gre | sit } ] [ remote ADDR ] [ local ADDR ]\n" \ |
| | 3037 | + " [ [i|o]seq ] [ [i|o]key KEY ] [ [i|o]csum ]\n" \ |
| | 3038 | + " [ ttl TTL ] [ tos TOS ] [ [no]pmtudisc ] [ dev PHYS_DEV ]" |
| | 3039 | + |
| | 3040 | +#define kill_trivial_usage \ |
| | 3041 | + "[-l] [-signal] process-id [process-id ...]" |
| | 3042 | +#define kill_full_usage \ |
| | 3043 | + "Send a signal (default is TERM) to the specified process(es)" \ |
| | 3044 | + "\n\nOptions:\n" \ |
| | 3045 | + " -l List all signal names and numbers" |
| | 3046 | +#define kill_example_usage \ |
| | 3047 | + "$ ps | grep apache\n" \ |
| | 3048 | + "252 root root S [apache]\n" \ |
| | 3049 | + "263 www-data www-data S [apache]\n" \ |
| | 3050 | + "264 www-data www-data S [apache]\n" \ |
| | 3051 | + "265 www-data www-data S [apache]\n" \ |
| | 3052 | + "266 www-data www-data S [apache]\n" \ |
| | 3053 | + "267 www-data www-data S [apache]\n" \ |
| | 3054 | + "$ kill 252\n" |
| | 3055 | + |
| | 3056 | +#define killall_trivial_usage \ |
| | 3057 | + "[-l] [-q] [-signal] process-name [process-name ...]" |
| | 3058 | +#define killall_full_usage \ |
| | 3059 | + "Send a signal (default is TERM) to the specified process(es)" \ |
| | 3060 | + "\n\nOptions:\n" \ |
| | 3061 | + " -l List all signal names and numbers\n" \ |
| | 3062 | + " -q Do not complain if no processes were killed" |
| | 3063 | +#define killall_example_usage \ |
| | 3064 | + "$ killall apache\n" |
| | 3065 | + |
| | 3066 | +#define killall5_trivial_usage \ |
| | 3067 | + "[-l] [-signal]" |
| | 3068 | +#define killall5_full_usage \ |
| | 3069 | + "Send a signal (default is TERM) to all processes outside current session" \ |
| | 3070 | + "\n\nOptions:\n" \ |
| | 3071 | + " -l List all signal names and numbers\n" \ |
| | 3072 | + |
| | 3073 | +#define klogd_trivial_usage \ |
| | 3074 | + "[-c n] [-n]" |
| | 3075 | +#define klogd_full_usage \ |
| | 3076 | + "Kernel logger" \ |
| | 3077 | + "\n\nOptions:\n" \ |
| | 3078 | + " -c n Sets the default log level of console messages to n\n" \ |
| | 3079 | + " -n Run as foreground process" |
| | 3080 | + |
| | 3081 | +#define length_trivial_usage \ |
| | 3082 | + "STRING" |
| | 3083 | +#define length_full_usage \ |
| | 3084 | + "Print out the length of the specified STRING" |
| | 3085 | +#define length_example_usage \ |
| | 3086 | + "$ length Hello\n" \ |
| | 3087 | + "5\n" |
| | 3088 | + |
| | 3089 | +#define less_trivial_usage \ |
| | 3090 | + "[-EMNmh~?] FILE1 FILE2..." |
| | 3091 | +#define less_full_usage \ |
| | 3092 | + "View a file or list of files. The position within files can be\n" \ |
| | 3093 | + "changed, and files can be manipulated in various ways." \ |
| | 3094 | + "\n\nOptions:\n" \ |
| | 3095 | + " -E Quit once the end of a file is reached\n" \ |
| | 3096 | + " -M Display a status line containing the current line numbers\n" \ |
| | 3097 | + " and the percentage through the file\n" \ |
| | 3098 | + " -N Prefix line numbers to each line\n" \ |
| | 3099 | + " -m Display a status line containing the percentage through the\n" \ |
| | 3100 | + " file\n" \ |
| | 3101 | + " -~ Suppress ~s displayed when input past the end of the file is\n" \ |
| | 3102 | + " reached" |
| | 3103 | + |
| | 3104 | +#define setarch_trivial_usage \ |
| | 3105 | + "<personality> <program> [args ...]" |
| | 3106 | +#define setarch_full_usage \ |
| | 3107 | + "Personality may be:\n" \ |
| | 3108 | + " linux32 Set 32bit uname emulation\n" \ |
| | 3109 | + " linux64 Set 64bit uname emulation" |
| | 3110 | + |
| | 3111 | +#define ln_trivial_usage \ |
| | 3112 | + "[OPTION] TARGET... LINK_NAME|DIRECTORY" |
| | 3113 | +#define ln_full_usage \ |
| | 3114 | + "Create a link named LINK_NAME or DIRECTORY to the specified TARGET.\n" \ |
| | 3115 | + "You may use '--' to indicate that all following arguments are non-options." \ |
| | 3116 | + "\n\nOptions:\n" \ |
| | 3117 | + " -s Make symlinks instead of hardlinks\n" \ |
| | 3118 | + " -f Remove existing destination files\n" \ |
| | 3119 | + " -n No dereference symlinks - treat like normal file\n" \ |
| | 3120 | + " -b Make a backup of the target (if exists) before link operation\n" \ |
| | 3121 | + " -S suf Use suffix instead of ~ when making backup files" |
| | 3122 | +#define ln_example_usage \ |
| | 3123 | + "$ ln -s BusyBox /tmp/ls\n" \ |
| | 3124 | + "$ ls -l /tmp/ls\n" \ |
| | 3125 | + "lrwxrwxrwx 1 root root 7 Apr 12 18:39 ls -> BusyBox*\n" |
| | 3126 | + |
| | 3127 | +#define loadfont_trivial_usage \ |
| | 3128 | + "< font" |
| | 3129 | +#define loadfont_full_usage \ |
| | 3130 | + "Load a console font from standard input" |
| | 3131 | +#define loadfont_example_usage \ |
| | 3132 | + "$ loadfont < /etc/i18n/fontname\n" |
| | 3133 | + |
| | 3134 | +#define loadkmap_trivial_usage \ |
| | 3135 | + "< keymap" |
| | 3136 | +#define loadkmap_full_usage \ |
| | 3137 | + "Load a binary keyboard translation table from standard input" |
| | 3138 | +#define loadkmap_example_usage \ |
| | 3139 | + "$ loadkmap < /etc/i18n/lang-keymap\n" |
| | 3140 | + |
| | 3141 | +#define logger_trivial_usage \ |
| | 3142 | + "[OPTION]... [MESSAGE]" |
| | 3143 | +#define logger_full_usage \ |
| | 3144 | + "Write MESSAGE to the system log. If MESSAGE is omitted, log stdin." \ |
| | 3145 | + "\n\nOptions:\n" \ |
| | 3146 | + " -s Log to stderr as well as the system log\n" \ |
| | 3147 | + " -t TAG Log using the specified tag (defaults to user name)\n" \ |
| | 3148 | + " -p PRIO Enter the message with the specified priority.\n" \ |
| | 3149 | + " This may be numerical or a 'facility.level' pair." |
| | 3150 | +#define logger_example_usage \ |
| | 3151 | + "$ logger \"hello\"\n" |
| | 3152 | + |
| | 3153 | +#define login_trivial_usage \ |
| | 3154 | + "[OPTION]... [username] [ENV=VAR ...]" |
| | 3155 | +#define login_full_usage \ |
| | 3156 | + "Begin a new session on the system" \ |
| | 3157 | + "\n\nOptions:\n" \ |
| | 3158 | + " -f Do not authenticate (user already authenticated)\n" \ |
| | 3159 | + " -h Name of the remote host for this login\n" \ |
| | 3160 | + " -p Preserve environment" |
| | 3161 | + |
| | 3162 | +#define logname_trivial_usage \ |
| | 3163 | + "" |
| | 3164 | +#define logname_full_usage \ |
| | 3165 | + "Print the name of the current user" |
| | 3166 | +#define logname_example_usage \ |
| | 3167 | + "$ logname\n" \ |
| | 3168 | + "root\n" |
| | 3169 | + |
| | 3170 | +#define logread_trivial_usage \ |
| | 3171 | + "[OPTION]..." |
| | 3172 | +#define logread_full_usage \ |
| | 3173 | + "Show the messages from syslogd (using circular buffer)" \ |
| | 3174 | + "\n\nOptions:\n" \ |
| | 3175 | + " -f Output data as the log grows" |
| | 3176 | + |
| | 3177 | +#define losetup_trivial_usage \ |
| | 3178 | + "[-o OFFSET] [-d] LOOPDEVICE [FILE]]" |
| | 3179 | +#define losetup_full_usage \ |
| | 3180 | + "(Dis)associate LOOPDEVICE with FILE, or display current associations" \ |
| | 3181 | + "\n\nOptions:\n" \ |
| | 3182 | + " -d Disassociate LOOPDEVICE\n" \ |
| | 3183 | + " -o OFFSET Start OFFSET bytes into FILE" |
| | 3184 | +#define losetup_notes_usage \ |
| | 3185 | + "No arguments will display all current associations.\n" \ |
| | 3186 | + "One argument (losetup /dev/loop1) will display the current association\n" \ |
| | 3187 | + "(if any), or disassociate it (with -d). The display shows the offset\n" \ |
| | 3188 | + "and filename of the file the loop device is currently bound to.\n\n" \ |
| | 3189 | + "Two arguments (losetup /dev/loop1 file.img) create a new association,\n" \ |
| | 3190 | + "with an optional offset (-o 12345). Encryption is not yet supported.\n\n" |
| | 3191 | + |
| | 3192 | +#define ls_trivial_usage \ |
| | 3193 | + "[-1Aa" USE_FEATURE_LS_TIMESTAMPS("c") "Cd" \ |
| | 3194 | + USE_FEATURE_LS_TIMESTAMPS("e") USE_FEATURE_LS_FILETYPES("F") "iln" \ |
| | 3195 | + USE_FEATURE_LS_FILETYPES("p") USE_FEATURE_LS_FOLLOWLINKS("L") \ |
| | 3196 | + USE_FEATURE_LS_RECURSIVE("R") USE_FEATURE_LS_SORTFILES("rS") "s" \ |
| | 3197 | + USE_FEATURE_AUTOWIDTH("T") USE_FEATURE_LS_TIMESTAMPS("tu") \ |
| | 3198 | + USE_FEATURE_LS_SORTFILES("v") USE_FEATURE_AUTOWIDTH("w") "x" \ |
| | 3199 | + USE_FEATURE_LS_SORTFILES("X") USE_FEATURE_HUMAN_READABLE("h") "k" \ |
| | 3200 | + USE_SELINUX("K") "] [filenames...]" |
| | 3201 | +#define ls_full_usage \ |
| | 3202 | + "List directory contents" \ |
| | 3203 | + "\n\nOptions:" \ |
| | 3204 | + "\n -1 List files in a single column" \ |
| | 3205 | + "\n -A Do not list implied . and .." \ |
| | 3206 | + "\n -a Do not hide entries starting with ." \ |
| | 3207 | + "\n -C List entries by columns" \ |
| | 3208 | + USE_FEATURE_LS_TIMESTAMPS( \ |
| | 3209 | + "\n -c With -l: show ctime") \ |
| | 3210 | + USE_FEATURE_LS_COLOR( \ |
| | 3211 | + "\n --color[={always,never,auto}] Control coloring") \ |
| | 3212 | + "\n -d List directory entries instead of contents" \ |
| | 3213 | + USE_FEATURE_LS_TIMESTAMPS( \ |
| | 3214 | + "\n -e List both full date and full time") \ |
| | 3215 | + USE_FEATURE_LS_FILETYPES( \ |
| | 3216 | + "\n -F Append indicator (one of */=@|) to entries") \ |
| | 3217 | + "\n -i List the i-node for each file" \ |
| | 3218 | + "\n -l Use a long listing format" \ |
| | 3219 | + "\n -n List numeric UIDs and GIDs instead of names" \ |
| | 3220 | + USE_FEATURE_LS_FILETYPES( \ |
| | 3221 | + "\n -p Append indicator (one of /=@|) to entries") \ |
| | 3222 | + USE_FEATURE_LS_FOLLOWLINKS( \ |
| | 3223 | + "\n -L List entries pointed to by symlinks") \ |
| | 3224 | + USE_FEATURE_LS_RECURSIVE( \ |
| | 3225 | + "\n -R List subdirectories recursively") \ |
| | 3226 | + USE_FEATURE_LS_SORTFILES( \ |
| | 3227 | + "\n -r Sort the listing in reverse order") \ |
| | 3228 | + USE_FEATURE_LS_SORTFILES( \ |
| | 3229 | + "\n -S Sort the listing by file size") \ |
| | 3230 | + "\n -s List the size of each file, in blocks" \ |
| | 3231 | + USE_FEATURE_AUTOWIDTH( \ |
| | 3232 | + "\n -T NUM Assume Tabstop every NUM columns") \ |
| | 3233 | + USE_FEATURE_LS_TIMESTAMPS( \ |
| | 3234 | + "\n -t With -l: show modification time") \ |
| | 3235 | + USE_FEATURE_LS_TIMESTAMPS( \ |
| | 3236 | + "\n -u With -l: show access time") \ |
| | 3237 | + USE_FEATURE_LS_SORTFILES( \ |
| | 3238 | + "\n -v Sort the listing by version") \ |
| | 3239 | + USE_FEATURE_AUTOWIDTH( \ |
| | 3240 | + "\n -w NUM Assume the terminal is NUM columns wide") \ |
| | 3241 | + "\n -x List entries by lines instead of by columns" \ |
| | 3242 | + USE_FEATURE_LS_SORTFILES( \ |
| | 3243 | + "\n -X Sort the listing by extension") \ |
| | 3244 | + USE_FEATURE_HUMAN_READABLE( \ |
| | 3245 | + "\n -h Print sizes in human readable format (e.g., 1K 243M 2G)") \ |
| | 3246 | + USE_SELINUX( \ |
| | 3247 | + "\n -k Print security context") \ |
| | 3248 | + USE_SELINUX( \ |
| | 3249 | + "\n -K Print security context in long format") \ |
| | 3250 | + USE_SELINUX( \ |
| | 3251 | + "\n -Z Print security context and permission") |
| | 3252 | + |
| | 3253 | +#define lsattr_trivial_usage \ |
| | 3254 | + "[-Radlv] [files...]" |
| | 3255 | +#define lsattr_full_usage \ |
| | 3256 | + "List file attributes on an ext2 fs" \ |
| | 3257 | + "\n\nOptions:\n" \ |
| | 3258 | + " -R Recursively list subdirectories\n" \ |
| | 3259 | + " -a Do not hide entries starting with .\n" \ |
| | 3260 | + " -d List directory entries instead of contents\n" \ |
| | 3261 | + " -l Print long flag names\n" \ |
| | 3262 | + " -v List the file's version/generation number" |
| | 3263 | + |
| | 3264 | +#define lsmod_trivial_usage \ |
| | 3265 | + "" |
| | 3266 | +#define lsmod_full_usage \ |
| | 3267 | + "List the currently loaded kernel modules" |
| | 3268 | + |
| | 3269 | +#ifdef CONFIG_FEATURE_MAKEDEVS_LEAF |
| | 3270 | +#define makedevs_trivial_usage \ |
| | 3271 | + "NAME TYPE MAJOR MINOR FIRST LAST [s]" |
| | 3272 | +#define makedevs_full_usage \ |
| | 3273 | + "Create a range of block or character special files\n\n" \ |
| | 3274 | + "TYPEs include:\n" \ |
| | 3275 | + " b: Make a block (buffered) device\n" \ |
| | 3276 | + " c or u: Make a character (un-buffered) device\n" \ |
| | 3277 | + " p: Make a named pipe. MAJOR and MINOR are ignored for named pipes\n" \ |
| | 3278 | + "\n" \ |
| | 3279 | + "FIRST specifies the number appended to NAME to create the first device.\n" \ |
| | 3280 | + "LAST specifies the number of the last item that should be created\n" \ |
| | 3281 | + "If 's' is the last argument, the base device is created as well.\n\n" \ |
| | 3282 | + "For example:\n" \ |
| | 3283 | + " makedevs /dev/ttyS c 4 66 2 63 -> ttyS2-ttyS63\n" \ |
| | 3284 | + " makedevs /dev/hda b 3 0 0 8 s -> hda,hda1-hda8" |
| | 3285 | +#define makedevs_example_usage \ |
| | 3286 | + "# makedevs /dev/ttyS c 4 66 2 63\n" \ |
| | 3287 | + "[creates ttyS2-ttyS63]\n" \ |
| | 3288 | + "# makedevs /dev/hda b 3 0 0 8 s\n" \ |
| | 3289 | + "[creates hda,hda1-hda8]\n" |
| | 3290 | +#endif |
| | 3291 | + |
| | 3292 | +#ifdef CONFIG_FEATURE_MAKEDEVS_TABLE |
| | 3293 | +#define makedevs_trivial_usage \ |
| | 3294 | + "[-d device_table] rootdir" |
| | 3295 | +#define makedevs_full_usage \ |
| | 3296 | + "Create a range of special files as specified in a device table.\n" \ |
| | 3297 | + "Device table entries take the form of:\n" \ |
| | 3298 | + "<type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count>\n" \ |
| | 3299 | + "Where name is the file name, type can be one of:\n" \ |
| | 3300 | + " f A regular file\n" \ |
| | 3301 | + " d Directory\n" \ |
| | 3302 | + " c Character special device file\n" \ |
| | 3303 | + " b Block special device file\n" \ |
| | 3304 | + " p Fifo (named pipe)\n" \ |
| | 3305 | + "uid is the user id for the target file, gid is the group id for the\n" \ |
| | 3306 | + "target file. The rest of the entries (major, minor, etc) apply to\n" \ |
| | 3307 | + "to device special files. A '-' may be used for blank entries." |
| | 3308 | +#define makedevs_example_usage \ |
| | 3309 | + "For example:\n" \ |
| | 3310 | + "<name> <type> <mode><uid><gid><major><minor><start><inc><count>\n" \ |
| | 3311 | + "/dev d 755 0 0 - - - - -\n" \ |
| | 3312 | + "/dev/console c 666 0 0 5 1 - - -\n" \ |
| | 3313 | + "/dev/null c 666 0 0 1 3 0 0 -\n" \ |
| | 3314 | + "/dev/zero c 666 0 0 1 5 0 0 -\n" \ |
| | 3315 | + "/dev/hda b 640 0 0 3 0 0 0 -\n" \ |
| | 3316 | + "/dev/hda b 640 0 0 3 1 1 1 15\n\n" \ |
| | 3317 | + "Will Produce:\n" \ |
| | 3318 | + "/dev\n" \ |
| | 3319 | + "/dev/console\n" \ |
| | 3320 | + "/dev/null\n" \ |
| | 3321 | + "/dev/zero\n" \ |
| | 3322 | + "/dev/hda\n" \ |
| | 3323 | + "/dev/hda[0-15]\n" |
| | 3324 | +#endif |
| | 3325 | + |
| | 3326 | +#define matchpathcon_trivial_usage \ |
| | 3327 | + "[-n] [-N] [-f file_contexts_file] [-p prefix] [-V]" |
| | 3328 | +#define matchpathcon_full_usage \ |
| | 3329 | + " -n Do not display path" \ |
| | 3330 | + "\n -N Do not use translations" \ |
| | 3331 | + "\n -f Use alternate file_context file" \ |
| | 3332 | + "\n -p Use prefix to speed translations" \ |
| | 3333 | + "\n -V Verify file context on disk matches defaults" |
| | 3334 | + |
| | 3335 | +#define md5sum_trivial_usage \ |
| | 3336 | + "[OPTION] [FILEs...]" \ |
| | 3337 | + USE_FEATURE_MD5_SHA1_SUM_CHECK("\n or: md5sum [OPTION] -c [FILE]") |
| | 3338 | +#define md5sum_full_usage \ |
| | 3339 | + "Print" USE_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " MD5 checksums" \ |
| | 3340 | + "\n\nOptions:\n" \ |
| | 3341 | + "With no FILE, or when FILE is -, read standard input." \ |
| | 3342 | + USE_FEATURE_MD5_SHA1_SUM_CHECK("\n\n" \ |
| | 3343 | + " -c Check MD5 sums against given list\n" \ |
| | 3344 | + "\nThe following two options are useful only when verifying checksums:\n" \ |
| | 3345 | + " -s Don't output anything, status code shows success\n" \ |
| | 3346 | + " -w Warn about improperly formatted MD5 checksum lines") |
| | 3347 | +#define md5sum_example_usage \ |
| | 3348 | + "$ md5sum < busybox\n" \ |
| | 3349 | + "6fd11e98b98a58f64ff3398d7b324003\n" \ |
| | 3350 | + "$ md5sum busybox\n" \ |
| | 3351 | + "6fd11e98b98a58f64ff3398d7b324003 busybox\n" \ |
| | 3352 | + "$ md5sum -c -\n" \ |
| | 3353 | + "6fd11e98b98a58f64ff3398d7b324003 busybox\n" \ |
| | 3354 | + "busybox: OK\n" \ |
| | 3355 | + "^D\n" |
| | 3356 | + |
| | 3357 | +#define mdev_trivial_usage \ |
| | 3358 | + "[-s]" |
| | 3359 | +#define mdev_full_usage \ |
| | 3360 | + " -s Scan /sys and populate /dev during system boot\n\n" \ |
| | 3361 | + "Called with no options (via hotplug) it uses environment variables\n" \ |
| | 3362 | + "to determine which device to add/remove." |
| | 3363 | +#define mdev_notes_usage "" \ |
| | 3364 | + USE_FEATURE_MDEV_CONFIG( \ |
| | 3365 | + "The mdev config file contains lines that look like:\n" \ |
| | 3366 | + " hd[a-z][0-9]* 0:3 660\n\n" \ |
| | 3367 | + "That's device name (with regex match), uid:gid, and permissions.\n\n" \ |
| | 3368 | + USE_FEATURE_MDEV_EXEC( \ |
| | 3369 | + "Optionally, that can be followed (on the same line) by a special character\n" \ |
| | 3370 | + "and a command line to run after creating/before deleting the corresponding\n" \ |
| | 3371 | + "device(s). The environment variable $MDEV indicates the active device node\n" \ |
| | 3372 | + "(which is useful if it's a regex match). For example:\n\n" \ |
| | 3373 | + " hdc root:cdrom 660 *ln -s $MDEV cdrom\n\n" \ |
| | 3374 | + "The special characters are @ (run after creating), $ (run before deleting),\n" \ |
| | 3375 | + "and * (run both after creating and before deleting). The commands run in\n" \ |
| | 3376 | + "the /dev directory, and use system() which calls /bin/sh.\n\n" \ |
| | 3377 | + ) \ |
| | 3378 | + "Config file parsing stops on the first matching line. If no config\n"\ |
| | 3379 | + "entry is matched, devices are created with default 0:0 660. (Make\n"\ |
| | 3380 | + "the last line match .* to override this.)\n\n" \ |
| | 3381 | + ) |
| | 3382 | + |
| | 3383 | +#define mesg_trivial_usage \ |
| | 3384 | + "[y|n]" |
| | 3385 | +#define mesg_full_usage \ |
| | 3386 | + "Control write access to your terminal\n" \ |
| | 3387 | + " y Allow write access to your terminal\n" \ |
| | 3388 | + " n Disallow write access to your terminal" |
| | 3389 | + |
| | 3390 | +#define mkdir_trivial_usage \ |
| | 3391 | + "[OPTION] DIRECTORY..." |
| | 3392 | +#define mkdir_full_usage \ |
| | 3393 | + "Create the DIRECTORY(ies) if they do not already exist" \ |
| | 3394 | + "\n\nOptions:\n" \ |
| | 3395 | + " -m Set permission mode (as in chmod), not rwxrwxrwx - umask\n" \ |
| | 3396 | + " -p No error if existing, make parent directories as needed" \ |
| | 3397 | + USE_SELINUX( \ |
| | 3398 | + "\n -Z Set security context" \ |
| | 3399 | + ) |
| | 3400 | + |
| | 3401 | +#define mkdir_example_usage \ |
| | 3402 | + "$ mkdir /tmp/foo\n" \ |
| | 3403 | + "$ mkdir /tmp/foo\n" \ |
| | 3404 | + "/tmp/foo: File exists\n" \ |
| | 3405 | + "$ mkdir /tmp/foo/bar/baz\n" \ |
| | 3406 | + "/tmp/foo/bar/baz: No such file or directory\n" \ |
| | 3407 | + "$ mkdir -p /tmp/foo/bar/baz\n" |
| | 3408 | + |
| | 3409 | +#define mke2fs_trivial_usage \ |
| | 3410 | + "[-c|-l filename] [-b block-size] [-f fragment-size] [-g blocks-per-group] " \ |
| | 3411 | + "[-i bytes-per-inode] [-j] [-J journal-options] [-N number-of-inodes] [-n] " \ |
| | 3412 | + "[-m reserved-blocks-percentage] [-o creator-os] [-O feature[,...]] [-q] " \ |
| | 3413 | + "[r fs-revision-level] [-E extended-options] [-v] [-F] [-L volume-label] " \ |
| | 3414 | + "[-M last-mounted-directory] [-S] [-T filesystem-type] " \ |
| | 3415 | + "device [blocks-count]" |
| | 3416 | +#define mke2fs_full_usage \ |
| | 3417 | + " -b size Block size in bytes\n" \ |
| | 3418 | + " -c Check for bad blocks before creating\n" \ |
| | 3419 | + " -E opts Set extended options\n" \ |
| | 3420 | + " -f size Fragment size in bytes\n" \ |
| | 3421 | + " -F Force (ignore sanity checks)\n" \ |
| | 3422 | + " -g num Number of blocks in a block group\n" \ |
| | 3423 | + " -i ratio The bytes/inode ratio\n" \ |
| | 3424 | + " -j Create a journal (ext3)\n" \ |
| | 3425 | + " -J opts Set journal options (size/device)\n" \ |
| | 3426 | + " -l file Read bad blocks list from file\n" \ |
| | 3427 | + " -L lbl Set the volume label\n" \ |
| | 3428 | + " -m percent Percent of fs blocks to reserve for admin\n" \ |
| | 3429 | + " -M dir Set last mounted directory\n" \ |
| | 3430 | + " -n Do not actually create anything\n" \ |
| | 3431 | + " -N num Number of inodes to create\n" \ |
| | 3432 | + " -o os Set the 'creator os' field\n" \ |
| | 3433 | + " -O features Dir_index/filetype/has_journal/journal_dev/sparse_super\n" \ |
| | 3434 | + " -q Quiet execution\n" \ |
| | 3435 | + " -r rev Set filesystem revision\n" \ |
| | 3436 | + " -S Write superblock and group descriptors only\n" \ |
| | 3437 | + " -T fs-type Set usage type (news/largefile/largefile4)\n" \ |
| | 3438 | + " -v Verbose execution" |
| | 3439 | + |
| | 3440 | +#define mkfifo_trivial_usage \ |
| | 3441 | + "[OPTIONS] name" |
| | 3442 | +#define mkfifo_full_usage \ |
| | 3443 | + "Create a named pipe (identical to 'mknod name p')" \ |
| | 3444 | + "\n\nOptions:\n" \ |
| | 3445 | + " -m Create the pipe using the specified mode (default a=rw)" \ |
| | 3446 | + USE_SELINUX( \ |
| | 3447 | + "\n -Z Set security context" \ |
| | 3448 | + ) |
| | 3449 | + |
| | 3450 | +#define mkfs_minix_trivial_usage \ |
| | 3451 | + "[-c | -l filename] [-nXX] [-iXX] /dev/name [blocks]" |
| | 3452 | +#define mkfs_minix_full_usage \ |
| | 3453 | + "Make a MINIX filesystem" \ |
| | 3454 | + "\n\nOptions:\n" \ |
| | 3455 | + " -c Check the device for bad blocks\n" \ |
| | 3456 | + " -n [14|30] Specify the maximum length of filenames\n" \ |
| | 3457 | + " -i INODES Specify the number of inodes for the filesystem\n" \ |
| | 3458 | + " -l FILENAME Read the bad blocks list from FILENAME\n" \ |
| | 3459 | + " -v Make a Minix version 2 filesystem" |
| | 3460 | + |
| | 3461 | +#define mknod_trivial_usage \ |
| | 3462 | + "[OPTIONS] NAME TYPE MAJOR MINOR" |
| | 3463 | +#define mknod_full_usage \ |
| | 3464 | + "Create a special file (block, character, or pipe)" \ |
| | 3465 | + "\n\nOptions:\n" \ |
| | 3466 | + " -m Create the special file using the specified mode (default a=rw)" \ |
| | 3467 | + "\n\nTYPEs include:\n" \ |
| | 3468 | + " b: Make a block (buffered) device\n" \ |
| | 3469 | + " c or u: Make a character (un-buffered) device\n" \ |
| | 3470 | + " p: Make a named pipe. MAJOR and MINOR are ignored for named pipes" \ |
| | 3471 | + USE_SELINUX( \ |
| | 3472 | + "\n -Z Set security context" \ |
| | 3473 | + ) |
| | 3474 | + |
| | 3475 | +#define mknod_example_usage \ |
| | 3476 | + "$ mknod /dev/fd0 b 2 0\n" \ |
| | 3477 | + "$ mknod -m 644 /tmp/pipe p\n" |
| | 3478 | + |
| | 3479 | +#define mkswap_trivial_usage \ |
| | 3480 | + "[-c] [-v0|-v1] device [block-count]" |
| | 3481 | +#define mkswap_full_usage \ |
| | 3482 | + "Prepare a disk partition to be used as swap partition" \ |
| | 3483 | + "\n\nOptions:\n" \ |
| | 3484 | + " -c Check for read-ability\n" \ |
| | 3485 | + " -v0 Make version 0 swap [max 128 Megs]\n" \ |
| | 3486 | + " -v1 Make version 1 swap [big!] (default for kernels > 2.1.117)\n" \ |
| | 3487 | + " block-count Number of block to use (default is entire partition)" |
| | 3488 | + |
| | 3489 | +#define mktemp_trivial_usage \ |
| | 3490 | + "[-dq] TEMPLATE" |
| | 3491 | +#define mktemp_full_usage \ |
| | 3492 | + "Create a temporary file with its name based on TEMPLATE.\n" \ |
| | 3493 | + "TEMPLATE is any name with six 'Xs' (i.e., /tmp/temp.XXXXXX)." \ |
| | 3494 | + "\n\nOptions:\n" \ |
| | 3495 | + " -d Make a directory instead of a file\n" \ |
| | 3496 | + " -q Fail silently if an error occurs" |
| | 3497 | +#define mktemp_example_usage \ |
| | 3498 | + "$ mktemp /tmp/temp.XXXXXX\n" \ |
| | 3499 | + "/tmp/temp.mWiLjM\n" \ |
| | 3500 | + "$ ls -la /tmp/temp.mWiLjM\n" \ |
| | 3501 | + "-rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM\n" |
| | 3502 | + |
| | 3503 | +#define modprobe_trivial_usage \ |
| | 3504 | + "[-knqrsv] MODULE [symbol=value ...]" |
| | 3505 | +#define modprobe_full_usage \ |
| | 3506 | + "Options:\n" \ |
| | 3507 | + " -k Make module autoclean-able\n" \ |
| | 3508 | + " -n Just show what would be done\n" \ |
| | 3509 | + " -q Quiet output\n" \ |
| | 3510 | + " -r Remove module (stacks) or do autoclean\n" \ |
| | 3511 | + " -s Report via syslog instead of stderr\n" \ |
| | 3512 | + " -v Verbose output" |
| | 3513 | +#define modprobe_notes_usage \ |
| | 3514 | +"modprobe can (un)load a stack of modules, passing each module options (when\n" \ |
| | 3515 | +"loading). modprobe uses a configuration file to determine what option(s) to\n" \ |
| | 3516 | +"pass each module it loads.\n" \ |
| | 3517 | +"\n" \ |
| | 3518 | +"The configuration file is searched (in order) amongst:\n" \ |
| | 3519 | +"\n" \ |
| | 3520 | +" /etc/modprobe.conf (2.6 only)\n" \ |
| | 3521 | +" /etc/modules.conf\n" \ |
| | 3522 | +" /etc/conf.modules (deprecated)\n" \ |
| | 3523 | +"\n" \ |
| | 3524 | +"They all have the same syntax (see below). If none is present, it is\n" \ |
| | 3525 | +"_not_ an error; each loaded module is then expected to load without\n" \ |
| | 3526 | +"options. Once a file is found, the others are tested for.\n" \ |
| | 3527 | +"\n" \ |
| | 3528 | +"/etc/modules.conf entry format:\n" \ |
| | 3529 | +"\n" \ |
| | 3530 | +" alias <alias_name> <mod_name>\n" \ |
| | 3531 | +" Makes it possible to modprobe alias_name, when there is no such module.\n" \ |
| | 3532 | +" It makes sense if your mod_name is long, or you want a more representative\n" \ |
| | 3533 | +" name for that module (eg. 'scsi' in place of 'aha7xxx').\n" \ |
| | 3534 | +" This makes it also possible to use a different set of options (below) for\n" \ |
| | 3535 | +" the module and the alias.\n" \ |
| | 3536 | +" A module can be aliased more than once.\n" \ |
| | 3537 | +"\n" \ |
| | 3538 | +" options <mod_name|alias_name> <symbol=value ...>\n" \ |
| | 3539 | +" When loading module mod_name (or the module aliased by alias_name), pass\n" \ |
| | 3540 | +" the \"symbol=value\" pairs as option to that module.\n" \ |
| | 3541 | +"\n" \ |
| | 3542 | +"Sample /etc/modules.conf file:\n" \ |
| | 3543 | +"\n" \ |
| | 3544 | +" options tulip irq=3\n" \ |
| | 3545 | +" alias tulip tulip2\n" \ |
| | 3546 | +" options tulip2 irq=4 io=0x308\n" \ |
| | 3547 | +"\n" \ |
| | 3548 | +"Other functionality offered by 'classic' modprobe is not available in\n" \ |
| | 3549 | +"this implementation.\n" \ |
| | 3550 | +"\n" \ |
| | 3551 | +"If module options are present both in the config file, and on the command line,\n" \ |
| | 3552 | +"then the options from the command line will be passed to the module _after_\n" \ |
| | 3553 | +"the options from the config file. That way, you can have defaults in the config\n" \ |
| | 3554 | +"file, and override them for a specific usage from the command line.\n" |
| | 3555 | +#define modprobe_example_usage \ |
| | 3556 | + "(with the above /etc/modules.conf):\n\n" \ |
| | 3557 | + "$ modprobe tulip\n" \ |
| | 3558 | + " will load the module 'tulip' with default option 'irq=3'\n\n" \ |
| | 3559 | + "$ modprobe tulip irq=5\n" \ |
| | 3560 | + " will load the module 'tulip' with option 'irq=5', thus overriding the default\n\n" \ |
| | 3561 | + "$ modprobe tulip2\n" \ |
| | 3562 | + " will load the module 'tulip' with default options 'irq=4 io=0x308',\n" \ |
| | 3563 | + " which are the default for alias 'tulip2'\n\n" \ |
| | 3564 | + "$ modprobe tulip2 irq=8\n" \ |
| | 3565 | + " will load the module 'tulip' with default options 'irq=4 io=0x308 irq=8',\n" \ |
| | 3566 | + " which are the default for alias 'tulip2' overridden by the option 'irq=8'\n\n" \ |
| | 3567 | + " from the command line\n\n" \ |
| | 3568 | + "$ modprobe tulip2 irq=2 io=0x210\n" \ |
| | 3569 | + " will load the module 'tulip' with default options 'irq=4 io=0x308 irq=4 io=0x210',\n" \ |
| | 3570 | + " which are the default for alias 'tulip2' overridden by the options 'irq=2 io=0x210'\n\n" \ |
| | 3571 | + " from the command line\n" |
| | 3572 | + |
| | 3573 | +#define more_trivial_usage \ |
| | 3574 | + "[FILE ...]" |
| | 3575 | +#define more_full_usage \ |
| | 3576 | + "View FILE or standard input one screenful at a time" |
| | 3577 | +#define more_example_usage \ |
| | 3578 | + "$ dmesg | more\n" |
| | 3579 | + |
| | 3580 | +#define mount_trivial_usage \ |
| | 3581 | + "[flags] DEVICE NODE [-o options,more-options]" |
| | 3582 | +#define mount_full_usage \ |
| | 3583 | + "Mount a filesystem. Filesystem autodetection requires /proc be mounted." \ |
| | 3584 | + "\n\nOptions:\n" \ |
| | 3585 | + " -a Mount all filesystems in fstab\n" \ |
| | 3586 | + USE_FEATURE_MTAB_SUPPORT( \ |
| | 3587 | + " -f \"Fake\" Add entry to mount table but don't mount it\n" \ |
| | 3588 | + " -n Don't write a mount table entry\n" \ |
| | 3589 | + ) \ |
| | 3590 | + " -o option One of many filesystem options, listed below\n" \ |
| | 3591 | + " -r Mount the filesystem read-only\n" \ |
| | 3592 | + " -t fs-type Specify the filesystem type\n" \ |
| | 3593 | + " -w Mount for reading and writing (default)\n" \ |
| | 3594 | + "\n" \ |
| | 3595 | + "Options for use with the \"-o\" flag:\n" \ |
| | 3596 | + USE_FEATURE_MOUNT_LOOP( \ |
| | 3597 | + " loop Ignored (loop devices are autodetected)\n" \ |
| | 3598 | + ) \ |
| | 3599 | + USE_FEATURE_MOUNT_FLAGS( \ |
| | 3600 | + " [a]sync Writes are asynchronous / synchronous\n" \ |
| | 3601 | + " [no]atime Disable / enable updates to inode access times\n" \ |
| | 3602 | + " [no]diratime Disable / enable atime updates to directories\n" \ |
| | 3603 | + " [no]dev Allow use of special device files / disallow them\n" \ |
| | 3604 | + " [no]exec Allow use of executable files / disallow them\n" \ |
| | 3605 | + " [no]suid Allow set-user-id-root programs / disallow them\n" \ |
| | 3606 | + " [r]shared Convert [recursively] to a shared subtree\n" \ |
| | 3607 | + " [r]slave Convert [recursively] to a slave subtree\n" \ |
| | 3608 | + " [r]private Convert [recursively] to a private subtree\n" \ |
| | 3609 | + " [un]bindable Make mount point [un]able to be bind mounted\n" \ |
| | 3610 | + " bind Bind a directory to an additional location\n" \ |
| | 3611 | + " move Relocate an existing mount point\n" \ |
| | 3612 | + ) \ |
| | 3613 | + " remount Remount a mounted filesystem, changing its flags\n" \ |
| | 3614 | + " ro/rw Mount for read-only / read-write\n" \ |
| | 3615 | + "\n" \ |
| | 3616 | + "There are EVEN MORE flags that are specific to each filesystem\n" \ |
| | 3617 | + "You'll have to see the written documentation for those filesystems" |
| | 3618 | +#define mount_example_usage \ |
| | 3619 | + "$ mount\n" \ |
| | 3620 | + "/dev/hda3 on / type minix (rw)\n" \ |
| | 3621 | + "proc on /proc type proc (rw)\n" \ |
| | 3622 | + "devpts on /dev/pts type devpts (rw)\n" \ |
| | 3623 | + "$ mount /dev/fd0 /mnt -t msdos -o ro\n" \ |
| | 3624 | + "$ mount /tmp/diskimage /opt -t ext2 -o loop\n" \ |
| | 3625 | + "$ mount cd_image.iso mydir\n" |
| | 3626 | +#define mount_notes_usage \ |
| | 3627 | + "Returns 0 for success, number of failed mounts for -a, or errno for one mount." |
| | 3628 | + |
| | 3629 | +#define mountpoint_trivial_usage \ |
| | 3630 | + "[-q] <[-d] DIR | -x DEVICE>" |
| | 3631 | +#define mountpoint_full_usage \ |
| | 3632 | + "mountpoint checks if the directory is a mountpoint" \ |
| | 3633 | + "\n\nOptions:\n" \ |
| | 3634 | + " -q Be more quiet\n" \ |
| | 3635 | + " -d Print major/minor device number of the filesystem\n" \ |
| | 3636 | + " -x Print major/minor device number of the blockdevice" |
| | 3637 | +#define mountpoint_example_usage \ |
| | 3638 | + "$ mountpoint /proc\n" \ |
| | 3639 | + "/proc is not a mountpoint\n" \ |
| | 3640 | + "$ mountpoint /sys\n" \ |
| | 3641 | + "/sys is a mountpoint\n" |
| | 3642 | + |
| | 3643 | +#define mt_trivial_usage \ |
| | 3644 | + "[-f device] opcode value" |
| | 3645 | +#define mt_full_usage \ |
| | 3646 | + "Control magnetic tape drive operation\n" \ |
| | 3647 | + "\nAvailable Opcodes:\n\n" \ |
| | 3648 | + "bsf bsfm bsr bss datacompression drvbuffer eof eom erase\n" \ |
| | 3649 | + "fsf fsfm fsr fss load lock mkpart nop offline ras1 ras2\n" \ |
| | 3650 | + "ras3 reset retension rewind rewoffline seek setblk setdensity\n" \ |
| | 3651 | + "setpart tell unload unlock weof wset" |
| | 3652 | + |
| | 3653 | +#define mv_trivial_usage \ |
| | 3654 | + "[OPTION]... SOURCE DEST\n" \ |
| | 3655 | + "or: mv [OPTION]... SOURCE... DIRECTORY" |
| | 3656 | +#define mv_full_usage \ |
| | 3657 | + "Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY" \ |
| | 3658 | + "\n\nOptions:\n" \ |
| | 3659 | + " -f Don't prompt before overwriting\n" \ |
| | 3660 | + " -i Interactive, prompt before overwrite" |
| | 3661 | +#define mv_example_usage \ |
| | 3662 | + "$ mv /tmp/foo /bin/bar\n" |
| | 3663 | + |
| | 3664 | +#define nameif_trivial_usage \ |
| | 3665 | + "[-s] [-c FILE] [{IFNAME MACADDR}]" |
| | 3666 | +#define nameif_full_usage \ |
| | 3667 | + "Rename network interface while it in the down state" \ |
| | 3668 | + "\n\nOptions:\n" \ |
| | 3669 | + " -c FILE Use configuration file (default is /etc/mactab)\n" \ |
| | 3670 | + " -s Use syslog (LOCAL0 facility)\n" \ |
| | 3671 | + " IFNAME MACADDR new_interface_name interface_mac_address" |
| | 3672 | +#define nameif_example_usage \ |
| | 3673 | + "$ nameif -s dmz0 00:A0:C9:8C:F6:3F\n" \ |
| | 3674 | + " or\n" \ |
| | 3675 | + "$ nameif -c /etc/my_mactab_file\n" \ |
| | 3676 | + |
| | 3677 | +#if ENABLE_NC_SERVER || ENABLE_NC_EXTRA |
| | 3678 | +#define NC_OPTIONS_STR "\n\nOptions:" |
| | 3679 | +#else |
| | 3680 | +#define NC_OPTIONS_STR |
| | 3681 | +#endif |
| | 3682 | + |
| | 3683 | +#define nc_trivial_usage \ |
| | 3684 | + USE_NC_EXTRA("[-iN] [-wN] ")USE_NC_SERVER("[-l] [-p PORT] ") \ |
| | 3685 | + "["USE_NC_EXTRA("-f FILENAME|")"IPADDR PORTNUM]"USE_NC_EXTRA(" [-e COMMAND]") |
| | 3686 | +#define nc_full_usage \ |
| | 3687 | + "Open a pipe to IP:port" USE_NC_EXTRA(" or file") \ |
| | 3688 | + NC_OPTIONS_STR \ |
| | 3689 | + USE_NC_EXTRA( \ |
| | 3690 | + "\n -e Exec rest of command line after connect" \ |
| | 3691 | + "\n -i SECS Delay interval for lines sent" \ |
| | 3692 | + "\n -w SECS Timeout for connect" \ |
| | 3693 | + "\n -f FILE Use file (ala /dev/ttyS0) instead of network" \ |
| | 3694 | + ) \ |
| | 3695 | + USE_NC_SERVER( \ |
| | 3696 | + "\n -l Listen mode, for inbound connects" \ |
| | 3697 | + USE_NC_EXTRA( \ |
| | 3698 | + "\n (use -l twice with -e for persistent server)") \ |
| | 3699 | + "\n -p PORT Local port number" \ |
| | 3700 | + ) |
| | 3701 | + |
| | 3702 | +#define nc_notes_usage "" \ |
| | 3703 | + USE_NC_EXTRA( \ |
| | 3704 | + "To use netcat as a terminal emulator on a serial port:\n\n" \ |
| | 3705 | + "$ stty 115200 -F /dev/ttyS0\n" \ |
| | 3706 | + "$ stty raw -echo -ctlecho && nc -f /dev/ttyS0\n" \ |
| | 3707 | + ) |
| | 3708 | + |
| | 3709 | +#define nc_example_usage \ |
| | 3710 | + "$ nc foobar.somedomain.com 25\n" \ |
| | 3711 | + "220 foobar ESMTP Exim 3.12 #1 Sat, 15 Apr 2000 00:03:02 -0600\n" \ |
| | 3712 | + "help\n" \ |
| | 3713 | + "214-Commands supported:\n" \ |
| | 3714 | + "214- HELO EHLO MAIL RCPT DATA AUTH\n" \ |
| | 3715 | + "214 NOOP QUIT RSET HELP\n" \ |
| | 3716 | + "quit\n" \ |
| | 3717 | + "221 foobar closing connection\n" |
| | 3718 | + |
| | 3719 | +#define netstat_trivial_usage \ |
| | 3720 | + "[-laenrtuwx]" |
| | 3721 | +#define netstat_full_usage \ |
| | 3722 | + "Display networking information" \ |
| | 3723 | + "\n\nOptions:\n" \ |
| | 3724 | + " -l Display listening server sockets\n" \ |
| | 3725 | + " -a Display all sockets (default: connected)\n" \ |
| | 3726 | + " -e Display other/more information\n" \ |
| | 3727 | + " -n Don't resolve names\n" \ |
| | 3728 | + " -r Display routing table\n" \ |
| | 3729 | + " -t Tcp sockets\n" \ |
| | 3730 | + " -u Udp sockets\n" \ |
| | 3731 | + " -w Raw sockets\n" \ |
| | 3732 | + " -x Unix sockets" |
| | 3733 | + |
| | 3734 | +#define nice_trivial_usage \ |
| | 3735 | + "[-n ADJUST] [COMMAND [ARG] ...]" |
| | 3736 | +#define nice_full_usage \ |
| | 3737 | + "Run a program with modified scheduling priority" \ |
| | 3738 | + "\n\nOptions:\n" \ |
| | 3739 | + " -n ADJUST Adjust the scheduling priority by ADJUST" |
| | 3740 | + |
| | 3741 | +#define nmeter_trivial_usage \ |
| | 3742 | + "format_string" |
| | 3743 | +#define nmeter_full_usage \ |
| | 3744 | + "Monitor system in real time\n\n" \ |
| | 3745 | + "Format specifiers:\n" \ |
| | 3746 | + "%Nc or %[cN] Monitor CPU. N - bar size, default 10\n" \ |
| | 3747 | + " (displays: S:system U:user N:niced D:iowait I:irq i:softirq)\n" \ |
| | 3748 | + "%[niface] Monitor network interface 'iface'\n" \ |
| | 3749 | + "%m Monitor allocated memory\n" \ |
| | 3750 | + "%[mf] Monitor free memory\n" \ |
| | 3751 | + "%[mt] Monitor total memory\n" \ |
| | 3752 | + "%s Monitor allocated swap\n" \ |
| | 3753 | + "%f Monitor number of used file descriptors\n" \ |
| | 3754 | + "%Ni Monitor total/specific IRQ rate\n" \ |
| | 3755 | + "%x Monitor context switch rate\n" \ |
| | 3756 | + "%p Monitor forks\n" \ |
| | 3757 | + "%[pn] Monitor # of processes\n" \ |
| | 3758 | + "%b Monitor block io\n" \ |
| | 3759 | + "%Nt Show time (with N decimal points)\n" \ |
| | 3760 | + "%Nd Milliseconds between updates (default=1000)\n" \ |
| | 3761 | + "%r Print <cr> instead of <lf> at EOL" |
| | 3762 | +#define nmeter_example_usage \ |
| | 3763 | + "nmeter '%250d%t %20c int %i bio %b mem %m forks%p'" |
| | 3764 | + |
| | 3765 | +#define nohup_trivial_usage \ |
| | 3766 | + "COMMAND [ARGS]" |
| | 3767 | +#define nohup_full_usage \ |
| | 3768 | + "Run a command immune to hangups, with output to a non-tty" |
| | 3769 | +#define nohup_example_usage \ |
| | 3770 | + "$ nohup make &" |
| | 3771 | + |
| | 3772 | +#define nslookup_trivial_usage \ |
| | 3773 | + "[HOST] [SERVER]" |
| | 3774 | +#define nslookup_full_usage \ |
| | 3775 | + "Query the nameserver for the IP address of the given HOST\n" \ |
| | 3776 | + "optionally using a specified DNS server" |
| | 3777 | +#define nslookup_example_usage \ |
| | 3778 | + "$ nslookup localhost\n" \ |
| | 3779 | + "Server: default\n" \ |
| | 3780 | + "Address: default\n" \ |
| | 3781 | + "\n" \ |
| | 3782 | + "Name: debian\n" \ |
| | 3783 | + "Address: 127.0.0.1\n" |
| | 3784 | + |
| | 3785 | +#define od_trivial_usage \ |
| | 3786 | + "[-aBbcDdeFfHhIiLlOovXx] [FILE]" |
| | 3787 | +#define od_full_usage \ |
| | 3788 | + "Write an unambiguous representation, octal bytes by default, of FILE\n" \ |
| | 3789 | + "to standard output. With no FILE, or when FILE is -, read standard input." |
| | 3790 | + |
| | 3791 | +#define openvt_trivial_usage \ |
| | 3792 | + "<vtnum> <COMMAND> [ARGS...]" |
| | 3793 | +#define openvt_full_usage \ |
| | 3794 | + "Start a command on a new virtual terminal" |
| | 3795 | +#define openvt_example_usage \ |
| | 3796 | + "openvt 2 /bin/ash\n" |
| | 3797 | + |
| | 3798 | +#define passwd_trivial_usage \ |
| | 3799 | + "[OPTION] [name]" |
| | 3800 | +#define passwd_full_usage \ |
| | 3801 | + "Change a user password. If no name is specified,\n" \ |
| | 3802 | + "changes the password for the current user." \ |
| | 3803 | + "\n\nOptions:\n" \ |
| | 3804 | + " -a Define which algorithm shall be used for the password\n" \ |
| | 3805 | + " (choices: des, md5)\n" /* ", sha1)" */ \ |
| | 3806 | + " -d Delete the password for the specified user account\n" \ |
| | 3807 | + " -l Locks (disables) the specified user account\n" \ |
| | 3808 | + " -u Unlocks (re-enables) the specified user account" |
| | 3809 | + |
| | 3810 | +#define patch_trivial_usage \ |
| | 3811 | + "[-p<num>] [-i <diff>]" |
| | 3812 | +#define patch_full_usage \ |
| | 3813 | + " -p NUM Strip NUM leading components from file names\n" \ |
| | 3814 | + " -i DIFF Read DIFF instead of stdin" |
| | 3815 | +#define patch_example_usage \ |
| | 3816 | + "$ patch -p1 < example.diff\n" \ |
| | 3817 | + "$ patch -p0 -i example.diff" |
| | 3818 | + |
| | 3819 | +#if (ENABLE_FEATURE_PIDOF_SINGLE || ENABLE_FEATURE_PIDOF_OMIT) |
| | 3820 | +#define USAGE_PIDOF "Options:" |
| | 3821 | +#else |
| | 3822 | +#define USAGE_PIDOF "\nThis version of pidof accepts no options." |
| | 3823 | +#endif |
| | 3824 | + |
| | 3825 | +#define pidof_trivial_usage \ |
| | 3826 | + "process-name [OPTION] [process-name ...]" |
| | 3827 | + |
| | 3828 | +#define pidof_full_usage \ |
| | 3829 | + "List the PIDs of all processes with names that match the\n" \ |
| | 3830 | + "names on the command line\n" \ |
| | 3831 | + USAGE_PIDOF \ |
| | 3832 | + USE_FEATURE_PIDOF_SINGLE( \ |
| | 3833 | + "\n -s Display only a single PID") \ |
| | 3834 | + USE_FEATURE_PIDOF_OMIT( \ |
| | 3835 | + "\n -o Omit given pid") \ |
| | 3836 | + USE_FEATURE_PIDOF_OMIT( \ |
| | 3837 | + "\n Use %PPID to omit the parent pid of pidof itself") |
| | 3838 | +#define pidof_example_usage \ |
| | 3839 | + "$ pidof init\n" \ |
| | 3840 | + "1\n" \ |
| | 3841 | + USE_FEATURE_PIDOF_OMIT( \ |
| | 3842 | + "$ pidof /bin/sh\n20351 5973 5950\n") \ |
| | 3843 | + USE_FEATURE_PIDOF_OMIT( \ |
| | 3844 | + "$ pidof /bin/sh -o %PPID\n20351 5950") |
| | 3845 | + |
| | 3846 | +#ifndef CONFIG_FEATURE_FANCY_PING |
| | 3847 | +#define ping_trivial_usage \ |
| | 3848 | + "host" |
| | 3849 | +#define ping_full_usage \ |
| | 3850 | + "Send ICMP ECHO_REQUEST packets to network hosts" |
| | 3851 | +#define ping6_trivial_usage \ |
| | 3852 | + "host" |
| | 3853 | +#define ping6_full_usage \ |
| | 3854 | + "Send ICMP ECHO_REQUEST packets to network hosts" |
| | 3855 | +#else |
| | 3856 | +#define ping_trivial_usage \ |
| | 3857 | + "[OPTION]... host" |
| | 3858 | +#define ping_full_usage \ |
| | 3859 | + "Send ICMP ECHO_REQUEST packets to network hosts" \ |
| | 3860 | + "\n\nOptions:\n" \ |
| | 3861 | + " -4, -6 Force IPv4 or IPv6 hostname resolution\n" \ |
| | 3862 | + " -c CNT Send only CNT pings\n" \ |
| | 3863 | + " -s SIZE Send SIZE data bytes in packets (default=56)\n" \ |
| | 3864 | + " -I iface/IP Use interface or IP address as source\n" \ |
| | 3865 | + " -q Quiet mode, only displays output at start\n" \ |
| | 3866 | + " and when finished" |
| | 3867 | +#define ping6_trivial_usage \ |
| | 3868 | + "[OPTION]... host" |
| | 3869 | +#define ping6_full_usage \ |
| | 3870 | + "Send ICMP ECHO_REQUEST packets to network hosts" \ |
| | 3871 | + "\n\nOptions:\n" \ |
| | 3872 | + " -c CNT Send only CNT pings\n" \ |
| | 3873 | + " -s SIZE Send SIZE data bytes in packets (default=56)\n" \ |
| | 3874 | + " -I iface/IP Use interface or IP address as source\n" \ |
| | 3875 | + " -q Quiet mode, only displays output at start\n" \ |
| | 3876 | + " and when finished" |
| | 3877 | +#endif |
| | 3878 | +#define ping_example_usage \ |
| | 3879 | + "$ ping localhost\n" \ |
| | 3880 | + "PING slag (127.0.0.1): 56 data bytes\n" \ |
| | 3881 | + "64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=20.1 ms\n" \ |
| | 3882 | + "\n" \ |
| | 3883 | + "--- debian ping statistics ---\n" \ |
| | 3884 | + "1 packets transmitted, 1 packets received, 0% packet loss\n" \ |
| | 3885 | + "round-trip min/avg/max = 20.1/20.1/20.1 ms\n" |
| | 3886 | +#define ping6_example_usage \ |
| | 3887 | + "$ ping6 ip6-localhost\n" \ |
| | 3888 | + "PING ip6-localhost (::1): 56 data bytes\n" \ |
| | 3889 | + "64 bytes from ::1: icmp6_seq=0 ttl=64 time=20.1 ms\n" \ |
| | 3890 | + "\n" \ |
| | 3891 | + "--- ip6-localhost ping statistics ---\n" \ |
| | 3892 | + "1 packets transmitted, 1 packets received, 0% packet loss\n" \ |
| | 3893 | + "round-trip min/avg/max = 20.1/20.1/20.1 ms\n" |
| | 3894 | + |
| | 3895 | +#define pivot_root_trivial_usage \ |
| | 3896 | + "NEW_ROOT PUT_OLD" |
| | 3897 | +#define pivot_root_full_usage \ |
| | 3898 | + "Move the current root file system to PUT_OLD and make NEW_ROOT\n" \ |
| | 3899 | + "the new root file system" |
| | 3900 | + |
| | 3901 | +#define poweroff_trivial_usage \ |
| | 3902 | + "[-d<delay>] [-n<nosync>] [-f<force>]" |
| | 3903 | +#define poweroff_full_usage \ |
| | 3904 | + "Halt and shut off power" \ |
| | 3905 | + "\n\nOptions:\n" \ |
| | 3906 | + " -d Delay interval for halting\n" \ |
| | 3907 | + " -n No call to sync()\n" \ |
| | 3908 | + " -f Force power off (don't go through init)" |
| | 3909 | + |
| | 3910 | +#define printenv_trivial_usage \ |
| | 3911 | + "[VARIABLES...]" |
| | 3912 | +#define printenv_full_usage \ |
| | 3913 | + "Print all or part of environment.\n" \ |
| | 3914 | + "If no environment VARIABLE specified, print them all." |
| | 3915 | + |
| | 3916 | +#define printf_trivial_usage \ |
| | 3917 | + "FORMAT [ARGUMENT...]" |
| | 3918 | +#define printf_full_usage \ |
| | 3919 | + "Format and print ARGUMENT(s) according to FORMAT,\n" \ |
| | 3920 | + "where FORMAT controls the output exactly as in C printf" |
| | 3921 | +#define printf_example_usage \ |
| | 3922 | + "$ printf \"Val=%d\\n\" 5\n" \ |
| | 3923 | + "Val=5\n" |
| | 3924 | + |
| | 3925 | + |
| | 3926 | +#if ENABLE_DESKTOP |
| | 3927 | + |
| | 3928 | +#define ps_trivial_usage \ |
| | 3929 | + "" |
| | 3930 | +#define ps_full_usage \ |
| | 3931 | + "Report process status" \ |
| | 3932 | + "\n\nOptions:" \ |
| | 3933 | + "\n -o col1,col2=header Select columns for display" \ |
| | 3934 | + |
| | 3935 | +#else /* !ENABLE_DESKTOP */ |
| | 3936 | + |
| | 3937 | +#if !defined CONFIG_SELINUX && !ENABLE_FEATURE_PS_WIDE |
| | 3938 | +#define USAGE_PS "\nThis version of ps accepts no options" |
| | 3939 | +#else |
| | 3940 | +#define USAGE_PS "\nOptions:" |
| | 3941 | +#endif |
| | 3942 | + |
| | 3943 | +#define ps_trivial_usage \ |
| | 3944 | + "" |
| | 3945 | +#define ps_full_usage \ |
| | 3946 | + "Report process status\n" \ |
| | 3947 | + USAGE_PS \ |
| | 3948 | + USE_SELINUX( \ |
| | 3949 | + "\n -Z Show SE Linux context") \ |
| | 3950 | + USE_FEATURE_PS_WIDE( \ |
| | 3951 | + "\n w Wide output") |
| | 3952 | + |
| | 3953 | +#endif /* ENABLE_DESKTOP */ |
| | 3954 | + |
| | 3955 | +#define ps_example_usage \ |
| | 3956 | + "$ ps\n" \ |
| | 3957 | + " PID Uid Gid State Command\n" \ |
| | 3958 | + " 1 root root S init\n" \ |
| | 3959 | + " 2 root root S [kflushd]\n" \ |
| | 3960 | + " 3 root root S [kupdate]\n" \ |
| | 3961 | + " 4 root root S [kpiod]\n" \ |
| | 3962 | + " 5 root root S [kswapd]\n" \ |
| | 3963 | + " 742 andersen andersen S [bash]\n" \ |
| | 3964 | + " 743 andersen andersen S -bash\n" \ |
| | 3965 | + " 745 root root S [getty]\n" \ |
| | 3966 | + " 2990 andersen andersen R ps\n" |
| | 3967 | + |
| | 3968 | + |
| | 3969 | +#define pwd_trivial_usage \ |
| | 3970 | + "" |
| | 3971 | +#define pwd_full_usage \ |
| | 3972 | + "Print the full filename of the current working directory" |
| | 3973 | +#define pwd_example_usage \ |
| | 3974 | + "$ pwd\n" \ |
| | 3975 | + "/root\n" |
| | 3976 | + |
| | 3977 | +#define raidautorun_trivial_usage \ |
| | 3978 | + "DEVICE" |
| | 3979 | +#define raidautorun_full_usage \ |
| | 3980 | + "Tell the kernel to automatically search and start RAID arrays" |
| | 3981 | +#define raidautorun_example_usage \ |
| | 3982 | + "$ raidautorun /dev/md0" |
| | 3983 | + |
| | 3984 | +#define rdate_trivial_usage \ |
| | 3985 | + "[-sp] HOST" |
| | 3986 | +#define rdate_full_usage \ |
| | 3987 | + "Get and possibly set the system date and time from a remote HOST" \ |
| | 3988 | + "\n\nOptions:\n" \ |
| | 3989 | + " -s Set the system date and time (default)\n" \ |
| | 3990 | + " -p Print the date and time" |
| | 3991 | + |
| | 3992 | +#define readahead_trivial_usage \ |
| | 3993 | + "[FILE]..." |
| | 3994 | +#define readahead_full_usage \ |
| | 3995 | + "Preload FILE(s) in RAM cache so that subsequent reads for those" \ |
| | 3996 | + "files do not block on disk I/O" |
| | 3997 | + |
| | 3998 | +#define readlink_trivial_usage \ |
| | 3999 | + USE_FEATURE_READLINK_FOLLOW("[-f] ") "FILE" |
| | 4000 | +#define readlink_full_usage \ |
| | 4001 | + "Display the value of a symlink" \ |
| | 4002 | + USE_FEATURE_READLINK_FOLLOW( \ |
| | 4003 | + "\n\nOptions:\n" \ |
| | 4004 | + " -f Canonicalize by following all symlinks") |
| | 4005 | + |
| | 4006 | +#define readprofile_trivial_usage \ |
| | 4007 | + "[OPTIONS]..." |
| | 4008 | +#define readprofile_full_usage \ |
| | 4009 | + "Options:\n" \ |
| | 4010 | + " -m <mapfile> (Default: /boot/System.map)\n" \ |
| | 4011 | + " -p <profile> (Default: /proc/profile)\n" \ |
| | 4012 | + " -M <mult> Set the profiling multiplier to <mult>\n" \ |
| | 4013 | + " -i Print only info about the sampling step\n" \ |
| | 4014 | + " -v Print verbose data\n" \ |
| | 4015 | + " -a Print all symbols, even if count is 0\n" \ |
| | 4016 | + " -b Print individual histogram-bin counts\n" \ |
| | 4017 | + " -s Print individual counters within functions\n" \ |
| | 4018 | + " -r Reset all the counters (root only)\n" \ |
| | 4019 | + " -n Disable byte order auto-detection" |
| | 4020 | + |
| | 4021 | +#define realpath_trivial_usage \ |
| | 4022 | + "pathname ..." |
| | 4023 | +#define realpath_full_usage \ |
| | 4024 | + "Return the absolute pathnames of given argument" |
| | 4025 | + |
| | 4026 | +#define reboot_trivial_usage \ |
| | 4027 | + "[-d<delay>] [-n<nosync>] [-f<force>]" |
| | 4028 | +#define reboot_full_usage \ |
| | 4029 | + "Reboot the system" \ |
| | 4030 | + "\n\nOptions:\n" \ |
| | 4031 | + " -d Delay interval for rebooting\n" \ |
| | 4032 | + " -n No call to sync()\n" \ |
| | 4033 | + " -f Force reboot (don't go through init)" |
| | 4034 | + |
| | 4035 | +#define renice_trivial_usage \ |
| | 4036 | + "{{-n INCREMENT} | PRIORITY} [[ -p | -g | -u ] ID ...]" |
| | 4037 | +#define renice_full_usage \ |
| | 4038 | + "Change priority of running processes" \ |
| | 4039 | + "\n\nOptions:\n" \ |
| | 4040 | + " -n Adjusts current nice value (smaller is faster)\n" \ |
| | 4041 | + " -p Process id(s) (default)\n" \ |
| | 4042 | + " -g Process group id(s)\n" \ |
| | 4043 | + " -u Process user name(s) and/or id(s)" |
| | 4044 | + |
| | 4045 | +#define reset_trivial_usage \ |
| | 4046 | + "" |
| | 4047 | +#define reset_full_usage \ |
| | 4048 | + "Reset the screen" |
| | 4049 | + |
| | 4050 | +#define resize_trivial_usage \ |
| | 4051 | + "" |
| | 4052 | +#define resize_full_usage \ |
| | 4053 | + "Resize the screen" |
| | 4054 | + |
| | 4055 | +#define rm_trivial_usage \ |
| | 4056 | + "[OPTION]... FILE..." |
| | 4057 | +#define rm_full_usage \ |
| | 4058 | + "Remove (unlink) the FILE(s). You may use '--' to\n" \ |
| | 4059 | + "indicate that all following arguments are non-options." \ |
| | 4060 | + "\n\nOptions:\n" \ |
| | 4061 | + " -i Always prompt before removing each destination\n" \ |
| | 4062 | + " -f Remove existing destinations, never prompt\n" \ |
| | 4063 | + " -r,-R Remove the contents of directories recursively" |
| | 4064 | +#define rm_example_usage \ |
| | 4065 | + "$ rm -rf /tmp/foo\n" |
| | 4066 | + |
| | 4067 | +#define rmdir_trivial_usage \ |
| | 4068 | + "[OPTION]... DIRECTORY..." |
| | 4069 | +#define rmdir_full_usage \ |
| | 4070 | + "Remove the DIRECTORY, if it is empty" |
| | 4071 | +#define rmdir_example_usage \ |
| | 4072 | + "# rmdir /tmp/foo\n" |
| | 4073 | + |
| | 4074 | +#define rmmod_trivial_usage \ |
| | 4075 | + "[OPTION]... [MODULE]..." |
| | 4076 | +#define rmmod_full_usage \ |
| | 4077 | + "Unload the specified kernel modules from the kernel" \ |
| | 4078 | + "\n\nOptions:\n" \ |
| | 4079 | + " -a Remove all unused modules (recursively)" |
| | 4080 | +#define rmmod_example_usage \ |
| | 4081 | + "$ rmmod tulip\n" |
| | 4082 | + |
| | 4083 | +#define route_trivial_usage \ |
| | 4084 | + "[{add|del|delete}]" |
| | 4085 | +#define route_full_usage \ |
| | 4086 | + "Edit the kernel's routing tables" \ |
| | 4087 | + "\n\nOptions:\n" \ |
| | 4088 | + " -n Dont resolve names\n" \ |
| | 4089 | + " -e Display other/more information\n" \ |
| | 4090 | + " -A inet" USE_FEATURE_IPV6("{6}") " Select address family" |
| | 4091 | + |
| | 4092 | +#define rpm_trivial_usage \ |
| | 4093 | + "-i -q[ildc]p package.rpm" |
| | 4094 | +#define rpm_full_usage \ |
| | 4095 | + "Manipulate RPM packages" \ |
| | 4096 | + "\n\nOptions:" \ |
| | 4097 | + "\n -i Install package" \ |
| | 4098 | + "\n -q Query package" \ |
| | 4099 | + "\n -p Query uninstalled package" \ |
| | 4100 | + "\n -i Show information" \ |
| | 4101 | + "\n -l List contents" \ |
| | 4102 | + "\n -d List documents" \ |
| | 4103 | + "\n -c List config files" |
| | 4104 | + |
| | 4105 | +#define rpm2cpio_trivial_usage \ |
| | 4106 | + "package.rpm" |
| | 4107 | +#define rpm2cpio_full_usage \ |
| | 4108 | + "Output a cpio archive of the rpm file" |
| | 4109 | + |
| | 4110 | +#define runcon_trivial_usage \ |
| | 4111 | + "[-c] [-u USER] [-r ROLE] [-t TYPE] [-l RANGE] COMMAND [args]\n" \ |
| | 4112 | + " runcon CONTEXT COMMAND [args]" |
| | 4113 | +#define runcon_full_usage \ |
| | 4114 | + "runcon [-c] [-u USER] [-r ROLE] [-t TYPE] [-l RANGE] COMMAND [args]\n" \ |
| | 4115 | + "runcon CONTEXT COMMAND [args]\n" \ |
| | 4116 | + "Run a program in a different security context\n\n" \ |
| | 4117 | + " CONTEXT Complete security context\n" \ |
| | 4118 | + " -c, --compute Compute process transition context before modifying\n" \ |
| | 4119 | + " -t, --type=TYPE Type (for same role as parent)\n" \ |
| | 4120 | + " -u, --user=USER User identity\n" \ |
| | 4121 | + " -r, --role=ROLE Role\n" \ |
| | 4122 | + " -l, --range=RNG Levelrange" \ |
| | 4123 | + |
| | 4124 | +#define run_parts_trivial_usage \ |
| | 4125 | + "[-t] [-a ARG] [-u MASK] DIRECTORY" |
| | 4126 | +#define run_parts_full_usage \ |
| | 4127 | + "Run a bunch of scripts in a directory" \ |
| | 4128 | + "\n\nOptions:\n" \ |
| | 4129 | + " -t Prints what would be run, but does not actually run anything\n" \ |
| | 4130 | + " -a ARG Pass ARG as an argument for every program invoked\n" \ |
| | 4131 | + " -u MASK Set the umask to MASK before executing every program" |
| | 4132 | + |
| | 4133 | +#define runlevel_trivial_usage \ |
| | 4134 | + "[utmp]" |
| | 4135 | +#define runlevel_full_usage \ |
| | 4136 | + "Find the current and previous system runlevel.\n\n" \ |
| | 4137 | + "If no utmp file exists or if no runlevel record can be found,\n" \ |
| | 4138 | + "print \"unknown\"" |
| | 4139 | +#define runlevel_example_usage \ |
| | 4140 | + "$ runlevel /var/run/utmp\n" \ |
| | 4141 | + "N 2" |
| | 4142 | + |
| | 4143 | +#define runsv_trivial_usage \ |
| | 4144 | + "dir" |
| | 4145 | +#define runsv_full_usage \ |
| | 4146 | + "Start and monitor a service and optionally an appendant log service" |
| | 4147 | + |
| | 4148 | +#define runsvdir_trivial_usage \ |
| | 4149 | + "[-P] dir" |
| | 4150 | +#define runsvdir_full_usage \ |
| | 4151 | + "Start a runsv process for each subdirectory" |
| | 4152 | + |
| | 4153 | +#define rx_trivial_usage \ |
| | 4154 | + "FILE" |
| | 4155 | +#define rx_full_usage \ |
| | 4156 | + "Receive a file using the xmodem protocol" |
| | 4157 | +#define rx_example_usage \ |
| | 4158 | + "$ rx /tmp/foo\n" |
| | 4159 | + |
| | 4160 | +#define sed_trivial_usage \ |
| | 4161 | + "[-efinr] pattern [files...]" |
| | 4162 | +#define sed_full_usage \ |
| | 4163 | + "Options:\n" \ |
| | 4164 | + " -e script Add the script to the commands to be executed\n" \ |
| | 4165 | + " -f scriptfile Add script-file contents to the\n" \ |
| | 4166 | + " commands to be executed\n" \ |
| | 4167 | + " -i Edit files in-place\n" \ |
| | 4168 | + " -n Suppress automatic printing of pattern space\n" \ |
| | 4169 | + " -r Use extended regular expression syntax\n" \ |
| | 4170 | + "\n" \ |
| | 4171 | + "If no -e or -f is given, the first non-option argument is taken as the sed\n" \ |
| | 4172 | + "script to interpret. All remaining arguments are names of input files; if no\n" \ |
| | 4173 | + "input files are specified, then the standard input is read. Source files\n" \ |
| | 4174 | + "will not be modified unless -i option is given." |
| | 4175 | + |
| | 4176 | +#define sed_example_usage \ |
| | 4177 | + "$ echo \"foo\" | sed -e 's/f[a-zA-Z]o/bar/g'\n" \ |
| | 4178 | + "bar\n" |
| | 4179 | + |
| | 4180 | +#define selinuxenabled_trivial_usage |
| | 4181 | +#define selinuxenabled_full_usage |
| | 4182 | + |
| | 4183 | +#define seq_trivial_usage \ |
| | 4184 | + "[first [increment]] last" |
| | 4185 | +#define seq_full_usage \ |
| | 4186 | + "Print numbers from FIRST to LAST, in steps of INCREMENT.\n" \ |
| | 4187 | + "FIRST, INCREMENT default to 1" \ |
| | 4188 | + "\n\nArguments:\n" \ |
| | 4189 | + " LAST\n" \ |
| | 4190 | + " FIRST LAST\n" \ |
| | 4191 | + " FIRST INCREMENT LAST" |
| | 4192 | + |
| | 4193 | +#define setconsole_trivial_usage \ |
| | 4194 | + "[-r|--reset] [DEVICE]" |
| | 4195 | +#define setconsole_full_usage \ |
| | 4196 | + "Redirect system console output to DEVICE (default: /dev/tty)" \ |
| | 4197 | + "\n\nOptions:\n" \ |
| | 4198 | + " -r Reset output to /dev/console" |
| | 4199 | + |
| | 4200 | +#define setenforce_trivial_usage \ |
| | 4201 | + "[ Enforcing | Permissive | 1 | 0 ]" |
| | 4202 | +#define setenforce_full_usage |
| | 4203 | + |
| | 4204 | +#define setkeycodes_trivial_usage \ |
| | 4205 | + "SCANCODE KEYCODE ..." |
| | 4206 | +#define setkeycodes_full_usage \ |
| | 4207 | + "Set entries into the kernel's scancode-to-keycode map,\n" \ |
| | 4208 | + "allowing unusual keyboards to generate usable keycodes.\n\n" \ |
| | 4209 | + "SCANCODE may be either xx or e0xx (hexadecimal),\n" \ |
| | 4210 | + "and KEYCODE is given in decimal" |
| | 4211 | +#define setkeycodes_example_usage \ |
| | 4212 | + "$ setkeycodes e030 127\n" |
| | 4213 | + |
| | 4214 | +#define setlogcons_trivial_usage \ |
| | 4215 | + "N" |
| | 4216 | +#define setlogcons_full_usage \ |
| | 4217 | + "Redirect the kernel output to console N (0 for current)" |
| | 4218 | + |
| | 4219 | +#define setsid_trivial_usage \ |
| | 4220 | + "program [arg ...]" |
| | 4221 | +#define setsid_full_usage \ |
| | 4222 | + "Run any program in a new session by calling setsid() before\n" \ |
| | 4223 | + "exec'ing the rest of its arguments. See setsid(2) for details." |
| | 4224 | + |
| | 4225 | +#define lash_trivial_usage \ |
| | 4226 | + "[FILE]...\n" \ |
| | 4227 | + "or: sh -c command [args]..." |
| | 4228 | +#define lash_full_usage \ |
| | 4229 | + "The BusyBox LAme SHell (command interpreter)" |
| | 4230 | +#define lash_notes_usage \ |
| | 4231 | + "This command does not yet have proper documentation.\n\n" \ |
| | 4232 | + "Use lash just as you would use any other shell. It properly handles pipes,\n" \ |
| | 4233 | + "redirects, job control, can be used as the shell for scripts, and has a\n" \ |
| | 4234 | + "sufficient set of builtins to do what is needed. It does not (yet) support\n" \ |
| | 4235 | + "Bourne Shell syntax. If you need things like \"if-then-else\", \"while\", and such\n" \ |
| | 4236 | + "use ash or bash. If you just need a very simple and extremely small shell,\n" \ |
| | 4237 | + "this will do the job." |
| | 4238 | + |
| | 4239 | +#define last_trivial_usage \ |
| | 4240 | + "" |
| | 4241 | +#define last_full_usage \ |
| | 4242 | + "Show listing of the last users that logged into the system" |
| | 4243 | + |
| | 4244 | +#define sha1sum_trivial_usage \ |
| | 4245 | + "[OPTION] [FILEs...]" \ |
| | 4246 | + USE_FEATURE_MD5_SHA1_SUM_CHECK("\n or: sha1sum [OPTION] -c [FILE]") |
| | 4247 | +#define sha1sum_full_usage \ |
| | 4248 | + "Print" USE_FEATURE_MD5_SHA1_SUM_CHECK(" or check") " SHA1 checksums.\n" \ |
| | 4249 | + "With no FILE, or when FILE is -, read standard input." \ |
| | 4250 | + "\n\nOptions:\n" \ |
| | 4251 | + USE_FEATURE_MD5_SHA1_SUM_CHECK( \ |
| | 4252 | + " -c Check SHA1 sums against given list\n" \ |
| | 4253 | + "\nThe following two options are useful only when verifying checksums:\n" \ |
| | 4254 | + " -s Don't output anything, status code shows success\n" \ |
| | 4255 | + " -w Warn about improperly formatted SHA1 checksum lines") |
| | 4256 | + |
| | 4257 | +#define sleep_trivial_usage \ |
| | 4258 | + USE_FEATURE_FANCY_SLEEP("[") "N" USE_FEATURE_FANCY_SLEEP("]...") |
| | 4259 | +#define sleep_full_usage \ |
| | 4260 | + SKIP_FEATURE_FANCY_SLEEP("Pause for N seconds") \ |
| | 4261 | + USE_FEATURE_FANCY_SLEEP( \ |
| | 4262 | + "Pause for a time equal to the total of the args given, where each arg can\n" \ |
| | 4263 | + "have an optional suffix of (s)econds, (m)inutes, (h)ours, or (d)ays") |
| | 4264 | +#define sleep_example_usage \ |
| | 4265 | + "$ sleep 2\n" \ |
| | 4266 | + "[2 second delay results]\n" \ |
| | 4267 | + USE_FEATURE_FANCY_SLEEP( \ |
| | 4268 | + "$ sleep 1d 3h 22m 8s\n" \ |
| | 4269 | + "[98528 second delay results]\n") |
| | 4270 | + |
| | 4271 | +#define sort_trivial_usage \ |
| | 4272 | + "[-nru" \ |
| | 4273 | + USE_FEATURE_SORT_BIG("gMcszbdfimSTokt] [-o outfile] [-k start[.offset][opts][,end[.offset][opts]] [-t char") \ |
| | 4274 | + "] [FILE]..." |
| | 4275 | +#define sort_full_usage \ |
| | 4276 | + "Sort lines of text in the specified files" \ |
| | 4277 | + "\n\nOptions:\n" \ |
| | 4278 | + USE_FEATURE_SORT_BIG( \ |
| | 4279 | + " -b Ignore leading blanks\n" \ |
| | 4280 | + " -c Check whether input is sorted\n" \ |
| | 4281 | + " -d Dictionary order (blank or alphanumeric only)\n" \ |
| | 4282 | + " -f Ignore case\n" \ |
| | 4283 | + " -g General numerical sort\n" \ |
| | 4284 | + " -i Ignore unprintable characters\n" \ |
| | 4285 | + " -k Specify sort key\n" \ |
| | 4286 | + " -M Sort month\n") \ |
| | 4287 | + " -n Sort numbers\n" \ |
| | 4288 | + USE_FEATURE_SORT_BIG( \ |
| | 4289 | + " -o Output to file\n" \ |
| | 4290 | + " -k Sort by key\n" \ |
| | 4291 | + " -t Use key separator other than whitespace\n") \ |
| | 4292 | + " -r Reverse sort order\n" \ |
| | 4293 | + USE_FEATURE_SORT_BIG( \ |
| | 4294 | + " -s Stable (don't sort ties alphabetically)\n") \ |
| | 4295 | + " -u Suppress duplicate lines" \ |
| | 4296 | + USE_FEATURE_SORT_BIG( \ |
| | 4297 | + "\n -z Input terminated by nulls, not newlines\n") \ |
| | 4298 | + USE_FEATURE_SORT_BIG( \ |
| | 4299 | + " -mST Ignored for GNU compatibility") \ |
| | 4300 | + "" |
| | 4301 | +#define sort_example_usage \ |
| | 4302 | + "$ echo -e \"e\\nf\\nb\\nd\\nc\\na\" | sort\n" \ |
| | 4303 | + "a\n" \ |
| | 4304 | + "b\n" \ |
| | 4305 | + "c\n" \ |
| | 4306 | + "d\n" \ |
| | 4307 | + "e\n" \ |
| | 4308 | + "f\n" \ |
| | 4309 | + USE_FEATURE_SORT_BIG( \ |
| | 4310 | + "$ echo -e \"c 3\\nb 2\\nd 2\" | $SORT -k 2,2n -k 1,1r\n" \ |
| | 4311 | + "d 2\n" \ |
| | 4312 | + "b 2\n" \ |
| | 4313 | + "c 3\n" \ |
| | 4314 | + ) \ |
| | 4315 | + "" |
| | 4316 | + |
| | 4317 | +#define start_stop_daemon_trivial_usage \ |
| | 4318 | + "[OPTIONS] [--start|--stop] ... [-- arguments...]" |
| | 4319 | +#define start_stop_daemon_full_usage \ |
| | 4320 | + "Start and stop services" \ |
| | 4321 | + "\n\nOptions:" \ |
| | 4322 | + "\n -S|--start Start" \ |
| | 4323 | + "\n -K|--stop Stop" \ |
| | 4324 | + "\n -a|--startas <pathname> Starts process specified by pathname" \ |
| | 4325 | + "\n -b|--background Force process into background" \ |
| | 4326 | + "\n -u|--user <username>|<uid> Stop this user's processes" \ |
| | 4327 | + "\n -x|--exec <executable> Program to either start or check" \ |
| | 4328 | + "\n -m|--make-pidfile Create the -p file and enter pid in it" \ |
| | 4329 | + "\n -n|--name <process-name> Stop processes with this name" \ |
| | 4330 | + "\n -p|--pidfile <pid-file> Save or load pid using a pid-file" \ |
| | 4331 | + "\n -q|--quiet Be quiet" \ |
| | 4332 | + USE_FEATURE_START_STOP_DAEMON_FANCY( \ |
| | 4333 | + "\n -o|--oknodo Exit status 0 if nothing done" \ |
| | 4334 | + "\n -v|--verbose Be verbose" \ |
| | 4335 | + "\n -N|--nicelevel <N> Add N to process's nice level" \ |
| | 4336 | + ) \ |
| | 4337 | + "\n -s|--signal <signal> Signal to send (default TERM)" \ |
| | 4338 | + "\n -c|--chuid <user>[:[<group>]] Change to specified user/group" |
| | 4339 | + |
| | 4340 | +#define stat_trivial_usage \ |
| | 4341 | + "[OPTION] FILE..." |
| | 4342 | +#define stat_full_usage \ |
| | 4343 | + "Display file (default) or filesystem status" \ |
| | 4344 | + "\n\nOptions:\n" \ |
| | 4345 | + USE_FEATURE_STAT_FORMAT( \ |
| | 4346 | + " -c fmt Use the specified format\n") \ |
| | 4347 | + " -f Display filesystem status\n" \ |
| | 4348 | + " -L,-l Dereference links\n" \ |
| | 4349 | + " -t Display info in terse form" \ |
| | 4350 | + USE_SELINUX( \ |
| | 4351 | + "\n -Z Print security context" \ |
| | 4352 | + ) \ |
| | 4353 | + USE_FEATURE_STAT_FORMAT( \ |
| | 4354 | + "\n\nValid format sequences for files:\n" \ |
| | 4355 | + " %a Access rights in octal\n" \ |
| | 4356 | + " %A Access rights in human readable form\n" \ |
| | 4357 | + " %b Number of blocks allocated (see %B)\n" \ |
| | 4358 | + " %B The size in bytes of each block reported by %b\n" \ |
| | 4359 | + " %d Device number in decimal\n" \ |
| | 4360 | + " %D Device number in hex\n" \ |
| | 4361 | + " %f Raw mode in hex\n" \ |
| | 4362 | + " %F File type\n" \ |
| | 4363 | + " %g Group ID of owner\n" \ |
| | 4364 | + " %G Group name of owner\n" \ |
| | 4365 | + " %h Number of hard links\n" \ |
| | 4366 | + " %i Inode number\n" \ |
| | 4367 | + " %n File name\n" \ |
| | 4368 | + " %N Quoted file name with dereference if symlink\n" \ |
| | 4369 | + " %o I/O block size\n" \ |
| | 4370 | + " %s Total size, in bytes\n" \ |
| | 4371 | + " %t Major device type in hex\n" \ |
| | 4372 | + " %T Minor device type in hex\n" \ |
| | 4373 | + " %u User ID of owner\n" \ |
| | 4374 | + " %U User name of owner\n" \ |
| | 4375 | + " %x Time of last access\n" \ |
| | 4376 | + " %X Time of last access as seconds since Epoch\n" \ |
| | 4377 | + " %y Time of last modification\n" \ |
| | 4378 | + " %Y Time of last modification as seconds since Epoch\n" \ |
| | 4379 | + " %z Time of last change\n" \ |
| | 4380 | + " %Z Time of last change as seconds since Epoch\n" \ |
| | 4381 | + "\nValid format sequences for file systems:\n" \ |
| | 4382 | + " %a Free blocks available to non-superuser\n" \ |
| | 4383 | + " %b Total data blocks in file system\n" \ |
| | 4384 | + " %c Total file nodes in file system\n" \ |
| | 4385 | + " %d Free file nodes in file system\n" \ |
| | 4386 | + " %f Free blocks in file system\n" \ |
| | 4387 | + USE_SELINUX( \ |
| | 4388 | + " %C Security context in SELinux\n" \ |
| | 4389 | + ) \ |
| | 4390 | + " %i File System ID in hex\n" \ |
| | 4391 | + " %l Maximum length of filenames\n" \ |
| | 4392 | + " %n File name\n" \ |
| | 4393 | + " %s Block size (for faster transfers)\n" \ |
| | 4394 | + " %S Fundamental block size (for block counts)\n" \ |
| | 4395 | + " %t Type in hex\n" \ |
| | 4396 | + " %T Type in human readable form" \ |
| | 4397 | + ) |
| | 4398 | + |
| | 4399 | +#define strings_trivial_usage \ |
| | 4400 | + "[-afo] [-n length] [file ... ]" |
| | 4401 | +#define strings_full_usage \ |
| | 4402 | + "Display printable strings in a binary file" \ |
| | 4403 | + "\n\nOptions:" \ |
| | 4404 | + "\n -a Scan the whole files (this is the default)" \ |
| | 4405 | + "\n -f Precede each string with the name of the file where it was found" \ |
| | 4406 | + "\n -n N Specifies that at least N characters forms a sequence (default 4)" \ |
| | 4407 | + "\n -o Each string is preceded by its decimal offset in the file" |
| | 4408 | + |
| | 4409 | +#define stty_trivial_usage \ |
| | 4410 | + "[-a|g] [-F DEVICE] [SETTING]..." |
| | 4411 | +#define stty_full_usage \ |
| | 4412 | + "Without arguments, prints baud rate, line discipline,\n" \ |
| | 4413 | + "and deviations from stty sane" \ |
| | 4414 | + "\n\nOptions:" \ |
| | 4415 | + "\n -F DEVICE Open device instead of stdin" \ |
| | 4416 | + "\n -a Print all current settings in human-readable form" \ |
| | 4417 | + "\n -g Print in stty-readable form" \ |
| | 4418 | + "\n [SETTING] See manpage" |
| | 4419 | + |
| | 4420 | +#define su_trivial_usage \ |
| | 4421 | + "[OPTION]... [-] [username]" |
| | 4422 | +#define su_full_usage \ |
| | 4423 | + "Change user id or become root" \ |
| | 4424 | + "\n\nOptions:" \ |
| | 4425 | + "\n -p, -m Preserve environment" \ |
| | 4426 | + "\n -c Command to pass to 'sh -c'" \ |
| | 4427 | + "\n -s Shell to use instead of default shell" |
| | 4428 | + |
| | 4429 | +#define sulogin_trivial_usage \ |
| | 4430 | + "[OPTION]... [tty-device]" |
| | 4431 | +#define sulogin_full_usage \ |
| | 4432 | + "Single user login" \ |
| | 4433 | + "\n\nOptions:" \ |
| | 4434 | + "\n -t Timeout" |
| | 4435 | + |
| | 4436 | +#define sum_trivial_usage \ |
| | 4437 | + "[rs] [files...]" |
| | 4438 | +#define sum_full_usage \ |
| | 4439 | + "Checksum and count the blocks in a file" \ |
| | 4440 | + "\n\nOptions:\n" \ |
| | 4441 | + " -r Use BSD sum algorithm (1K blocks)\n" \ |
| | 4442 | + " -s Use System V sum algorithm (512byte blocks)" |
| | 4443 | + |
| | 4444 | +#define sv_trivial_usage \ |
| | 4445 | + "[-v] [-w sec] command service..." |
| | 4446 | +#define sv_full_usage \ |
| | 4447 | + "Report the current status and control the state of services " \ |
| | 4448 | + "monitored by the runsv supervisor" |
| | 4449 | + |
| | 4450 | +#define svlogd_trivial_usage \ |
| | 4451 | + "[-ttv] [-r c] [-R abc] [-l len] [-b buflen] dir..." |
| | 4452 | +#define svlogd_full_usage \ |
| | 4453 | + "Continuously read log data from standard input, optionally " \ |
| | 4454 | + "filter log messages, and write the data to one or more automatically " \ |
| | 4455 | + "rotated logs" |
| | 4456 | + |
| | 4457 | +#define swapoff_trivial_usage \ |
| | 4458 | + "[-a] [DEVICE]" |
| | 4459 | +#define swapoff_full_usage \ |
| | 4460 | + "Stop swapping virtual memory pages on DEVICE" \ |
| | 4461 | + "\n\nOptions:\n" \ |
| | 4462 | + " -a Stop swapping on all swap devices" |
| | 4463 | + |
| | 4464 | +#define swapon_trivial_usage \ |
| | 4465 | + "[-a] [DEVICE]" |
| | 4466 | +#define swapon_full_usage \ |
| | 4467 | + "Start swapping virtual memory pages on DEVICE" \ |
| | 4468 | + "\n\nOptions:\n" \ |
| | 4469 | + " -a Start swapping on all swap devices" |
| | 4470 | + |
| | 4471 | +#define switch_root_trivial_usage \ |
| | 4472 | + "[-c /dev/console] NEW_ROOT NEW_INIT [ARGUMENTS_TO_INIT]" |
| | 4473 | +#define switch_root_full_usage \ |
| | 4474 | + "Use from PID 1 under initramfs to free initramfs, chroot to NEW_ROOT,\n" \ |
| | 4475 | + "and exec NEW_INIT" \ |
| | 4476 | + "\n\nOptions:\n" \ |
| | 4477 | + " -c Redirect console to device on new root" |
| | 4478 | + |
| | 4479 | +#define sync_trivial_usage \ |
| | 4480 | + "" |
| | 4481 | +#define sync_full_usage \ |
| | 4482 | + "Write all buffered filesystem blocks to disk" |
| | 4483 | + |
| | 4484 | +#define sysctl_trivial_usage \ |
| | 4485 | + "[OPTIONS]... [VALUE]..." |
| | 4486 | +#define sysctl_full_usage \ |
| | 4487 | + "Configure kernel parameters at runtime" \ |
| | 4488 | + "\n\nOptions:\n" \ |
| | 4489 | + " -n Use this option to disable printing of the key name when printing values\n" \ |
| | 4490 | + " -w Use this option when you want to change a sysctl setting\n" \ |
| | 4491 | + " -p Load in sysctl settings from the file specified or /etc/sysctl.conf if none given\n" \ |
| | 4492 | + " -a Display all values currently available\n" \ |
| | 4493 | + " -A Display all values currently available in table form" |
| | 4494 | +#define sysctl_example_usage \ |
| | 4495 | + "sysctl [-n] variable ...\n" \ |
| | 4496 | + "sysctl [-n] -w variable=value ...\n" \ |
| | 4497 | + "sysctl [-n] -a\n" \ |
| | 4498 | + "sysctl [-n] -p <file> (default /etc/sysctl.conf)\n" \ |
| | 4499 | + "sysctl [-n] -A\n" |
| | 4500 | + |
| | 4501 | +#define syslogd_trivial_usage \ |
| | 4502 | + "[OPTION]..." |
| | 4503 | +#define syslogd_full_usage \ |
| | 4504 | + "System logging utility.\n" \ |
| | 4505 | + "Note that this version of syslogd ignores /etc/syslog.conf." \ |
| | 4506 | + "\n\nOptions:" \ |
| | 4507 | + "\n -n Run as foreground process" \ |
| | 4508 | + "\n -O FILE Use an alternate log file (default=/var/log/messages)" \ |
| | 4509 | + "\n -l n Sets the local log level of messages to n" \ |
| | 4510 | + "\n -S Make logging output smaller" \ |
| | 4511 | + USE_FEATURE_ROTATE_LOGFILE( \ |
| | 4512 | + "\n -s SIZE Max size (KB) before rotate (default=200KB, 0=off)" \ |
| | 4513 | + "\n -b NUM Number of rotated logs to keep (default=1, max=99, 0=purge)") \ |
| | 4514 | + USE_FEATURE_REMOTE_LOG( \ |
| | 4515 | + "\n -R HOST[:PORT] Log to IP or hostname on PORT (default PORT=514/UDP)" \ |
| | 4516 | + "\n -L Log locally and via network logging (default is network only)") \ |
| | 4517 | + USE_FEATURE_IPC_SYSLOG( \ |
| | 4518 | + "\n -C[size(KiB)] Log to a shared mem buffer (read the buffer using logread)") |
| | 4519 | + /* NB: -Csize shouldn't have space (because size is optional) */ |
| | 4520 | +/* "\n -m MIN Minutes between MARK lines (default=20, 0=off)" */ |
| | 4521 | +#define syslogd_example_usage \ |
| | 4522 | + "$ syslogd -R masterlog:514\n" \ |
| | 4523 | + "$ syslogd -R 192.168.1.1:601\n" |
| | 4524 | + |
| | 4525 | +#define tail_trivial_usage \ |
| | 4526 | + "[OPTION]... [FILE]..." |
| | 4527 | +#define tail_full_usage \ |
| | 4528 | + "Print last 10 lines of each FILE to standard output.\n" \ |
| | 4529 | + "With more than one FILE, precede each with a header giving the\n" \ |
| | 4530 | + "file name. With no FILE, or when FILE is -, read standard input." \ |
| | 4531 | + "\n\nOptions:" \ |
| | 4532 | + USE_FEATURE_FANCY_TAIL( \ |
| | 4533 | + "\n -c N[kbm] Output the last N bytes") \ |
| | 4534 | + "\n -n N[kbm] Print last N lines instead of last 10" \ |
| | 4535 | + "\n -f Output data as the file grows" \ |
| | 4536 | + USE_FEATURE_FANCY_TAIL( \ |
| | 4537 | + "\n -q Never output headers giving file names" \ |
| | 4538 | + "\n -s SEC Wait SEC seconds between reads with -f" \ |
| | 4539 | + "\n -v Always output headers giving file names" \ |
| | 4540 | + "\n\n" \ |
| | 4541 | + "If the first character of N (bytes or lines) is a '+', output begins with\n" \ |
| | 4542 | + "the Nth item from the start of each file, otherwise, print the last N items\n" \ |
| | 4543 | + "in the file. N bytes may be suffixed by k (x1024), b (x512), or m (1024^2)." ) |
| | 4544 | +#define tail_example_usage \ |
| | 4545 | + "$ tail -n 1 /etc/resolv.conf\n" \ |
| | 4546 | + "nameserver 10.0.0.1\n" |
| | 4547 | + |
| | 4548 | +#define tar_trivial_usage \ |
| | 4549 | + "-[" USE_FEATURE_TAR_CREATE("c") USE_FEATURE_TAR_GZIP("z") \ |
| | 4550 | + USE_FEATURE_TAR_BZIP2("j") USE_FEATURE_TAR_LZMA("a") \ |
| | 4551 | + USE_FEATURE_TAR_COMPRESS("Z") "xtvO] " \ |
| | 4552 | + USE_FEATURE_TAR_FROM("[-X FILE] ") \ |
| | 4553 | + "[-f TARFILE] [-C DIR] [FILE(s)] ..." |
| | 4554 | +#define tar_full_usage \ |
| | 4555 | + "Create, extract, or list files from a tar file" \ |
| | 4556 | + "\n\nOptions:\n" \ |
| | 4557 | + USE_FEATURE_TAR_CREATE( \ |
| | 4558 | + " c Create\n") \ |
| | 4559 | + " x Extract\n" \ |
| | 4560 | + " t List\n" \ |
| | 4561 | + "\nArchive format selection:\n" \ |
| | 4562 | + USE_FEATURE_TAR_GZIP( \ |
| | 4563 | + " z Filter the archive through gzip\n") \ |
| | 4564 | + USE_FEATURE_TAR_BZIP2( \ |
| | 4565 | + " j Filter the archive through bzip2\n") \ |
| | 4566 | + USE_FEATURE_TAR_LZMA( \ |
| | 4567 | + " a Filter the archive through lzma\n") \ |
| | 4568 | + USE_FEATURE_TAR_COMPRESS( \ |
| | 4569 | + " Z Filter the archive through compress\n") \ |
| | 4570 | + "\nFile selection:\n" \ |
| | 4571 | + " f Name of TARFILE or \"-\" for stdin\n" \ |
| | 4572 | + " O Extract to stdout\n" \ |
| | 4573 | + USE_FEATURE_TAR_FROM( \ |
| | 4574 | + " exclude File to exclude\n" \ |
| | 4575 | + " X File with names to exclude\n") \ |
| | 4576 | + " C Change to directory DIR before operation\n" \ |
| | 4577 | + " v Verbosely list files processed" |
| | 4578 | +#define tar_example_usage \ |
| | 4579 | + "$ zcat /tmp/tarball.tar.gz | tar -xf -\n" \ |
| | 4580 | + "$ tar -cf /tmp/tarball.tar /usr/local\n" |
| | 4581 | + |
| | 4582 | +#define taskset_trivial_usage \ |
| | 4583 | + "[OPTIONS] [mask] [pid | command [arg]...]" |
| | 4584 | +#define taskset_full_usage \ |
| | 4585 | + "Set or get CPU affinity" \ |
| | 4586 | + "\n\nOptions:\n" \ |
| | 4587 | + " -p Operate on an existing PID" |
| | 4588 | +#define taskset_example_usage \ |
| | 4589 | + "$ taskset 0x7 ./dgemm_test&\n" \ |
| | 4590 | + "$ taskset -p 0x1 $!\n" \ |
| | 4591 | + "pid 4790's current affinity mask: 7\n" \ |
| | 4592 | + "pid 4790's new affinity mask: 1\n" \ |
| | 4593 | + "$ taskset 0x7 /bin/sh -c './taskset -p 0x1 $$'\n" \ |
| | 4594 | + "pid 6671's current affinity mask: 1\n" \ |
| | 4595 | + "pid 6671's new affinity mask: 1\n" \ |
| | 4596 | + "$ taskset -p 1\n" \ |
| | 4597 | + "pid 1's current affinity mask: 3\n" |
| | 4598 | + |
| | 4599 | +#define tee_trivial_usage \ |
| | 4600 | + "[OPTION]... [FILE]..." |
| | 4601 | +#define tee_full_usage \ |
| | 4602 | + "Copy standard input to each FILE, and also to standard output" \ |
| | 4603 | + "\n\nOptions:\n" \ |
| | 4604 | + " -a Append to the given FILEs, do not overwrite\n" \ |
| | 4605 | + " -i Ignore interrupt signals (SIGINT)" |
| | 4606 | +#define tee_example_usage \ |
| | 4607 | + "$ echo \"Hello\" | tee /tmp/foo\n" \ |
| | 4608 | + "$ cat /tmp/foo\n" \ |
| | 4609 | + "Hello\n" |
| | 4610 | + |
| | 4611 | +#ifdef CONFIG_FEATURE_TELNET_AUTOLOGIN |
| | 4612 | +#define telnet_trivial_usage \ |
| | 4613 | + "[-a] [-l USER] HOST [PORT]" |
| | 4614 | +#define telnet_full_usage \ |
| | 4615 | + "Connect to remote telnet server" \ |
| | 4616 | + "\n\nOptions:\n" \ |
| | 4617 | + " -a Attempt an automatic login with the USER variable\n" \ |
| | 4618 | + " -l USER Attempt an automatic login with the USER argument\n" \ |
| | 4619 | + " HOST The official name, alias or the IP address of the\n" \ |
| | 4620 | + " remote host\n" \ |
| | 4621 | + " PORT The remote port number to connect to. If it is not\n" \ |
| | 4622 | + " specified, the default telnet (23) port is used." |
| | 4623 | +#else |
| | 4624 | +#define telnet_trivial_usage \ |
| | 4625 | + "HOST [PORT]" |
| | 4626 | +#define telnet_full_usage \ |
| | 4627 | + "Connect to remote telnet server" |
| | 4628 | +#endif |
| | 4629 | + |
| | 4630 | +#define telnetd_trivial_usage \ |
| | 4631 | + "[OPTION]" |
| | 4632 | +#define telnetd_full_usage \ |
| | 4633 | + "Handle incoming telnet connections" \ |
| | 4634 | + SKIP_FEATURE_TELNETD_STANDALONE(" via inetd") \ |
| | 4635 | + "\n\nOptions:" \ |
| | 4636 | + "\n -l LOGIN Exec LOGIN on connect" \ |
| | 4637 | + "\n -f issue_file Display issue_file instead of /etc/issue" \ |
| | 4638 | + USE_FEATURE_TELNETD_STANDALONE( \ |
| | 4639 | + "\n -p PORT Port to listen to" \ |
| | 4640 | + "\n -b ADDR Address to bind to" \ |
| | 4641 | + "\n -F Stay in foreground" \ |
| | 4642 | + "\n -i Run as inetd subservice" \ |
| | 4643 | + ) |
| | 4644 | + |
| | 4645 | +#define test_trivial_usage \ |
| | 4646 | + "EXPRESSION\n or [ EXPRESSION ]" |
| | 4647 | +#define test_full_usage \ |
| | 4648 | + "Check file types and compares values returning an exit code\n" \ |
| | 4649 | + "determined by the value of EXPRESSION" |
| | 4650 | +#define test_example_usage \ |
| | 4651 | + "$ test 1 -eq 2\n" \ |
| | 4652 | + "$ echo $?\n" \ |
| | 4653 | + "1\n" \ |
| | 4654 | + "$ test 1 -eq 1\n" \ |
| | 4655 | + "$ echo $?\n" \ |
| | 4656 | + "0\n" \ |
| | 4657 | + "$ [ -d /etc ]\n" \ |
| | 4658 | + "$ echo $?\n" \ |
| | 4659 | + "0\n" \ |
| | 4660 | + "$ [ -d /junk ]\n" \ |
| | 4661 | + "$ echo $?\n" \ |
| | 4662 | + "1\n" |
| | 4663 | + |
| | 4664 | +#define tftp_trivial_usage \ |
| | 4665 | + "[OPTION]... HOST [PORT]" |
| | 4666 | +#define tftp_full_usage \ |
| | 4667 | + "Transfer a file from/to tftp server using \"octet\" mode" \ |
| | 4668 | + "\n\nOptions:" \ |
| | 4669 | + "\n -l FILE Local FILE" \ |
| | 4670 | + "\n -r FILE Remote FILE" \ |
| | 4671 | + USE_FEATURE_TFTP_GET( \ |
| | 4672 | + "\n -g Get file" \ |
| | 4673 | + ) \ |
| | 4674 | + USE_FEATURE_TFTP_PUT( \ |
| | 4675 | + "\n -p Put file" \ |
| | 4676 | + ) \ |
| | 4677 | + USE_FEATURE_TFTP_BLOCKSIZE( \ |
| | 4678 | + "\n -b SIZE Transfer blocks of SIZE octets" \ |
| | 4679 | + ) |
| | 4680 | +#define time_trivial_usage \ |
| | 4681 | + "[OPTION]... COMMAND [ARGS...]" |
| | 4682 | +#define time_full_usage \ |
| | 4683 | + "Run the program COMMAND with arguments ARGS. When COMMAND finishes,\n" \ |
| | 4684 | + "COMMAND's resource usage information is displayed." \ |
| | 4685 | + "\n\nOptions:\n" \ |
| | 4686 | + " -v Display verbose resource usage information" |
| | 4687 | + |
| | 4688 | +#define top_trivial_usage \ |
| | 4689 | + "[-b] [-n count] [-d seconds]" |
| | 4690 | +#define top_full_usage \ |
| | 4691 | + "Provide a view of process activity in real time.\n" \ |
| | 4692 | + "Read the status of all processes from /proc each <seconds>\n" \ |
| | 4693 | + "and show the status for however many processes will fit on the screen." |
| | 4694 | + |
| | 4695 | +#define touch_trivial_usage \ |
| | 4696 | + "[-c] FILE [FILE ...]" |
| | 4697 | +#define touch_full_usage \ |
| | 4698 | + "Update the last-modified date on the given FILE[s]" \ |
| | 4699 | + "\n\nOptions:\n" \ |
| | 4700 | + " -c Do not create any files" |
| | 4701 | +#define touch_example_usage \ |
| | 4702 | + "$ ls -l /tmp/foo\n" \ |
| | 4703 | + "/bin/ls: /tmp/foo: No such file or directory\n" \ |
| | 4704 | + "$ touch /tmp/foo\n" \ |
| | 4705 | + "$ ls -l /tmp/foo\n" \ |
| | 4706 | + "-rw-rw-r-- 1 andersen andersen 0 Apr 15 01:11 /tmp/foo\n" |
| | 4707 | + |
| | 4708 | +#define tr_trivial_usage \ |
| | 4709 | + "[-cds] STRING1 [STRING2]" |
| | 4710 | +#define tr_full_usage \ |
| | 4711 | + "Translate, squeeze, and/or delete characters from\n" \ |
| | 4712 | + "standard input, writing to standard output" \ |
| | 4713 | + "\n\nOptions:\n" \ |
| | 4714 | + " -c Take complement of STRING1\n" \ |
| | 4715 | + " -d Delete input characters coded STRING1\n" \ |
| | 4716 | + " -s Squeeze multiple output characters of STRING2 into one character" |
| | 4717 | +#define tr_example_usage \ |
| | 4718 | + "$ echo \"gdkkn vnqkc\" | tr [a-y] [b-z]\n" \ |
| | 4719 | + "hello world\n" |
| | 4720 | + |
| | 4721 | +#define traceroute_trivial_usage \ |
| | 4722 | + "[-FIldnrv] [-f 1st_ttl] [-m max_ttl] [-p port#] [-q nqueries]\n" \ |
| | 4723 | + " [-s src_addr] [-t tos] [-w wait] [-g gateway] [-i iface]\n" \ |
| | 4724 | + " [-z pausemsecs] host [data size]" |
| | 4725 | +#define traceroute_full_usage \ |
| | 4726 | + "Trace the route ip packets follow going to \"host\"" \ |
| | 4727 | + "\n\nOptions:\n" \ |
| | 4728 | + " -F Set the don't fragment bit\n" \ |
| | 4729 | + " -I Use ICMP ECHO instead of UDP datagrams\n" \ |
| | 4730 | + " -l Display the ttl value of the returned packet\n" \ |
| | 4731 | + " -d Set SO_DEBUG options to socket\n" \ |
| | 4732 | + " -n Print hop addresses numerically rather than symbolically\n" \ |
| | 4733 | + " -r Bypass the normal routing tables and send directly to a host\n" \ |
| | 4734 | + " -v Verbose output\n" \ |
| | 4735 | + " -m max_ttl Set the max time-to-live (max number of hops)\n" \ |
| | 4736 | + " -p port# Set the base UDP port number used in probes\n" \ |
| | 4737 | + " (default is 33434)\n" \ |
| | 4738 | + " -q nqueries Set the number of probes per 'ttl' to nqueries\n" \ |
| | 4739 | + " (default is 3)\n" \ |
| | 4740 | + " -s src_addr Use the following IP address as the source address\n" \ |
| | 4741 | + " -t tos Set the type-of-service in probe packets to the following value\n" \ |
| | 4742 | + " (default 0)\n" \ |
| | 4743 | + " -w wait Set the time (in seconds) to wait for a response to a probe\n" \ |
| | 4744 | + " (default 3 sec)\n" \ |
| | 4745 | + " -g Specify a loose source route gateway (8 maximum)" |
| | 4746 | + |
| | 4747 | + |
| | 4748 | +#define true_trivial_usage \ |
| | 4749 | + "" |
| | 4750 | +#define true_full_usage \ |
| | 4751 | + "Return an exit code of TRUE (0)" |
| | 4752 | +#define true_example_usage \ |
| | 4753 | + "$ true\n" \ |
| | 4754 | + "$ echo $?\n" \ |
| | 4755 | + "0\n" |
| | 4756 | + |
| | 4757 | +#define tty_trivial_usage \ |
| | 4758 | + "" |
| | 4759 | +#define tty_full_usage \ |
| | 4760 | + "Print the file name of the terminal connected to standard input" \ |
| | 4761 | + USE_INCLUDE_SUSv2( \ |
| | 4762 | + "\n\nOptions:\n" \ |
| | 4763 | + " -s Print nothing, only return an exit status") |
| | 4764 | +#define tty_example_usage \ |
| | 4765 | + "$ tty\n" \ |
| | 4766 | + "/dev/tty2\n" |
| | 4767 | + |
| | 4768 | +#define tune2fs_trivial_usage \ |
| | 4769 | + "[-c max-mounts-count] [-e errors-behavior] [-g group] " \ |
| | 4770 | + "[-i interval[d|m|w]] [-j] [-J journal-options] [-l] [-s sparse-flag] " \ |
| | 4771 | + "[-m reserved-blocks-percent] [-o [^]mount-options[,...]] " \ |
| | 4772 | + "[-r reserved-blocks-count] [-u user] [-C mount-count] " \ |
| | 4773 | + "[-L volume-label] [-M last-mounted-dir] [-O [^]feature[,...]] " \ |
| | 4774 | + "[-T last-check-time] [-U UUID] device" |
| | 4775 | +#define tune2fs_full_usage \ |
| | 4776 | + "Adjust filesystem options on ext[23] filesystems" |
| | 4777 | + |
| | 4778 | +#define udhcpc_trivial_usage \ |
| | 4779 | + "[-Cfbnqtv] [-c CID] [-V VCLS] [-H HOSTNAME] [-i INTERFACE]\n[-p pidfile] [-r IP] [-s script]" |
| | 4780 | +#define udhcpc_full_usage \ |
| | 4781 | + " -V,--vendorclass=CLASSID Set vendor class identifier\n" \ |
| | 4782 | + " -i,--interface=INTERFACE Interface to use (default: eth0)\n" \ |
| | 4783 | + " -H,-h,--hostname=HOSTNAME Client hostname\n" \ |
| | 4784 | + " -c,--clientid=CLIENTID Set client identifier\n" \ |
| | 4785 | + " -C,--clientid-none Suppress default client identifier\n" \ |
| | 4786 | + " -p,--pidfile=file Store process ID of daemon in file\n" \ |
| | 4787 | + " -r,--request=IP IP address to request (default: none)\n" \ |
| | 4788 | + " -s,--script=file Run file at dhcp events (default: /usr/share/udhcpc/default.script)\n" \ |
| | 4789 | + " -t,--retries=NUM Send up to NUM request packets\n"\ |
| | 4790 | + " -f,--foreground Do not fork after getting lease\n" \ |
| | 4791 | + " -b,--background Fork to background if lease cannot be immediately negotiated\n" \ |
| | 4792 | + " -n,--now Exit with failure if lease cannot be immediately negotiated\n" \ |
| | 4793 | + " -q,--quit Quit after obtaining lease\n" \ |
| | 4794 | + " -R,--release Release IP on quit\n" \ |
| | 4795 | + " -v,--version Display version" \ |
| | 4796 | + |
| | 4797 | +#define udhcpd_trivial_usage \ |
| | 4798 | + "[configfile]\n" \ |
| | 4799 | + |
| | 4800 | +#define udhcpd_full_usage \ |
| | 4801 | + "" |
| | 4802 | + |
| | 4803 | +#define umount_trivial_usage \ |
| | 4804 | + "[flags] FILESYSTEM|DIRECTORY" |
| | 4805 | +#define umount_full_usage \ |
| | 4806 | + "Unmount file systems" \ |
| | 4807 | + "\n\nOptions:\n" \ |
| | 4808 | + USE_FEATURE_UMOUNT_ALL( \ |
| | 4809 | + "\n -a Unmount all file systems" USE_FEATURE_MTAB_SUPPORT(" in /etc/mtab")) \ |
| | 4810 | + USE_FEATURE_MTAB_SUPPORT( \ |
| | 4811 | + "\n -n Don't erase /etc/mtab entries") \ |
| | 4812 | + "\n -r Try to remount devices as read-only if mount is busy" \ |
| | 4813 | + "\n -l Lazy umount (detach filesystem)" \ |
| | 4814 | + "\n -f Force umount (i.e., unreachable NFS server)" \ |
| | 4815 | + USE_FEATURE_MOUNT_LOOP( \ |
| | 4816 | + "\n -D Do not free loop device (if a loop device has been used)") |
| | 4817 | +#define umount_example_usage \ |
| | 4818 | + "$ umount /dev/hdc1\n" |
| | 4819 | + |
| | 4820 | +#define uname_trivial_usage \ |
| | 4821 | + "[OPTION]..." |
| | 4822 | +#define uname_full_usage \ |
| | 4823 | + "Print certain system information. With no OPTION, same as -s." \ |
| | 4824 | + "\n\nOptions:\n" \ |
| | 4825 | + " -a Print all information\n" \ |
| | 4826 | + " -m The machine (hardware) type\n" \ |
| | 4827 | + " -n Print the machine's network node hostname\n" \ |
| | 4828 | + " -r Print the operating system release\n" \ |
| | 4829 | + " -s Print the operating system name\n" \ |
| | 4830 | + " -p Print the host processor type\n" \ |
| | 4831 | + " -v Print the operating system version" |
| | 4832 | +#define uname_example_usage \ |
| | 4833 | + "$ uname -a\n" \ |
| | 4834 | + "Linux debian 2.4.23 #2 Tue Dec 23 17:09:10 MST 2003 i686 GNU/Linux\n" |
| | 4835 | + |
| | 4836 | +#define uncompress_trivial_usage \ |
| | 4837 | + "[-c] [-f] [ name ... ]" |
| | 4838 | +#define uncompress_full_usage \ |
| | 4839 | + "Uncompress .Z file[s]" \ |
| | 4840 | + "\n\nOptions:\n" \ |
| | 4841 | + " -c Extract to stdout\n" \ |
| | 4842 | + " -f Force overwrite an existing file" |
| | 4843 | + |
| | 4844 | +#define uniq_trivial_usage \ |
| | 4845 | + "[-fscdu]... [INPUT [OUTPUT]]" |
| | 4846 | +#define uniq_full_usage \ |
| | 4847 | + "Discard all but one of successive identical lines from INPUT\n" \ |
| | 4848 | + "(or standard input), writing to OUTPUT (or standard output)" \ |
| | 4849 | + "\n\nOptions:\n" \ |
| | 4850 | + " -c Prefix lines by the number of occurrences\n" \ |
| | 4851 | + " -d Only print duplicate lines\n" \ |
| | 4852 | + " -u Only print unique lines\n" \ |
| | 4853 | + " -f N Skip the first N fields\n" \ |
| | 4854 | + " -s N Skip the first N chars (after any skipped fields)" |
| | 4855 | +#define uniq_example_usage \ |
| | 4856 | + "$ echo -e \"a\\na\\nb\\nc\\nc\\na\" | sort | uniq\n" \ |
| | 4857 | + "a\n" \ |
| | 4858 | + "b\n" \ |
| | 4859 | + "c\n" |
| | 4860 | + |
| | 4861 | +#define unix2dos_trivial_usage \ |
| | 4862 | + "[option] [FILE]" |
| | 4863 | +#define unix2dos_full_usage \ |
| | 4864 | + "Convert FILE from unix format to dos format. When no option\n" \ |
| | 4865 | + "is given, the input is converted to the opposite output format.\n" \ |
| | 4866 | + "When no file is given, use stdin for input and stdout for output." \ |
| | 4867 | + "\n\nOptions:\n" \ |
| | 4868 | + " -u Output will be in UNIX format\n" \ |
| | 4869 | + " -d Output will be in DOS format" |
| | 4870 | + |
| | 4871 | +#define unzip_trivial_usage \ |
| | 4872 | + "[-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]" |
| | 4873 | +#define unzip_full_usage \ |
| | 4874 | + "Extract files from ZIP archives" \ |
| | 4875 | + "\n\nOptions:\n" \ |
| | 4876 | + " -l List archive contents (short form)\n" \ |
| | 4877 | + " -n Never overwrite existing files (default)\n" \ |
| | 4878 | + " -o Overwrite files without prompting\n" \ |
| | 4879 | + " -p Send output to stdout\n" \ |
| | 4880 | + " -q Be quiet\n" \ |
| | 4881 | + " -x Exclude these files\n" \ |
| | 4882 | + " -d Extract files into this directory" |
| | 4883 | + |
| | 4884 | +#define uptime_trivial_usage \ |
| | 4885 | + "" |
| | 4886 | +#define uptime_full_usage \ |
| | 4887 | + "Display the time since the last boot" |
| | 4888 | +#define uptime_example_usage \ |
| | 4889 | + "$ uptime\n" \ |
| | 4890 | + " 1:55pm up 2:30, load average: 0.09, 0.04, 0.00\n" |
| | 4891 | + |
| | 4892 | +#define usleep_trivial_usage \ |
| | 4893 | + "N" |
| | 4894 | +#define usleep_full_usage \ |
| | 4895 | + "Pause for N microseconds" |
| | 4896 | +#define usleep_example_usage \ |
| | 4897 | + "$ usleep 1000000\n" \ |
| | 4898 | + "[pauses for 1 second]\n" |
| | 4899 | + |
| | 4900 | +#define uudecode_trivial_usage \ |
| | 4901 | + "[FILE]..." |
| | 4902 | +#define uudecode_full_usage \ |
| | 4903 | + "Uudecode a file" \ |
| | 4904 | + "\n\nOptions:\n" \ |
| | 4905 | + " -o FILE Direct output to FILE" |
| | 4906 | +#define uudecode_example_usage \ |
| | 4907 | + "$ uudecode -o busybox busybox.uu\n" \ |
| | 4908 | + "$ ls -l busybox\n" \ |
| | 4909 | + "-rwxr-xr-x 1 ams ams 245264 Jun 7 21:35 busybox\n" |
| | 4910 | + |
| | 4911 | +#define uuencode_trivial_usage \ |
| | 4912 | + "[OPTION] [INFILE] REMOTEFILE" |
| | 4913 | +#define uuencode_full_usage \ |
| | 4914 | + "Uuencode a file" \ |
| | 4915 | + "\n\nOptions:\n" \ |
| | 4916 | + " -m Use base64 encoding per RFC1521" |
| | 4917 | +#define uuencode_example_usage \ |
| | 4918 | + "$ uuencode busybox busybox\n" \ |
| | 4919 | + "begin 755 busybox\n" \ |
| | 4920 | + "<encoded file snipped>\n" \ |
| | 4921 | + "$ uudecode busybox busybox > busybox.uu\n" \ |
| | 4922 | + "$\n" |
| | 4923 | + |
| | 4924 | +#define vconfig_trivial_usage \ |
| | 4925 | + "COMMAND [OPTIONS] ..." |
| | 4926 | +#define vconfig_full_usage \ |
| | 4927 | + "Create and remove virtual ethernet devices" \ |
| | 4928 | + "\n\nOptions:\n" \ |
| | 4929 | + " add [interface-name] [vlan_id]\n" \ |
| | 4930 | + " rem [vlan-name]\n" \ |
| | 4931 | + " set_flag [interface-name] [flag-num] [0 | 1]\n" \ |
| | 4932 | + " set_egress_map [vlan-name] [skb_priority] [vlan_qos]\n" \ |
| | 4933 | + " set_ingress_map [vlan-name] [skb_priority] [vlan_qos]\n" \ |
| | 4934 | + " set_name_type [name-type]" |
| | 4935 | + |
| | 4936 | +#define vi_trivial_usage \ |
| | 4937 | + "[OPTION] [FILE]..." |
| | 4938 | +#define vi_full_usage \ |
| | 4939 | + "Edit FILE" \ |
| | 4940 | + "\n\nOptions:\n" \ |
| | 4941 | + " -R Read-only - do not write to the file" |
| | 4942 | + |
| | 4943 | +#define vlock_trivial_usage \ |
| | 4944 | + "[OPTIONS]" |
| | 4945 | +#define vlock_full_usage \ |
| | 4946 | + "Lock a virtual terminal. A password is required to unlock." \ |
| | 4947 | + "\n\nOptions:\n" \ |
| | 4948 | + " -a Lock all VTs" |
| | 4949 | + |
| | 4950 | +#define watch_trivial_usage \ |
| | 4951 | + "[-n <seconds>] [-t] COMMAND..." |
| | 4952 | +#define watch_full_usage \ |
| | 4953 | + "Execute a program periodically" \ |
| | 4954 | + "\n\nOptions:\n" \ |
| | 4955 | + " -n Loop period in seconds - default is 2\n" \ |
| | 4956 | + " -t Don't print header" |
| | 4957 | +#define watch_example_usage \ |
| | 4958 | + "$ watch date\n" \ |
| | 4959 | + "Mon Dec 17 10:31:40 GMT 2000\n" \ |
| | 4960 | + "Mon Dec 17 10:31:42 GMT 2000\n" \ |
| | 4961 | + "Mon Dec 17 10:31:44 GMT 2000" |
| | 4962 | + |
| | 4963 | +#define watchdog_trivial_usage \ |
| | 4964 | + "[-t <seconds>] [-F] DEV" |
| | 4965 | +#define watchdog_full_usage \ |
| | 4966 | + "Periodically write to watchdog device DEV" \ |
| | 4967 | + "\n\nOptions:\n" \ |
| | 4968 | + " -t Timer period in seconds - default is 30\n" \ |
| | 4969 | + " -F Stay in the foreground and don't fork" |
| | 4970 | + |
| | 4971 | +#define wc_trivial_usage \ |
| | 4972 | + "[OPTION]... [FILE]..." |
| | 4973 | +#define wc_full_usage \ |
| | 4974 | + "Print line, word, and byte counts for each FILE, and a total line if\n" \ |
| | 4975 | + "more than one FILE is specified. With no FILE, read standard input." \ |
| | 4976 | + "\n\nOptions:\n" \ |
| | 4977 | + " -c Print the byte counts\n" \ |
| | 4978 | + " -l Print the newline counts\n" \ |
| | 4979 | + " -L Print the length of the longest line\n" \ |
| | 4980 | + " -w Print the word counts" |
| | 4981 | +#define wc_example_usage \ |
| | 4982 | + "$ wc /etc/passwd\n" \ |
| | 4983 | + " 31 46 1365 /etc/passwd\n" |
| | 4984 | + |
| | 4985 | +#define wget_trivial_usage \ |
| | 4986 | + "[-c|--continue] [-q|--quiet] [-O|--output-document file]\n" \ |
| | 4987 | + " [--header 'header: value'] [-Y|--proxy on/off] [-P DIR]\n" \ |
| | 4988 | + " [-U|--user-agent agent] url" |
| | 4989 | +#define wget_full_usage \ |
| | 4990 | + "Retrieve files via HTTP or FTP" \ |
| | 4991 | + "\n\nOptions:\n" \ |
| | 4992 | + " -c Continue retrieval of aborted transfers\n" \ |
| | 4993 | + " -q Quiet mode - do not print\n" \ |
| | 4994 | + " -P Set directory prefix to DIR\n" \ |
| | 4995 | + " -O Save to filename ('-' for stdout)\n" \ |
| | 4996 | + " -U Adjust 'User-Agent' field\n" \ |
| | 4997 | + " -Y Use proxy ('on' or 'off')" |
| | 4998 | + |
| | 4999 | +#define which_trivial_usage \ |
| | 5000 | + "[COMMAND ...]" |
| | 5001 | +#define which_full_usage \ |
| | 5002 | + "Locate a COMMAND" |
| | 5003 | +#define which_example_usage \ |
| | 5004 | + "$ which login\n" \ |
| | 5005 | + "/bin/login\n" |
| | 5006 | + |
| | 5007 | +#define who_trivial_usage \ |
| | 5008 | + " " |
| | 5009 | +#define who_full_usage \ |
| | 5010 | + "Print the current user names and related information" |
| | 5011 | + |
| | 5012 | +#define whoami_trivial_usage \ |
| | 5013 | + "" |
| | 5014 | +#define whoami_full_usage \ |
| | 5015 | + "Print the user name associated with the current effective user id" |
| | 5016 | + |
| | 5017 | +#define xargs_trivial_usage \ |
| | 5018 | + "[OPTIONS] [COMMAND] [ARGS...]" |
| | 5019 | +#define xargs_full_usage \ |
| | 5020 | + "Execute COMMAND on every item given by standard input" \ |
| | 5021 | + "\n\nOptions:\n" \ |
| | 5022 | + USE_FEATURE_XARGS_SUPPORT_CONFIRMATION( \ |
| | 5023 | + " -p Prompt the user about whether to run each command\n") \ |
| | 5024 | + " -r Do not run command for empty read lines\n" \ |
| | 5025 | + USE_FEATURE_XARGS_SUPPORT_TERMOPT( \ |
| | 5026 | + " -x Exit if the size is exceeded\n") \ |
| | 5027 | + USE_FEATURE_XARGS_SUPPORT_ZERO_TERM( \ |
| | 5028 | + " -0 Input filenames are terminated by a null character\n") \ |
| | 5029 | + " -t Print the command line on stderr before executing it" |
| | 5030 | +#define xargs_example_usage \ |
| | 5031 | + "$ ls | xargs gzip\n" \ |
| | 5032 | + "$ find . -name '*.c' -print | xargs rm\n" |
| | 5033 | + |
| | 5034 | +#define yes_trivial_usage \ |
| | 5035 | + "[OPTION]... [STRING]..." |
| | 5036 | +#define yes_full_usage \ |
| | 5037 | + "Repeatedly output a line with all specified STRING(s), or 'y'" |
| | 5038 | + |
| | 5039 | +#define zcat_trivial_usage \ |
| | 5040 | + "FILE" |
| | 5041 | +#define zcat_full_usage \ |
| | 5042 | + "Uncompress to stdout" |
| | 5043 | + |
| | 5044 | +#define zcip_trivial_usage \ |
| | 5045 | + "[OPTIONS] ifname script" |
| | 5046 | +#define zcip_full_usage \ |
| | 5047 | + "Manage a ZeroConf IPv4 link-local address" \ |
| | 5048 | + "\n\nOptions:\n" \ |
| | 5049 | + " -f Foreground mode\n" \ |
| | 5050 | + " -q Quit after address (no daemon)\n" \ |
| | 5051 | + " -r 169.254.x.x Request this address first\n" \ |
| | 5052 | + " -v Verbose" |
| | 5053 | + |
| | 5054 | +#endif /* __BB_USAGE_H__ */ |
| | 5055 | diff -urN busybox-1.5.0/libbb/Kbuild busybox-1.5.0-cryptpw/libbb/Kbuild |
| | 5056 | --- busybox-1.5.0/libbb/Kbuild 2007-03-22 13:21:31.000000000 -0700 |
| | 5057 | +++ busybox-1.5.0-cryptpw/libbb/Kbuild 2007-04-25 11:37:22.000000000 -0600 |
| | 5058 | @@ -21,6 +21,7 @@ |
| | 5059 | lib-y += crc32.o |
| | 5060 | lib-y += create_icmp6_socket.o |
| | 5061 | lib-y += create_icmp_socket.o |
| | 5062 | +lib-y += crypt_make_salt.o |
| | 5063 | lib-y += default_error_retval.o |
| | 5064 | lib-y += device_open.o |
| | 5065 | lib-y += dump.o |
| | 5066 | @@ -33,6 +34,7 @@ |
| | 5067 | lib-y += find_pid_by_name.o |
| | 5068 | lib-y += find_root_device.o |
| | 5069 | lib-y += full_write.o |
| | 5070 | +lib-y += get_algo.o |
| | 5071 | lib-y += get_console.o |
| | 5072 | lib-y += get_last_path_component.o |
| | 5073 | lib-y += get_line_from_file.o |
| | 5074 | @@ -99,6 +101,7 @@ |
| | 5075 | lib-$(CONFIG_LOSETUP) += loop.o |
| | 5076 | lib-$(CONFIG_FEATURE_MTAB_SUPPORT) += mtab.o |
| | 5077 | lib-$(CONFIG_PASSWD) += pw_encrypt.o |
| | 5078 | +lib-$(CONFIG_CRYPTPW) += pw_encrypt.o |
| | 5079 | lib-$(CONFIG_SULOGIN) += pw_encrypt.o |
| | 5080 | lib-$(CONFIG_FEATURE_HTTPD_AUTH_MD5) += pw_encrypt.o |
| | 5081 | lib-$(CONFIG_VLOCK) += correct_password.o |
| | 5082 | diff -urN busybox-1.5.0/libbb/crypt_make_salt.c busybox-1.5.0-cryptpw/libbb/crypt_make_salt.c |
| | 5083 | --- busybox-1.5.0/libbb/crypt_make_salt.c 1969-12-31 17:00:00.000000000 -0700 |
| | 5084 | +++ busybox-1.5.0-cryptpw/libbb/crypt_make_salt.c 2007-04-25 11:33:25.000000000 -0600 |