remove duplicate depend, its work for bb_mkdepend
[oweals/busybox.git] / include / usage.h
index 316772ea23386cbca73894ff7ede0bff669bb77b..43b6f70484606f05d1705218c99b0aa3fbf5ecc5 100644 (file)
 #define cmp_trivial_usage \
        "[-l] [-s] FILE1 [FILE2]"
 #define cmp_full_usage \
-       "Compare files.  Compares FILE1 vs stdin if FILE2 is not specified.\n\n" \
+       "Compares FILE1 vs stdin if FILE2 is not specified.\n\n" \
        "Options:\n" \
        "\t-l\tWrite the byte numbers (decimal) and values (octal)\n" \
        "\t\t  for all differing bytes\n" \
        "\t-s\tquiet mode - do not print"
 
+#define comm_trivial_usage \
+       "[-123] FILE1 FILE2"
+#define comm_full_usage \
+       "Compares FILE1 to FILE2, or to stdin if = is specified.\n\n" \
+       "Options:\n" \
+       "\t-1\tSuppress lines unique to FILE1\n" \
+       "\t-2\tSuppress lines unique to FILE2\n" \
+       "\t-3\tSuppress lines common to both files"
+
+#define bbconfig_trivial_usage \
+       ""
+#define bbconfig_full_usage \
+       "Print the config file which built busybox\n"
+       
 #define cp_trivial_usage \
        "[OPTION]... SOURCE DEST"
 #define cp_full_usage \
        "$ echo \"Erik\\nis\\ncool\"\n" \
        "Erik\\nis\\ncool\n")
 
-#ifdef CONFIG_FEATURE_EJECT_LONG_OPTIONS
-# define USAGE_EJECT_TRAYCLOSE ",trayclose"
-#else
-# define USAGE_EJECT_TRAYCLOSE ""
-#endif
-
 #define eject_trivial_usage \
        "[-t] [DEVICE]"
 #define eject_full_usage \
        "Eject specified DEVICE (or default /dev/cdrom).\n\n" \
        "Options:\n" \
-       "\tt" USAGE_EJECT_TRAYCLOSE "\tclose tray"
+       "\t-t\tclose tray"
 
 #define env_trivial_usage \
        "[-iu] [-] [name=value]... [command]"
        "\t-, -i\tstart with an empty environment\n" \
        "\t-u\tremove variable from the environment"
 
+#define ether_wake_trivial_usage \
+       "[-b] [-i iface] [-p aa:bb:cc:dd[:ee:ff]] MAC"
+#define ether_wake_full_usage \
+       "Send a magic packet to wake up sleeping machines.\n" \
+       "MAC must be a station address (00:11:22:33:44:55) or\n" \
+       "    a hostname with a known 'ethers' entry.\n\n" \
+       "Options:\n" \
+       "\t-b\t\tSend wake-up packet to the broadcast address\n" \
+       "\t-i iface\tUse interface ifname instead of the default \"eth0\"\n" \
+       "\t-p pass\tAppend the four or six byte password PW to the packet\n"
+
 #define expr_trivial_usage \
        "EXPRESSION"
 #define expr_full_usage \
        "\t-f\tforce de/configuration"
 
 #define inetd_trivial_usage \
-       "[-q len] [conf]"
+       "[-f] [-q len] [conf]"
 #define inetd_full_usage \
        "Listens for network connections and launches programs\n\n" \
        "Option:\n" \
+       "\t-f\tRun as a foreground progress\n" \
        "\t-q\tSets the size of the socket listen queue to\n" \
        "\t\tthe specified value. Default is 128"
 
        "\t-h\t--hostname\tDisplay first resolved host name\n" \
        "\t-s\t--silent\tDon't ever display error messages.")
 
+#define ipcrm_trivial_usage \
+       "[-[MQS] key] [-[mqs] id]"
+#define ipcrm_full_usage \
+       "The upper-case options MQS are used to remove a shared memory\n" \
+       "segment by an shmkey value. The lower-case options mqs are used\n" \
+       "to remove a segment by shmid value.\n" \
+       "\t-m | -M\tRemove the memory segment after the last detatch\n" \
+       "\t-q | -Q\tRemove the message queue\n" \
+       "\t-s | -S\tRemove the semaphore\n"
+
+#define ipcs_trivial_usage \
+       "[[-smq] -i shmid] | [[-asmq] [-tclup]]"
+#define ipcs_full_usage \
+       "\t-i\tspecify a specific resource id\n" \
+       "Resource specification:\n" \
+       "\t-m\tshared memory segments\n" \
+       "\t-q\tmessage queues\n" \
+       "\t-s\tsempahore arrays\n" \
+       "\t-a\tall (default)\n" \
+       "Output format:\n" \
+       "\t-t\ttime\n" \
+       "\t-p\tpid\n" \
+       "\t-s\tcreator\n" \
+       "\t-a\tlimits\n" \
+       "\t-i\tsummary\n"
+
 #define iplink_trivial_usage \
        "{ set DEVICE { up | down | arp { on | off } | show [ DEVICE ] }"
 #define iplink_full_usage \
        "$ length Hello\n" \
        "5\n"
 
