Fix from Tito to read from stdin only when it's not a tty.
[oweals/busybox.git] / include / usage.h
index 3f894c5b71cd800659ffb5a10445f5911d014b83..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 \
@@ -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" \
@@ -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 \