fix printf warning
[oweals/busybox.git] / include / usage.h
index 377eb10e70371899afeddb8f2391c9130130a5b1..128aee2f527e56e08b21cc571817be179e5f4a73 100644 (file)
        "Copies SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.\n" \
        "\n" \
        "\t-a\tSame as -dpR\n" \
-       "\t-d\tPreserves links\n" \
+       "\t-d,-P\tPreserves links\n" \
+       "\t-H,-L\tDereference all symlinks (implied by default)\n" \
        "\t-p\tPreserves file attributes if possible\n" \
        "\t-f\tforce (implied; ignored) - always set\n" \
        "\t-i\tinteractive, prompt before overwrite\n" \
        "\t-e\tinterpret backslash-escaped characters (i.e., \\t=tab)\n" \
        "\t-E\tdisable interpretation of backslash-escaped characters")
 #define echo_example_usage \
-       "$ echo "Erik is cool"\n" \
+       "$ echo \"Erik is cool\"\n" \
        "Erik is cool\n" \
-       USAGE_FANCY_ECHO("$  echo -e "Erik\\nis\\ncool"\n" \
+       USAGE_FANCY_ECHO("$  echo -e \"Erik\\nis\\ncool\"\n" \
        "Erik\n" \
        "is\n" \
        "cool\n" \
-       "$ echo "Erik\\nis\\ncool"\n" \
+       "$ echo \"Erik\\nis\\ncool\"\n" \
        "Erik\\nis\\ncool\n")
 
 #define env_trivial_usage \
        "\\( and \\) or null; if \\( and \\) are not used, they return the number \n" \
        "of characters matched or 0."
 
+#define fakeidentd_trivial_usage \
+       "[-b ip] [STRING]"
+#define fakeidentd_full_usage \
+       "Returns a set string to auth requests\n\n"\
+       "\t-b\tBind to ip address\n"\
+       "\tSTRING\tThe ident answer string (default is nobody)"
+
 #define false_trivial_usage \
        ""
 #define false_full_usage \
         "$ cat getopt.test\n" \
         "#!/bin/sh\n" \
         "GETOPT=`getopt -o ab:c:: --long a-long,b-long:,c-long:: \\\n" \
-        "       -n 'example.busybox' -- "$@"`\n" \
+        "       -n 'example.busybox' -- \"$@\"`\n" \
         "if [ $? != 0 ] ; then  exit 1 ; fi\n" \
         "eval set -- "$GETOPT"\n" \
         "while true ; do\n" \
        "\t-w raw sockets\n" \
        "\t-x unix sockets"
 
+#define nice_trivial_usage \
+       "[-n ADJUST] [COMMAND [ARG] ...]"
+#define nice_full_usage \
+       "Nice runs a program with modified scheduling priority.\n\n" \
+       "Options:\n" \
+       "\t-n ADJUST\tAdjust the scheduling priority by ADJUST.\n" \
+
 #define nslookup_trivial_usage \
        "[HOST] [SERVER]"
 #define nslookup_full_usage \
        "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"
 
 #ifdef CONFIG_SELINUX
        "\t-s\tSet the system date and time (default).\n" \
        "\t-p\tPrint the date and time."
 
+#ifdef CONFIG_FEATURE_READLINK_FOLLOW
+#define USAGE_READLINK_FOLLOW(a) a
+#else
+#define USAGE_READLINK_FOLLOW(a)
+#endif
+
 #define readlink_trivial_usage \
-       ""
+       USAGE_READLINK_FOLLOW("[-f] ") "FILE"
 #define readlink_full_usage \
-       "Displays the value of a symbolic link."
+       "Displays the value of a symbolic link." \
+       USAGE_READLINK_FOLLOW("\n\nOptions:\n" \
+       "\t-f\tcanonicalize by following all symlinks")
 
 #define realpath_trivial_usage \
        "pathname  ..."
        "\t-d\t\tdelay interval for rebooting."
 
 #define renice_trivial_usage \
-       "priority pid [pid ...]"
+       "{{-n INCREMENT} | PRIORITY} [[ -p | -g | -u ] ID ...]"
 #define renice_full_usage \
-       "Changes priority of running processes. Allowed priorities range\n" \
-       "from 20 (the process runs only when nothing else is running) to 0\n" \
-       "(default priority) to -20 (almost nothing else ever gets to run)."
+       "Changes priority of running processes.\n\n" \
+       "Options:\n" \
+       "\t-n\tadjusts current nice value (smaller is faster)\n" \
+       "\t-p\tprocess id(s) (default)\n" \
+       "\t-g\tprocess group id(s)\n" \
+       "\t-u\tprocess user name(s) and/or id(s)"
 
 #define reset_trivial_usage \
        ""
        USAGE_FANCY_SLEEP("$ sleep 1d 3h 22m 8s\n" \
        "[98528 second delay results]\n")
 
-#ifdef CONFIG_FEATURE_SORT_UNIQUE
-  #define USAGE_SORT_UNIQUE(a) a
+#ifdef CONFIG_SORT_BIG
+  #define USAGE_SORT_BIG(a) a
 #else
-  #define USAGE_SORT_UNIQUE(a)
-#endif
-#ifdef CONFIG_FEATURE_SORT_REVERSE
-  #define USAGE_SORT_REVERSE(a) a
-#else
-  #define USAGE_SORT_REVERSE(a)
+  #define USAGE_SORT_BIG(a)
 #endif
+
+
 #define sort_trivial_usage \
-       "[-n" USAGE_SORT_REVERSE("r") USAGE_SORT_UNIQUE("u") "] [FILE]..."
+       "[-nru" USAGE_SORT_BIG("gMcszbdfimSTokt] [-o outfile] [-k start[.offset][opts][,end[.offset][opts]] [-t char") "] [FILE]..."
 #define sort_full_usage \
        "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"
+       USAGE_SORT_BIG( \
+               "\t-b\tignore leading blanks\n" \
+               "\t-c\tcheck whether input is sorted\n" \
+               "\t-d\tdictionary order (blank or alphanumeric only)\n" \
+               "\t-f\tignore case\n" \
+               "\t-g\tgeneral numerical sort\n" \
+               "\t-i\tignore unprintable characters\n" \
+               "\t-k\tspecify sort key\n" \
+               "\t-M\tsort month\n" \
+       ) \
+       "\t-n\tsort numbers\n" \
+       USAGE_SORT_BIG( \
+               "\t-o\toutput to file\n" \
+               "\t-k\tsort by key\n" \
+               "\t-t\tuse key separator other than whitespace\n" \
+       ) \
+       "\t-r\treverse sort order\n" \
+       USAGE_SORT_BIG("\t-s\tstable (don't sort ties alphabetically)\n") \
+       "\t-u\tsuppress duplicate lines" \
+       USAGE_SORT_BIG("\n\t-z\tinput terminated by nulls, not newlines\n") \
+       USAGE_SORT_BIG("\t-mST\tignored for GNU compatability") \
+       ""
 #define sort_example_usage \
        "$ echo -e \"e\\nf\\nb\\nd\\nc\\na\" | sort\n" \
        "a\n" \
        "c\n" \
        "d\n" \
        "e\n" \
-       "f\n"
+       "f\n" \
+       USAGE_SORT_BIG( \
+               "$ echo -e \"c 3\\nb 2\\nd 2\" | $SORT -k 2,2n -k 1,1r\n" \
+               "d 2\n" \
+               "b 2\n" \
+               "c 3\n" \
+       ) \
+       ""
+       
 
 #define start_stop_daemon_trivial_usage \
        "[OPTIONS] [--start|--stop] ... [-- arguments...]\n"