+#define less_trivial_usage \
+       "[-EMNmh~?] FILE1 FILE2..."
+#define less_full_usage \
+       "View a file or list of files. The position within files can be\n" \
+       "changed, and files can be manipulated in various ways with the\n" \
+       "following options:\n\n" \
+       "\t-E\tQuit once the end of a file is reached\n" \
+       "\t-M\tDisplay a status line containing the current line numbers\n" \
+       "\t\tand the percentage through the file\n" \
+       "\t-N\tPrefix line numbers to each line\n" \
+       "\t-m\tDisplay a status line containing the percentage through the\n" \
+       "\t\tfile\n" \
+       "\t-~\tSuppress ~s displayed when input past the end of the file is\n" \
+       "\t\treached.\n" \
+       "\t-h, -?\tDisplay this help message\n"
+
 #define ln_trivial_usage \
        "[OPTION] TARGET... LINK_NAME|DIRECTORY"
 #define ln_full_usage \
 #else
 #  define USAGE_AUTOWIDTH(a)
 #endif
+#ifdef CONFIG_FEATURE_LS_COLOR
+  #define USAGE_LS_COLOR(a) a
+#else
+  #define USAGE_LS_COLOR(a)
+#endif
 
 #define ls_trivial_usage \
        "[-1Aa" USAGE_LS_TIMESTAMPS("c") "Cd" USAGE_LS_TIMESTAMPS("e") USAGE_LS_FILETYPES("F") "iln" USAGE_LS_FILETYPES("p") USAGE_LS_FOLLOWLINKS("L") USAGE_LS_RECURSIVE("R") USAGE_LS_SORTFILES("rS") "s" USAGE_AUTOWIDTH("T") USAGE_LS_TIMESTAMPS("tu") USAGE_LS_SORTFILES("v") USAGE_AUTOWIDTH("w") "x" USAGE_LS_SORTFILES("X") USAGE_HUMAN_READABLE("h") USAGE_NOT_HUMAN_READABLE("") "k" USAGE_SELINUX("K") "] [filenames...]"
        "\t-a\tdo not hide entries starting with .\n" \
        "\t-C\tlist entries by columns\n" \
        USAGE_LS_TIMESTAMPS("\t-c\twith -l: show ctime\n") \
+       USAGE_LS_COLOR("\t--color[={always,never,auto}]\tto control coloring\n") \
        "\t-d\tlist directory entries instead of contents\n" \
        USAGE_LS_TIMESTAMPS("\t-e\tlist both full date and full time\n") \
        USAGE_LS_FILETYPES("\t-F\tappend indicator (one of */=@|) to entries\n") \
 #define lsmod_full_usage \
        "List the currently loaded kernel modules."
 
+#ifdef CONFIG_FEATURE_MAKEDEVS_LEAF
 #define makedevs_trivial_usage \
        "NAME TYPE MAJOR MINOR FIRST LAST [s]"
 #define makedevs_full_usage \
        "[creates ttyS2-ttyS63]\n" \
        "# makedevs /dev/hda b 3 0 0 8 s\n" \
        "[creates hda,hda1-hda8]\n"
