Fix from Tito to read from stdin only when it's not a tty.
[oweals/busybox.git] / include / usage.h
index 8d4615444650a4ffbc953dc4debe69f648850629..0349f6916621e9782d6ba22df6070d6d56cc6fde 100644 (file)
        "$ cat /proc/uptime\n" \
        "110716.72 17.67"
 
+#define catv_trivial_usage \
+       "[-etv] [FILE]..."
+#define catv_full_usage \
+       "Display nonprinting characters as ^x or M-x.\n\n"\
+       "\t-e\tEnd each line with $\n" \
+       "\t-t\tShow tabs as ^I\n" \
+       "\t-v\tDon't use ^x or M-x escapes."
 #define chattr_trivial_usage \
        "[-R] [-+=AacDdijsStTu] [-v version] files..."
 #define chattr_full_usage \
        "\t-l num\tlog level (8 - default)\n" \
        "\t-S\tlog to syslogd (default)\n" \
        "\t-L file\tlog to file\n" \
-       "\t-f\trun in fordeground\n" \
+       "\t-f\trun in foreground\n" \
        "\t-b\trun in background (default)\n" \
        "\t-c dir\tworking dir"
 
@@ -513,7 +520,7 @@ USE_FEATURE_DATE_ISOFMT( \
        "\t-i\t\tInstall the package\n" \
        "\t-l\t\tList of installed packages\n" \
        "\t-C\t\tConfigure an unpackaged package\n" \
-       "\t-F depends\tIgnore depency problems\n" \
+       "\t-F depends\tIgnore dependency problems\n" \
        "\t-P\t\tPurge all files of a package\n" \
        "\t-r\t\tRemove all but the configuration files for a package\n" \
        "\t-u\t\tUnpack a package, but don't configure it"
@@ -580,7 +587,7 @@ USE_FEATURE_DATE_ISOFMT( \
        "Displays the DHCP leases granted by udhcpd.\n\n" \
        "Options:\n" \
        "\t-f,\t--file=FILENAME\tLeases file to load\n" \
-       "\t-r,\t--remaining\tInterpret lease times as time remaing\n" \
+       "\t-r,\t--remaining\tInterpret lease times as time remaining\n" \
        "\t-a,\t--absolute\tInterpret lease times as expire time"
 
 #define e2fsck_trivial_usage \
@@ -987,7 +994,8 @@ USE_FEATURE_DATE_ISOFMT( \
 #define hdparm_trivial_usage \
        "[options] [device] .."
 #define hdparm_full_usage \
-       "Options:" \
+       USE_FEATURE_HDPARM_GET_IDENTITY("\tIf no device name is specified try to read from stdin.\n") \
+       "\nOptions:\n" \
        "\t-a   get/set fs readahead\n" \
        "\t-A   set drive read-lookahead flag (0/1)\n" \
        "\t-b   get/set bus state (0 == off, 1 == on, 2 == tristate)\n" \
@@ -999,9 +1007,8 @@ USE_FEATURE_DATE_ISOFMT( \
        "\t-f   flush buffer cache for device on exit\n" \
        "\t-g   display drive geometry\n" \
        "\t-h   display terse usage information\n" \
-       "\t-i   display drive identification\n" \
+       USE_FEATURE_HDPARM_GET_IDENTITY("\t-i   display drive identification\n") \
        USE_FEATURE_HDPARM_GET_IDENTITY("\t-I   detailed/current information directly from drive\n") \
-       USE_FEATURE_HDPARM_GET_IDENTITY("\t-Istdin  similar to -I, but wants /proc/ide/" "*" "/hd?/identify as input\n") \
        "\t-k   get/set keep_settings_over_reset flag (0/1)\n" \
        "\t-K   set drive keep_features_over_reset flag (0/1)\n" \
        "\t-L   set drive doorlock (0/1) (removable harddisks only)\n" \
@@ -1421,7 +1428,7 @@ USE_FEATURE_DATE_ISOFMT( \
        "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-m | -M\tRemove the memory segment after the last detach\n" \
        "\t-q | -Q\tRemove the message queue\n" \
        "\t-s | -S\tRemove the semaphore"
 
@@ -1432,7 +1439,7 @@ USE_FEATURE_DATE_ISOFMT( \
        "Resource specification:\n" \
        "\t-m\tshared memory segments\n" \
        "\t-q\tmessage queues\n" \
-       "\t-s\tsempahore arrays\n" \
+       "\t-s\tsemaphore arrays\n" \
        "\t-a\tall (default)\n" \
        "Output format:\n" \
        "\t-t\ttime\n" \
@@ -1944,7 +1951,7 @@ USE_FEATURE_DATE_ISOFMT( \
 "\n" \
 "  alias <alias_name> <mod_name>\n" \
 "    Makes it possible to modprobe alias_name, when there is no such module.\n" \
-"    It makes sense if your mod_name is long, or you want a more reprenstative\n" \
+"    It makes sense if your mod_name is long, or you want a more representative\n" \
 "    name for that module (eg. 'scsi' in place of 'aha7xxx').\n" \
 "    This makes it also possible to use a different set of options (below) for\n" \
 "    the module and the alias.\n" \
@@ -1978,11 +1985,11 @@ USE_FEATURE_DATE_ISOFMT( \
        "   which are the default for alias 'tulip2'\n\n" \
        "$ modprobe tulip2 irq=8\n" \
        "   will load the module 'tulip' with default options 'irq=4 io=0x308 irq=8',\n" \
-       "   which are the default for alias 'tulip2' overriden by the option 'irq=8'\n\n" \
+       "   which are the default for alias 'tulip2' overridden by the option 'irq=8'\n\n" \
        "   from the command line\n\n" \
        "$ modprobe tulip2 irq=2 io=0x210\n" \
        "   will load the module 'tulip' with default options 'irq=4 io=0x308 irq=4 io=0x210',\n" \
-       "   which are the default for alias 'tulip2' overriden by the options 'irq=2 io=0x210'\n\n" \
+       "   which are the default for alias 'tulip2' overridden by the options 'irq=2 io=0x210'\n\n" \
        "   from the command line\n"
 
 #define more_trivial_usage \
@@ -2948,6 +2955,23 @@ USE_FEATURE_DATE_ISOFMT( \
        "$ zcat /tmp/tarball.tar.gz | tar -xf -\n" \
        "$ tar -cf /tmp/tarball.tar /usr/local\n"
 
+#define taskset_trivial_usage \
+       "[OPTIONS] [mask] [pid | command [arg]...]"
+#define taskset_full_usage \
+       "Set or get CPU affinity.\n\n" \
+       "Options:\n" \
+       "\t-p\toperate on an existing PID"
+#define taskset_example_usage \
+       "$ taskset 0x7 ./dgemm_test&\n" \
+       "$ taskset -p 0x1 $!\n" \
+       "pid 4790's current affinity mask: 7\n" \
+       "pid 4790's new affinity mask: 1\n" \
+       "$ taskset 0x7 /bin/sh -c './taskset -p 0x1 $$'\n" \
+       "pid 6671's current affinity mask: 1\n" \
+       "pid 6671's new affinity mask: 1\n" \
+       "$ taskset -p 1\n"
+       "pid 1's current affinity mask: 3\n"
+
 #define tee_trivial_usage \
        "[OPTION]... [FILE]..."
 #define tee_full_usage \
@@ -3409,7 +3433,7 @@ USE_FEATURE_DATE_ISOFMT( \
        "Executes COMMAND on every item given by standard input.\n\n" \
        "Options:\n" \
        USAGE_XARGS_CONFIRMATION("\t-p\tPrompt the user about whether to run each command\n") \
-       "\t-r\tDo not run command for empty readed lines\n" \
+       "\t-r\tDo not run command for empty read lines\n" \
        USAGE_XARGS_TERMOPT("\t-x\tExit if the size is exceeded\n") \
        USAGE_XARGS_ZERO_TERM("\t-0\tInput filenames are terminated by a null character\n") \
        "\t-t\tPrint the command line on stderr before executing it"