X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=include%2Fusage.h;h=077306bdf7733cec885a794f5480cf7cf2f50615;hb=97d86f2bb59751be52fb3ee5cdb8b06e7b3bb98f;hp=8ea8c5a92057970a763b66d719ccf16b58a2e975;hpb=bf1cc8b1b7a218a4c2f4bfb23ea44c74b65ebbf6;p=oweals%2Fbusybox.git diff --git a/include/usage.h b/include/usage.h index 8ea8c5a92..077306bdf 100644 --- a/include/usage.h +++ b/include/usage.h @@ -1,12 +1,12 @@ #define addgroup_trivial_usage \ - "[OPTIONS] " + "[OPTIONS] group_name [user_name]" #define addgroup_full_usage \ "Adds a group to the system" \ "Options:\n" \ "\t-g\t\tspecify gid\n" #define adduser_trivial_usage \ - "[OPTIONS] " + "[OPTIONS] user_name" #define adduser_full_usage \ "Adds a user to the system" \ "Options:\n" \ @@ -38,6 +38,23 @@ "\t-x\t\textract\n" \ "\t-v\t\tverbosely list files processed\n" +#define arping_trivial_usage \ + "[-fqbDUA] [-c count] [-w timeout] [-I device] [-s sender] target\n" +#define arping_full_usage \ + "Ping hosts by ARP requests/replies.\n\n" \ + "Options:\n" \ + "\t-f\t\tQuit on first ARP reply\n" \ + "\t-q\t\tBe quiet\n" \ + "\t-b\t\tKeep broadcasting, don't go unicast\n" \ + "\t-D\t\tDuplicated address detection mode\n" \ + "\t-U\t\tUnsolicited ARP mode, update your neighbours\n" \ + "\t-A\t\tARP answer mode, update your neighbours\n" \ + "\t-c count\tStop after sending count ARP request packets\n" \ + "\t-w timeout\tTime to wait for ARP reply, in seconds\n" \ + "\t-I device\tOutgoing interface name, default is eth0\n" \ + "\t-s sender\tSet specific sender IP address\n" \ + "\ttarget\t\tTarget IP address of ARP request\n" + #define awk_trivial_usage \ "[-v var=val][-F sep] { -f progname | 'programtext' } [FILE ...]" #define awk_full_usage \ @@ -245,7 +262,12 @@ #define dc_full_usage \ "This is a Tiny RPN calculator that understands the\n" \ "following operations: +, -, /, *, and, or, not, eor.\n" \ - "i.e., 'dc 2 2 add' -> 4, and 'dc 8 8 \\* 2 2 + /' -> 16" + "i.e., 'dc 2 2 add' -> 4, and 'dc 8 8 \\* 2 2 + /' -> 16" \ + "p - Prints the value on the top of the stack, without altering the stack.\n" \ + "f - Prints the entire contents of the stack without altering anything.\n" \ + "o - Pops the value off the top of the stack and uses it to set the output radix.\n" \ + " Only 10 and 16 are supported.\n" + #define dc_example_usage \ "$ dc 2 2 +\n" \ "4\n" \ @@ -412,7 +434,6 @@ #define dumpleases_trivial_usage \ "[-r|-a] [-f LEASEFILE]" #define dumpleases_full_usage \ - "Usage: dumpleases -f -[r|a]\n" \ "\t-f,\t--file=FILENAME\tLeases file to load\n" \ "\t-r,\t--remaining\tInterepret lease times as time remaing\n" \ "\t-a,\t--absolute\tInterepret lease times as expire time\n" @@ -521,6 +542,17 @@ #define fdflush_full_usage \ "Forces floppy disk drive to detect disk change" +#define fdisk_trivial_usage \ + "[-l] [-v] [-b SSZ] [-u] DISK" +#define fdisk_full_usage \ + "Change partition table\n" \ + "Options:\n" \ + "-l List partition table(s)\n" \ + "-u Give Start and End in sector (instead of cylinder) units\n" \ + "-s PARTITION Give partition size(s) in blocks\n" \ + "-b 2048: (for certain MO disks) use 2048-byte sectors\n" \ + "-v Give fdisk version" + #ifdef CONFIG_FEATURE_FIND_TYPE #define USAGE_FIND_TYPE(a) a #else @@ -536,6 +568,16 @@ #else #define USAGE_FIND_MTIME(a) #endif +#ifdef CONFIG_FEATURE_FIND_NEWER + #define USAGE_FIND_NEWER(a) a +#else + #define USAGE_FIND_NEWER(a) +#endif +#ifdef CONFIG_FEATURE_FIND_INUM + #define USAGE_FIND_INUM(a) a +#else + #define USAGE_FIND_INUM(a) +#endif #define find_trivial_usage \ "[PATH...] [EXPRESSION]" @@ -551,7 +593,11 @@ ) USAGE_FIND_PERM( \ "\n\t-perm PERMS\tPermissions match any of (+NNN); all of (-NNN);\n\t\t\tor exactly (NNN)" \ ) USAGE_FIND_MTIME( \ - "\n\t-mtime TIME\tModified time is greater than (+N); less than (-N);\n\t\t\tor exactly (N) days") + "\n\t-mtime TIME\tModified time is greater than (+N); less than (-N);\n\t\t\tor exactly (N) days" \ +) USAGE_FIND_NEWER( \ + "\n\t-newer FILE\tModified time is more recent than FILE's" \ +) USAGE_FIND_INUM( \ + "\n\t-inum N\t\tFile has inode number N") #define find_example_usage \ "$ find / -name /etc/passwd\n" \ "/etc/passwd\n" @@ -587,6 +633,27 @@ "\t-m\tActivates MINIX-like \"mode not cleared\" warnings\n" \ "\t-f\tForce file system check." +#define ftpget_trivial_usage \ + "[options] remote-host local-directory remote-file" +#define ftpget_full_usage \ + "Retrieve a remote file via FTP.\n\n" \ + "Options:\n" \ + "\t-c, --continue Continue a previous transfer\n" \ + "\t-v, --verbose Verbose\n" \ + "\t-u, --username Username to be used\n" \ + "\t-p, --password Password to be used\n" \ + "\t-P, --port Port number to be used\n" + +#define ftpput_trivial_usage \ + "[options] remote-host remote-directory local-file" +#define ftpput_full_usage \ + "Store a local file on a remote machine via FTP.\n\n" \ + "Options:\n" \ + "\t-v, --verbose Verbose\n" \ + "\t-u, --username Username to be used\n" \ + "\t-p, --password Password to be used\n" \ + "\t-P, --port Port number to be used\n" + #define getopt_trivial_usage \ "[OPTIONS]..." #define getopt_full_usage \ @@ -739,7 +806,20 @@ #define hostname_example_usage \ "$ hostname\n" \ "sage \n" - +#ifdef CONFIG_FEATURE_HTTPD_BASIC_AUTH + #define USAGE_HTTPD_BASIC_AUTH(a) a +#else + #define USAGE_HTTPD_BASIC_AUTH(a) +#endif +#define httpd_trivial_usage \ + "[-p ] [-d/-e ]" USAGE_HTTPD_BASIC_AUTH(" [-c ] [-r ]") +#define httpd_full_usage \ + "Listens for incoming http server requests.\n"\ + "Options:\n" \ + "\t-p PORT\tServer port (default 80).\n" \ + USAGE_HTTPD_BASIC_AUTH("\t-c FILE\tSpecifies configuration file. (default httpd.conf)\n\t-r REALM\tAuthentication Realm for Basic Authentication\n") \ + "\t-e STRING\tHtml encode STRING\n" \ + "\t-d STRING\tURL decode STRING\n" #define hwclock_trivial_usage \ "[-r|--show] [-s|--hctosys] [-w|--systohc] [-l|--localtime] [-u|--utc]" #define hwclock_full_usage \ @@ -807,6 +887,34 @@ USAGE_IFCONFIG_MII("\t[mem_start ] [io_addr ] [irq ]\n") \ "\t[up|down] ..." +#define ifup_trivial_usage \ + "<-ahinv> " +#define ifup_full_usage \ + "Usage: ifup \n\n" \ + "Options:\n" \ + "\t-h\tthis help\n" \ + "\t-a\tde/configure all interfaces automatically\n" \ + "\t-i FILE\tuse FILE for interface definitions\n" \ + "\t-n\tprint out what would happen, but don't do it\n" \ + "\t\t\t(note that this option doesn't disable mappings)\n" \ + "\t-v\tprint out what would happen before doing it\n" \ + "\t-m\tdon't run any mappings\n" \ + "\t-f\tforce de/configuration\n" + +#define ifdown_trivial_usage \ + "<-ahinv> " +#define ifdown_full_usage \ + "Usage: ifdown \n\n" \ + "Options:\n" \ + "\t-h\tthis help\n" \ + "\t-a\tde/configure all interfaces automatically\n" \ + "\t-i FILE\tuse FILE for interface definitions\n" \ + "\t-n\tprint out what would happen, but don't do it\n" \ + "\t\t(note that this option doesn't disable mappings)\n" \ + "\t-v\tprint out what would happen before doing it\n" \ + "\t-m\tdon't run any mappings\n" \ + "\t-f\tforce de/configuration\n" + #define init_trivial_usage \ "" #define init_full_usage \ @@ -918,8 +1026,8 @@ " \n" \ " # /sbin/getty invocations for selected ttys\n" \ " #\n" \ -" tty4::respawn:/sbin/getty 38400 tty5\n" \ -" tty5::respawn:/sbin/getty 38400 tty6\n" \ +" tty4::respawn:/sbin/getty 38400 tty4\n" \ +" tty5::respawn:/sbin/getty 38400 tty5\n" \ " \n" \ " \n" \ " # Example of how to put a getty on a serial line (for a terminal)\n" \ @@ -938,6 +1046,11 @@ " ::shutdown:/bin/umount -a -r\n" \ " ::shutdown:/sbin/swapoff -a\n" +#ifdef CONFIG_FEATURE_INSMOD_LOAD_MAP + #define USAGE_INSMOD_MAP(a) a +#else + #define USAGE_INSMOD_MAP(a) +#endif #define insmod_trivial_usage \ "[OPTION]... MODULE [symbol=value]..." #define insmod_full_usage \ @@ -947,7 +1060,82 @@ "\t-k\tMake module autoclean-able.\n" \ "\t-v\tverbose output\n" \ "\t-L\tLock to prevent simultaneous loads of a module\n" \ - "\t-x\tdo not export externs" + USAGE_INSMOD_MAP("\t-m\tOutput load map to stdout") \ + "\t-x\tdo not export externs\n" + +#define ip_trivial_usage \ + "[ OPTIONS ] { address | link | route | tunnel } { COMMAND | help }" +#define ip_full_usage \ + "ip [ OPTIONS ] OBJECT { COMMAND | help }\n" \ + "where OBJECT := { link | addr | route | tunnel }\n" \ + "OPTIONS := { -f[amily] { inet | inet6 | link } | -o[neline] }\n" + +#define ipaddr_trivial_usage \ + "{ {add|del} IFADDR dev STRING | {show|flush} [ dev STRING ] [ to PREFIX ] }" +#define ipaddr_full_usage \ + "ipaddr {add|del} IFADDR dev STRING\n" \ + "ipaddr {show|flush} [ dev STRING ] [ scope SCOPE-ID ]\n" \ + " [ to PREFIX ] [ label PATTERN ]\n" \ + "IFADDR := PREFIX | ADDR peer PREFIX\n" \ + " [ broadcast ADDR ] [ anycast ADDR ]\n" \ + " [ label STRING ] [ scope SCOPE-ID ]\n" \ + "SCOPE-ID := [ host | link | global | NUMBER ]\n" + +#ifndef CONFIG_FEATURE_IPCALC_FANCY +# define ipcalc_trivial_usage \ + "[--broadcast] [--netmask] [--network] ipaddr " + +# define ipcalc_full_usage \ + "Calculate IP network settings from a IP address\n\n" \ + "Options:\n" \ + "\t-b\t--broadcast\tDisplay calculated broadcast address.\n" \ + "\t-n\t--netmask\tDisplay default netmask for IP.\n" \ + "\t-w\t--network\tDisplay calculated network address." +#else +# define ipcalc_trivial_usage \ + "[OPTION]... ipaddr " + +# define ipcalc_full_usage \ + "Calculate IP network settings from a IP address\n\n" \ + "Options:\n" \ + "\t-b\t--broadcast\tDisplay calculated broadcast address.\n" \ + "\t-n\t--netmask\tDisplay default netmask for IP.\n" \ + "\t-w\t--network\tDisplay calculated network address.\n" \ + "\t-h\t--hostname\tDisplay first resolved host name.\n" \ + "\t-s\t--silent\tDon't ever display error messages." +#endif + +#define ipcalc_notes_usage \ + "ipcalc provides a simple way to calculate IP information for\n" \ + "a host. The various options specify what information ipcalc\n" \ + "should display on standard out. Multiple options may be\n" \ + "specified.\n" + +#define iplink_trivial_usage \ + "{ set DEVICE { up | down | arp { on | off } | show [ DEVICE ] }" +#define iplink_full_usage \ + "iplink set DEVICE { up | down | arp { on | off } |\n" \ + " dynamic { on | off } |\n" \ + " mtu MTU }\n" \ + "iplink show [ DEVICE ]\n" + +#define iproute_trivial_usage \ + "{ list | flush | { add | del | change | append | replace | monitor } ROUTE }" +#define iproute_full_usage \ + "iproute { list | flush } SELECTOR\n" \ + "iproute get ADDRESS [ from ADDRESS iif STRING ]\n" \ + " [ oif STRING ] [ tos TOS ]\n" \ + "iproute { add | del | change | append | replace | monitor } ROUTE\n" \ + "SELECTOR := [ root PREFIX ] [ match PREFIX ] [ proto RTPROTO ]\n" \ + "ROUTE := [ TYPE ] PREFIX [ tos TOS ] [ proto RTPROTO ]\n" + +#define iptunnel_trivial_usage \ + "{ add | change | del | show } [ NAME ] [ mode { ipip | gre | sit } ] [ remote ADDR ] [ local ADDR ] [ ttl TTL ]" +#define iptunnel_full_usage \ + "iptunnel { add | change | del | show } [ NAME ]\n" \ + " [ mode { ipip | gre | sit } ] [ remote ADDR ] [ local ADDR ]\n" \ + " [ [i|o]seq ] [ [i|o]key KEY ] [ [i|o]csum ]\n" \ + " [ ttl TTL ] [ tos TOS ] [ [no]pmtudisc ] [ dev PHYS_DEV ]\n" #define kill_trivial_usage \ "[-signal] process-id [process-id ...]" @@ -975,10 +1163,11 @@ "$ killall apache\n" #define klogd_trivial_usage \ - "-n" + "[-c n] [-n]" #define klogd_full_usage \ "Kernel logger.\n"\ "Options:\n"\ + "\t-c n\tSets the default log level of console messages to n.\n"\ "\t-n\tRun as a foreground process." #define length_trivial_usage \ @@ -1335,6 +1524,19 @@ #define mv_example_usage \ "$ mv /tmp/foo /bin/bar\n" +#define nameif_trivial_usage \ + "[-s] [-c FILE] [{IFNAME MACADDR}]" +#define nameif_full_usage \ + "Nameif renaming network interface while it in the down state.\n\n" \ + "Options:\n" \ + "\t-c FILE\t\tUse configuration file (default is /etc/mactab)\n" \ + "\t-s\t\tUse syslog (LOCAL0 facility).\n" \ + "\tIFNAME MACADDR\tnew_interface_name interface_mac_address\n" +#define nameif_example_usage \ + "$ nameif -s dmz0 00:A0:C9:8C:F6:3F\n" \ + " or\n" \ + "$ nameif -c /etc/my_mactab_file\n" \ + #define nc_trivial_usage \ "[OPTIONS] [IP] [port]" #define nc_full_usage \ @@ -1524,6 +1726,11 @@ #define readlink_full_usage \ "Read a symbolic link." +#define realpath_trivial_usage \ + "pathname ..." +#define realpath_full_usage \ + "return the canonicalized absolute pathnames of given arguments\n\n" + #define reboot_trivial_usage \ "" #define reboot_full_usage \ @@ -1565,7 +1772,7 @@ #define rmmod_full_usage \ "Unloads the specified kernel modules from the kernel.\n\n" \ "Options:\n" \ - "\t-a\tTry to remove all unused kernel modules." + "\t-a\tRemove all unused modules (recursively)" #define rmmod_example_usage \ "$ rmmod tulip\n" @@ -1577,6 +1784,19 @@ "\t-n\tDont resolve names.\n" \ "\t-e\tDisplay other/more information" +#define rpm_trivial_usage \ + "-i -q[ildc]p package.rpm" +#define rpm_full_usage \ + "Manipulates RPM packages" \ + "Options:" \ + "\t-i Install package" \ + "\t-q Query package" \ + "\t\t-p Query uninstalled package" \ + "\t\t-i Show information" \ + "\t\t-l List contents" \ + "\t\t-d List documents" \ + "\t\t-c List config files" + #define rpm2cpio_trivial_usage \ "package.rpm" #define rpm2cpio_full_usage \ @@ -1681,6 +1901,15 @@ "-s \t\tsignal to send (default 15)\n"\ "-a \t\tprogram to start (default )\n" +#define strings_trivial_usage \ + "[-afo] [-n length] [file ... ]" +#define strings_full_usage \ + "Display printable strings in a binary file." \ + "\n\nOptions:" \ + "\n\t-f\tPrecede each string with the name of the file where it was found." \ + "\n\t-n N\tSpecifies that at least N characters forms a sequence (default 4)" \ + "\n\t-o\tEach string is preceded by its decimal offset in the file." + #define stty_trivial_usage \ "[-a|g] [-F DEVICE] [SETTING]..." #define stty_full_usage \ @@ -1793,8 +2022,19 @@ #else #define USAGE_TAR_EXCLUDE(a) #endif +#ifdef CONFIG_FEATURE_TAR_GZIP + #define USAGE_TAR_GZIP(a) a +#else + #define USAGE_TAR_GZIP(a) +#endif +#ifdef CONFIG_FEATURE_TAR_BZIP2 + #define USAGE_TAR_BZIP2(a) a +#else + #define USAGE_TAR_BZIP2(a) +#endif + #define tar_trivial_usage \ - "-[" USAGE_TAR_CREATE("c") "xtvO] " \ + "-[" USAGE_TAR_CREATE("c") USAGE_TAR_GZIP("z") USAGE_TAR_BZIP2("j") "xtvO] " \ USAGE_TAR_EXCLUDE("[--exclude FILE] [-X FILE]") \ "[-f TARFILE] [-C DIR] [FILE(s)] ..." #define tar_full_usage \ @@ -1803,6 +2043,9 @@ USAGE_TAR_CREATE("\tc\t\tcreate\n") \ "\tx\t\textract\n" \ "\tt\t\tlist\n" \ + "\nArchive format selection:\n" \ + USAGE_TAR_GZIP("\tz\t\tFilter the archive through gzip\n") \ + USAGE_TAR_BZIP2("\tj\t\tFilter the archive through bzip2\n") \ "\nFile selection:\n" \ "\tf\t\tname of TARFILE or \"-\" for stdin\n" \ "\tO\t\textract to stdout\n" \ @@ -1979,10 +2222,9 @@ #define udhcpc_trivial_usage \ "[-fbnqv] [-c CLIENTID] [-H HOSTNAME] [-i INTERFACE]\n[-p pidfile] [-r IP] [-s script]" #define udhcpc_full_usage \ - "\tUsage: udhcpc [OPTIONS]\n" \ "\t-c,\t--clientid=CLIENTID\tClient identifier\n" \ "\t-H,\t--hostname=HOSTNAME\tClient hostname\n" \ - "\t-h,\t \tAlias for -h\n" \ + "\t-h,\t \tAlias for -H\n" \ "\t-f,\t--foreground\tDo not fork after getting lease\n" \ "\t-b,\t--background\tFork to background if lease cannot be immediately negotiated.\n" \ "\t-i,\t--interface=INTERFACE\tInterface to use (default: eth0)\n" \ @@ -1997,7 +2239,7 @@ "[configfile]\n" \ #define udhcpd_full_usage \ - "\tUsage: udhcpd [configfile]\n" + "" #ifdef CONFIG_FEATURE_MOUNT_FORCE #define USAGE_MOUNT_FORCE(a) a @@ -2190,6 +2432,7 @@ #define which_example_usage \ "$ which login\n" \ "/bin/login\n" + #define who_trivial_usage \ " " #define who_full_usage \ @@ -2201,9 +2444,13 @@ "Prints the user name associated with the current effective user id." #define xargs_trivial_usage \ - "[COMMAND] [ARGS...]" + "[COMMAND] [-prt] [ARGS...]" #define xargs_full_usage \ - "Executes COMMAND on every item given by standard input." + "Executes COMMAND on every item given by standard input.\n\n" \ + "Options:\n" \ + "\t-p\tPrompt the user about whether to run each command\n" \ + "\t-r\tDo not run command for empty readed lines\n" \ + "\t-t\tPrint the command line on stderr before executing it." #define xargs_example_usage \ "$ ls | xargs gzip\n" \ "$ find . -name '*.c' -print | xargs rm\n"