+#endif
+
+#ifdef CONFIG_FEATURE_MAKEDEVS_TABLE
+#define makedevs_trivial_usage \
+       "[-d device_table] rootdir"
+#define makedevs_full_usage \
+       "Creates a range of special files as specified in a device table.\n" \
+       "Device table entries take the form of:\n" \
+       "<type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count>\n" \
+       "Where name is the file name,  type can be one of:\n" \
+       "      f       A regular file\n" \
+       "      d       Directory\n" \
+       "      c       Character special device file\n" \
+       "      b       Block special device file\n" \
+       "      p       Fifo (named pipe)\n" \
+       "uid is the user id for the target file, gid is the group id for the\n" \
+       "target file.  The rest of the entries (major, minor, etc) apply to\n" \
+       "to device special files.  A '-' may be used for blank entries."
+#define makedevs_example_usage \
+       "For example:\n" \
+       "<name>    <type> <mode><uid><gid><major><minor><start><inc><count>\n" \
+       "/dev         d   755    0    0    -      -      -      -    -\n" \
+       "/dev/console c   666    0    0    5      1      -      -    -\n" \
+       "/dev/null    c   666    0    0    1      3      0      0    -\n" \
+       "/dev/zero    c   666    0    0    1      5      0      0    -\n" \
+       "/dev/hda     b   640    0    0    3      0      0      0    -\n" \
+       "/dev/hda     b   640    0    0    3      1      1      1    15\n\n" \
+       "Will Produce:\n" \
+       "/dev\n" \
+       "/dev/console\n" \
+       "/dev/null\n" \
+       "/dev/zero\n" \
+       "/dev/hda\n" \
+       "/dev/hda[0-15]\n"
+#endif
 
 #ifdef CONFIG_FEATURE_MD5_SHA1_SUM_CHECK
 #define USAGE_MD5_SHA1_SUM_CHECK(a) a
        "/tmp/foo/bar/baz: No such file or directory\n" \
        "$ mkdir -p /tmp/foo/bar/baz\n"
 
+#define mke2fs_trivial_usage \
+       "[-c|-l filename] [-b block-size] [-f fragment-size] [-g blocks-per-group] " \
+       "[-i bytes-per-inode] [-j] [-J journal-options] [-N number-of-inodes] [-n] " \
+       "[-m reserved-blocks-percentage] [-o creator-os] [-O feature[,...]] [-q] " \
+       "[r fs-revision-level] [-E extended-options] [-v] [-F] [-L volume-label] " \
+       "[-M last-mounted-directory] [-S] [-T filesystem-type] " \
+       "device [blocks-count]"
+#define mke2fs_full_usage \
+       "\t-b size\tblock size in bytes\n" \
+       "\t-c\tcheck for bad blocks before creating\n" \
+       "\t-E opts\tset extended options\n" \
+       "\t-f size\tfragment size in bytes\n" \
+       "\t-F\tforce (ignore sanity checks)\n" \
+       "\t-g num\tnumber of blocks in a block group\n" \
+       "\t-i ratio\tthe bytes/inode ratio\n" \
+       "\t-j\tcreate a journal (ext3)\n" \
+       "\t-J opts\tset journal options (size/device)\n" \
+       "\t-l file\tread bad blocks list from file\n" \
+       "\t-L lbl\tset the volume label\n" \
+       "\t-m percent\tpercent of fs blocks to reserve for admin\n" \
+       "\t-M dir\tset last mounted directory\n" \
+       "\t-n\tdo not actually create anything\n" \
+       "\t-N num\tnumber of inodes to create\n" \
+       "\t-o os\tset the 'creator os' field\n" \
+       "\t-O features\tdir_index/filetype/has_journal/journal_dev/sparse_super\n" \
+       "\t-q\tquiet execution\n" \
+       "\t-r rev\tset filesystem revision\n" \
+       "\t-S\twrite superblock and group descriptors only\n" \
+       "\t-T fs-type\tset usage type (news/largefile/largefile4)\n" \
+       "\t-v\tverbose execution"
+
 #define mkfifo_trivial_usage \
        "[OPTIONS] name"
 #define mkfifo_full_usage \
        "$ mount /dev/fd0 /mnt -t msdos -o ro\n" \
        "$ mount /tmp/diskimage /opt -t ext2 -o loop\n"
 
+#define mountpoint_trivial_usage \
+       "[-q] <[-d] DIR | -x DEVICE>"
+#define mountpoint_full_usage \
+       "mountpoint checks if the directory is a mountpoint\n\n" \
+       "Options:\n"  \
+       "\t-q:\t\tBe more quiet\n" \
+       "\t-d:\t\tPrint major/minor device number of the filesystem\n" \
+       "\t-x:\t\tPrint major/minor device number of the blockdevice"
+#define mountpoint_example_usage \
+       "$ mountpoint /proc\n" \
+       "/proc is not a mountpoint\n" \
+       "$ mountpoint /sys\n" \
+       "/sys is a mountpoint\n"
+
 #define mt_trivial_usage \
        "[-f device] opcode value"
 #define mt_full_usage \
        "\t-u\tUnlocks (re-enables) the specified user account"
 
 #define patch_trivial_usage \
-       "[-p<num>]"
+       "[-p<num>] [-i<patch.diff>]"
 #define patch_full_usage \
