X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=usage.h;h=2c7f9c27789d4df4d195c4871c061f34fef30111;hb=30592a54514ca52253ed5f2eff64684e32d7ff05;hp=772585b540ae8b90a685fe23710f6dfd67d1fc72;hpb=704b2c212256a052d60032bfb54521cf94f91dfd;p=oweals%2Fbusybox.git diff --git a/usage.h b/usage.h index 772585b54..2c7f9c277 100644 --- a/usage.h +++ b/usage.h @@ -1,3 +1,16 @@ +#define adjtimex_trivial_usage \ + "[-q] [-o offset] [-f frequency] [-p timeconstant] [-t tick]" +#define adjtimex_full_usage \ + "Reads and optionally sets system timebase parameters.\n" \ + "See adjtimex(2).\n\n" \ + "Options:\n" \ + "\t-q\t\tquiet mode - do not print\n" \ + "\t-o offset\ttime offset, microseconds\n" \ + "\t-f frequency\tfrequency adjust, integer kernel units (65536 is 1ppm)\n" \ + "\t\t\t(positive values make the system clock run fast)\n" \ + "\t-t tick\t\tmicroseconds per tick, usually 10000\n" \ + "\t-p timeconstant\n" + #define ar_trivial_usage \ "-[ovR]{ptx} archive filenames" #define ar_full_usage \ @@ -62,7 +75,7 @@ "-r--r--r-- 1 root root 0 Apr 12 18:25 /tmp/foo\n" #define chown_trivial_usage \ - "[OPTION]... OWNER[<.|:>[GROUP] FILE..." + "[OPTION]... OWNER[<.|:>[GROUP]] FILE..." #define chown_full_usage \ "Change the owner and/or group of each FILE to OWNER and/or GROUP.\n" \ "\nOptions:\n" \ @@ -102,6 +115,7 @@ #define cmp_trivial_usage \ "FILE1 [FILE2]" #define cmp_full_usage \ + "\t-s\tquiet mode - do not print\n" \ "Compare files." #define cp_trivial_usage \ @@ -252,13 +266,15 @@ "WORK IN PROGRESS, only usefull for debian-installer" #define dpkg_deb_trivial_usage \ - "[-cexX] file directory" + "[-cefItxX] file [argument]" #define dpkg_deb_full_usage \ "Perform actions on debian packages (.debs)\n\n" \ "Options:\n" \ - "\t-c\tList contents of filesystem tree (verbose)\n" \ - "\t-l\tList contents of filesystem tree (.list format)\n" \ - "\t-e\tExtract control files to directory\n" \ + "\t-c\tList contents of filesystem tree\n" \ + "\t-e\tExtract control files to [argument] directory\n" \ + "\t-f\tDisplay control field name starting with [argument]\n" \ + "\t-I\tDisplay the control filenamed [argument]\n" \ + "\t-t\tExtract filesystem tree to stdout in tar format\n" \ "\t-x\tExctract packages filesystem tree to directory\n" \ "\t-X\tVerbose extract" #define dpkg_deb_example_usage \ @@ -323,13 +339,22 @@ #define echo_example_usage \ "$ echo "Erik is cool"\n" \ "Erik is cool\n" \ - "$ echo -e "Erik\nis\ncool"\n" \ + "$ echo -e "Erik\\nis\\ncool"\n" \ "Erik\n" \ "is\n" \ "cool\n" \ "$ echo "Erik\nis\ncool"\n" \ "Erik\nis\ncool\n" +#define env_trivial_usage \ + "[-] [-iu] [name=value ...] [command]" +#define env_full_usage \ + "Prints the current environment or runs a program after setting\n" \ + "up the specified environment.\n\n" \ + "Options:\n" \ + "\t-, -i\tstart with an empty environment\n" \ + "\t-u\tremove variable from the environment\n" + #define expr_trivial_usage \ "EXPRESSION" #define expr_full_usage \ @@ -415,7 +440,8 @@ "the current directory; default EXPRESSION is '-print'\n" \ "\nEXPRESSION may consist of:\n" \ "\t-follow\t\tDereference symbolic links.\n" \ - "\t-name PATTERN\tFile name (leading directories removed) matches PATTERN." \ + "\t-name PATTERN\tFile name (leading directories removed) matches PATTERN.\n" \ + "\t-print\t\tPrint (default and assumed).\n" \ USAGE_FIND_TYPE( \ "\n\t-type X\t\tFiletype matches X (where X is one of: f,d,l,b,c,...)" \ ) USAGE_FIND_PERM( \ @@ -499,6 +525,7 @@ "\t-H\tprefix output lines with filename where match was found\n" \ "\t-h\tsuppress the prefixing filename on output\n" \ "\t-i\tignore case distinctions\n" \ + "\t-l\tlist names of files that match\n" \ "\t-n\tprint line number with output lines\n" \ "\t-q\tbe quiet. Returns 0 if result was found, 1 otherwise\n" \ "\t-v\tselect non-matching lines\n" \ @@ -640,10 +667,15 @@ "\n" \ " ::sysinit:/etc/init.d/rcS\n" \ " ::askfirst:/bin/sh\n" \ +" ::ctrlaltdel:/sbin/reboot\n" \ +" ::shutdown:/sbin/swapoff -a\n" \ +" ::shutdown:/bin/umount -a -r\n" \ "\n" \ "if it detects that /dev/console is _not_ a serial console, it will also run:\n" \ "\n" \ " tty2::askfirst:/bin/sh\n" \ +" tty3::askfirst:/bin/sh\n" \ +" tty4::askfirst:/bin/sh\n" \ "\n" \ "If you choose to use an /etc/inittab file, the inittab entry format is as follows:\n" \ "\n" \ @@ -669,7 +701,7 @@ " : \n" \ "\n" \ " Valid actions include: sysinit, respawn, askfirst, wait, \n" \ -" once, and ctrlaltdel.\n" \ +" once, ctrlaltdel, and shutdown.\n" \ "\n" \ " The available actions can be classified into two groups: actions\n" \ " that are run only once, and actions that are re-run when the specified\n" \ @@ -683,9 +715,12 @@ " 'wait' actions, like 'sysinit' actions, cause init to wait until\n" \ " the specified task completes. 'once' actions are asyncronous,\n" \ " therefore, init does not wait for them to complete. 'ctrlaltdel'\n" \ -" actions are run immediately before init causes the system to reboot\n" \ -" (unmounting filesystems with a 'ctrlaltdel' action is a very good\n" \ -" idea).\n" \ +" actions are run when the system detects that someone on the system\n" \ +" console has pressed the CTRL-ALT-DEL key combination. Typically one\n" \ +" wants to run 'reboot' at this point to cause the system to reboot.\n" \ +" Finally the 'shutdown' action specifies the actions to taken when\n" \ +" init is told to reboot. Unmounting filesystems and disabling swap\n" \ +" is a very good here\n" \ "\n" \ " Run repeatedly actions:\n" \ "\n" \ @@ -736,8 +771,9 @@ " #::respawn:/sbin/getty 57600 ttyS2\n" \ " \n" \ " # Stuff to do before rebooting\n" \ -" ::ctrlaltdel:/bin/umount -a -r\n" \ -" ::ctrlaltdel:/sbin/swapoff -a\n" +" ::ctrlaltdel:/sbin/reboot\n" \ +" ::shutdown:/bin/umount -a -r\n" \ +" ::shutdown:/sbin/swapoff -a\n" #define insmod_trivial_usage \ "[OPTION]... MODULE [symbol=value]..." @@ -787,7 +823,7 @@ #define length_full_usage \ "Prints out the length of the specified STRING." #define length_example_usage \ - "$ length "Hello"\n" \ + "$ length Hello\n" \ "5\n" #define ln_trivial_usage \ @@ -1044,7 +1080,7 @@ #else #define USAGE_MOUNT_LOOP(a) #endif -#ifdef BB_MTAB +#ifdef BB_FEATURE_MTAB_SUPPORT #define USAGE_MTAB(a) a #else #define USAGE_MTAB(a) @@ -1169,7 +1205,7 @@ "Formats and prints ARGUMENT(s) according to FORMAT,\n" \ "Where FORMAT controls the output exactly as in C printf." #define printf_example_usage \ - "$ printf "Val=%d\n" 5\n" \ + "$ printf "Val=%d\\n" 5\n" \ "Val=5\n" #define ps_trivial_usage \ @@ -1228,18 +1264,13 @@ #define reset_full_usage \ "Resets the screen." -#ifdef BB_FEATURE_RM_INTERACTIVE - #define USAGE_RM_INTERACTIVE(a) a -#else - #define USAGE_RM_INTERACTIVE(a) -#endif #define rm_trivial_usage \ "[OPTION]... FILE..." #define rm_full_usage \ "Remove (unlink) the FILE(s). You may use '--' to\n" \ "indicate that all following arguments are non-options.\n\n" \ "Options:\n" \ - USAGE_RM_INTERACTIVE("\t-i\t\talways prompt before removing each destinations\n") \ + "\t-i\t\talways prompt before removing each destinations\n" \ "\t-f\t\tremove existing destinations, never prompt\n" \ "\t-r or -R\tremove the contents of directories recursively" #define rm_example_usage \ @@ -1321,17 +1352,26 @@ "[2 second delay results]\n" +#ifdef BB_FEATURE_SORT_UNIQUE + #define USAGE_SORT_UNIQUE(a) a +#else + #define USAGE_SORT_UNIQUE(a) +#endif #ifdef BB_FEATURE_SORT_REVERSE #define USAGE_SORT_REVERSE(a) a #else #define USAGE_SORT_REVERSE(a) #endif #define sort_trivial_usage \ - "[-n]" USAGE_SORT_REVERSE(" [-r]") " [FILE]..." + "[-n" USAGE_SORT_REVERSE("r") USAGE_SORT_UNIQUE("u") "] [FILE]..." #define sort_full_usage \ - "Sorts lines of text in the specified files" + "Sorts lines of text in the specified files\n\n"\ + "Options:\n" \ + USAGE_SORT_UNIQUE("\t-u\tsuppress duplicate lines\n") \ + USAGE_SORT_REVERSE("\t-r\tsort in reverse order\n") \ + "\t-n\tsort numerics" #define sort_example_usage \ - "$ echo -e "e\nf\nb\nd\nc\na" | sort\n" \ + "$ echo -e \"e\\nf\\nb\\nd\\nc\\na\" | sort\n" \ "a\n" \ "b\n" \ "c\n" \ @@ -1508,7 +1548,7 @@ USAGE_TFTP_PUT( \ "\tput\tPut local file SOURCE to server DEST.\n" \ ) \ - "\nWhen nameing a server, use the syntax \"server:file\"." + "\nWhen naming a server, use the syntax \"server:file\"." #define touch_trivial_usage \ "[-c] file [file ...]" @@ -1564,11 +1604,11 @@ "[flags] filesystem|directory" #define umount_full_usage \ "Unmount file systems\n" \ - "\nFlags:\n" "\t-a:\tUnmount all file systems" \ - USAGE_MTAB(" in /etc/mtab\n\t-n:\tDon't erase /etc/mtab entries") \ - "\n\t-r:\tTry to remount devices as read-only if mount is busy" \ - USAGE_MOUNT_FORCE("\n\t-f:\tForce filesystem umount (i.e. unreachable NFS server)") \ - USAGE_MOUNT_LOOP("\n\t-l:\tDo not free loop device (if a loop device has been used)") + "\nFlags:\n" "\t-a\tUnmount all file systems" \ + USAGE_MTAB(" in /etc/mtab\n\t-n\tDon't erase /etc/mtab entries") \ + "\n\t-r\tTry to remount devices as read-only if mount is busy" \ + USAGE_MOUNT_FORCE("\n\t-f\tForce filesystem umount (i.e. unreachable NFS server)") \ + USAGE_MOUNT_LOOP("\n\t-l\tDo not free loop device (if a loop device has been used)") #define umount_example_usage \ "$ umount /dev/hdc1 \n" @@ -1598,7 +1638,7 @@ "\t-d\tonly print duplicate lines\n" \ "\t-u\tonly print unique lines" #define uniq_example_usage \ - "$ echo -e "a\na\nb\nc\nc\na" | sort | uniq\n" \ + "$ echo -e \"a\\na\\nb\\nc\\nc\\na\" | sort | uniq\n" \ "a\n" \ "b\n" \ "c\n" @@ -1657,6 +1697,13 @@ "$ uudecode busybox busybox > busybox.uu\n" \ "$\n" +#define vi_trivial_usage \ + "[OPTION] [FILE]..." +#define vi_full_usage \ + "edit FILE.\n\n" \ + "Options:\n" \ + "\t-R\tRead-only- do not write to the file." + #define watchdog_trivial_usage \ "DEV" #define watchdog_full_usage \ @@ -1677,11 +1724,12 @@ " 31 46 1365 /etc/passwd\n" #define wget_trivial_usage \ - "[-c] [-O file] url" + "[-c] [-q] [-O file] url" #define wget_full_usage \ - "wget retrieves files via HTTP\n\n" \ + "wget retrieves files via HTTP or FTP\n\n" \ "Options:\n" \ "\t-c\tcontinue retrieval of aborted transfers\n" \ + "\t-q\tquiet mode - do not print\n" \ "\t-O\tsave to filename ('-' for stdout)" #define which_trivial_usage \