-       "[-p<num>]"
+       "[-p<num>]\n" \
+       "[-i<diff>]"
 #define patch_example_usage \
-       "$ patch -p1 <example.diff"
+       "$ patch -p1 <example.diff\n" \
+       "$ patch -p0 -i example.diff"
 
 #define pidof_trivial_usage \
        "process-name [OPTION] [process-name ...]"
        "$ printf \"Val=%d\\n\" 5\n" \
        "Val=5\n"
 
+#if !defined(CONFIG_SELINUX) && !defined(CONFIG_PS_FEATURE_WIDE)
+#define USAGE_PS "\n\tThis version of ps accepts no options."
+#else
+#define USAGE_PS "\nOptions:"
+#endif
 #ifdef CONFIG_SELINUX
 #define USAGE_NONSELINUX(a)
 #else
 #define USAGE_NONSELINUX(a) a
 #endif
+#ifdef CONFIG_PS_FEATURE_WIDE
+#define USAGE_PS_WIDE(a) a
+#else
+#define USAGE_PS_WIDE(a)
+#endif
 
 #define ps_trivial_usage \
        ""
 #define ps_full_usage \
        "Report process status\n" \
-       USAGE_NONSELINUX("\n\tThis version of ps accepts no options.") \
-       USAGE_SELINUX("\nOptions:\n\t-c\tshow SE Linux context")
+       USAGE_PS \
+       USAGE_SELINUX("\n\t-c\tshow SE Linux context") \
+       USAGE_PS_WIDE("\n\tw\twide output")
+
 
 #define ps_example_usage \
        "$ ps\n" \
        USAGE_READLINK_FOLLOW("\n\nOptions:\n" \
        "\t-f\tcanonicalize by following all symlinks")
 
+#define readprofile_trivial_usage \
+       "[OPTIONS]..."
+#define readprofile_full_usage \
+       "Options:\n" \
+       "\t -m <mapfile>  (default: /boot/System.map)\n" \
+       "\t -p <profile>  (default: /proc/profile)\n" \
+       "\t -M <mult>     set the profiling multiplier to <mult>\n" \
+       "\t -i            print only info about the sampling step\n" \
+       "\t -v            print verbose data\n" \
+       "\t -a            print all symbols, even if count is 0\n" \
+       "\t -b            print individual histogram-bin counts\n" \
+       "\t -s            print individual counters within functions\n" \
+       "\t -r            reset all the counters (root only)\n" \
+       "\t -n            disable byte order auto-detection"
+
 #define realpath_trivial_usage \
        "pathname  ..."
 #define realpath_full_usage \
        "\tFIRST\tLAST\n" \
        "\tFIRST\tINCREMENT\tLAST"
 
+#define setconsole_trivial_usage \
+       "[-r|--reset] [DEVICE]"
+#define setconsole_full_usage \
+       "Redirects system console output to DEVICE (default: /dev/tty).\n\n" \
+       "Options:\n" \
+       "\t-r\tReset output to /dev/console."
+
 #define setkeycodes_trivial_usage \
        "SCANCODE KEYCODE ..."
 #define setkeycodes_full_usage \
 #define setkeycodes_example_usage \
        "$ setkeycodes e030 127\n"
 
+#define setsid_trivial_usage \
+       "program [arg ...]"
+#define setsid_full_usage \
+       "Runs any program in a new session by calling setsid() before\n" \
+       "exec'ing the rest of its arguments.  See setsid(2) for details."
+
 #define lash_trivial_usage \
        "[FILE]...\n" \
        "or: sh -c command [args]..."
        "\t-s\tuse System V sum algorithm (512byte blocks)"
 
 #define swapoff_trivial_usage \
-       "[OPTION] [DEVICE]"
+       "[-a] [DEVICE]"
 #define swapoff_full_usage \
        "Stop swapping virtual memory pages on DEVICE.\n\n" \
        "Options:\n" \
        "\t-a\tStop swapping on all swap devices"
 
 #define swapon_trivial_usage \
-       "[OPTION] [DEVICE]"
+       "[-a] [DEVICE]"
 #define swapon_full_usage \
        "Start swapping virtual memory pages on DEVICE.\n\n" \
        "Options:\n" \
 #  define USAGE_IPC_LOG(a)
 #endif
 
-#ifdef CONFIG_SYSCTL
 #define sysctl_trivial_usage \
        "[OPTIONS]... [VALUE]..."
-#define sysctl_full_usage
-       "sysctl - configure kernel parameters at runtime\n\n" \
+#define sysctl_full_usage \
+       "configure kernel parameters at runtime\n\n" \
        "Options:\n" \
        "\t-n\tUse this option to disable printing of the key name when printing values\n" \
        "\t-w\tUse this option when you want to change a sysctl setting\n" \
        "\t-p\tLoad in sysctl settings from the file specified or /etc/sysctl.conf if none given\n" \
        "\t-a\tDisplay all values currently available\n" \
        "\t-A\tDisplay all values currently available in table form"
-#define sysctl_example_usage
+#define sysctl_example_usage \
        "sysctl [-n] variable ...\n" \
        "sysctl [-n] -w variable=value ...\n" \
        "sysctl [-n] -a\n" \
        "sysctl [-n] -p <file>\t(default /etc/sysctl.conf)\n" \
        "sysctl [-n] -A\n"
-#endif
 
 #define syslogd_trivial_usage \
        "[OPTION]..."
        "hello world\n"
 
 #define traceroute_trivial_usage \
-       "[-dnrv] [-m max_ttl] [-p port#] [-q nqueries]\n" \
-       "\t[-s src_addr] [-t tos] [-w wait] host [data size]"
+       "[-FIldnrv] [-f 1st_ttl] [-m max_ttl] [-p port#] [-q nqueries]\n" \
+       "\t[-s src_addr] [-t tos] [-w wait] [-g gateway] [-i iface]\n" \
+       "\t[-z pausemsecs] host [data size]"
 #define traceroute_full_usage \
        "trace the route ip packets follow going to \"host\"\n" \
        "Options:\n" \
-       "\t-d\tset SO_DEBUG options to socket\n" \
+       "\t-F\tSet the don't fragment bit\n" \
+       "\t-I\tUse ICMP ECHO instead of UDP datagrams\n" \
+       "\t-l\tDisplay the ttl value of the returned packet\n" \
+       "\t-d\tSet SO_DEBUG options to socket\n" \
        "\t-n\tPrint hop addresses numerically rather than symbolically\n" \
        "\t-r\tBypass the normal routing tables and send directly to a host\n" \
        "\t-v\tVerbose output\n" \
        "\t-t tos\tSet the type-of-service in probe packets to the following value\n" \
        "\t\t(default 0)\n" \
        "\t-w wait\tSet the time (in seconds) to wait for a response to a probe\n" \
-       "\t\t(default 3 sec.)"
+       "\t\t(default 3 sec.)\n" \
+       "\t-g\tSpecify a loose source route gateway (8 maximum)" 
 
 
 #define true_trivial_usage \
        "$ tty\n" \
        "/dev/tty2\n"
 
+#define tune2fs_trivial_usage \
+       "[-c max-mounts-count] [-e errors-behavior] [-g group] " \
+       "[-i interval[d|m|w]] [-j] [-J journal-options] [-l] [-s sparse-flag] " \
+       "[-m reserved-blocks-percent] [-o [^]mount-options[,...]] " \
+       "[-r reserved-blocks-count] [-u user] [-C mount-count] " \
+       "[-L volume-label] [-M last-mounted-dir] [-O [^]feature[,...]] " \
+       "[-T last-check-time] [-U UUID] device"
+#define tune2fs_full_usage \
+       "Adjust filesystem options on ext[23] filesystems.\n\n"
+
 #define udhcpc_trivial_usage \
-       "[-fbnqv] [-c CLIENTID] [-H HOSTNAME] [-i INTERFACE]\n[-p pidfile] [-r IP] [-s script]"
+       "[-Cfbnqv] [-c CLIENTID] [-H HOSTNAME] [-i INTERFACE]\n[-p pidfile] [-r IP] [-s script]"
 #define udhcpc_full_usage \
-       "\t-c,\t--clientid=CLIENTID\tClient identifier\n" \
+       "\t-c,\t--clientid=CLIENTID\tSet client identifier\n" \
+       "\t-C,\t--clientid-none\tSuppress default client identifier\n" \
        "\t-H,\t--hostname=HOSTNAME\tClient hostname\n" \
        "\t-h,\t                   \tAlias for -H\n" \
        "\t-f,\t--foreground\tDo not fork after getting lease\n" \
        "\t-f\tforce overwrite an existing file"
 
 #define uniq_trivial_usage \
-       "[OPTION]... [INPUT [OUTPUT]]"
+       "[-fscdu]... [INPUT [OUTPUT]]"
 #define uniq_full_usage \
        "Discard all but one of successive identical lines from INPUT\n" \
        "(or standard input), writing to OUTPUT (or standard output).\n\n" \