diff options
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/basename.c | 6 | ||||
-rw-r--r-- | coreutils/cat.c | 6 | ||||
-rw-r--r-- | coreutils/chroot.c | 8 | ||||
-rw-r--r-- | coreutils/date.c | 14 | ||||
-rw-r--r-- | coreutils/length.c | 2 |
5 files changed, 24 insertions, 12 deletions
diff --git a/coreutils/basename.c b/coreutils/basename.c index 5fe5e0f03..efd07e272 100644 --- a/coreutils/basename.c +++ b/coreutils/basename.c @@ -29,7 +29,11 @@ extern int basename_main(int argc, char **argv) char* s, *s1; if ((argc < 2) || (**(argv + 1) == '-')) { - usage("basename [file ...]\n"); + usage("basename [FILE ...]\n" +#ifndef BB_FEATURE_TRIVIAL_HELP + "\nStrips directory path and suffixes from FILE(s).\n" +#endif + ); } argv++; diff --git a/coreutils/cat.c b/coreutils/cat.c index f7a6bfa7b..561b24f3f 100644 --- a/coreutils/cat.c +++ b/coreutils/cat.c @@ -45,7 +45,11 @@ extern int cat_main(int argc, char **argv) } if (**(argv + 1) == '-') { - usage("cat [file ...]\n"); + usage("cat [FILE ...]\n" +#ifndef BB_FEATURE_TRIVIAL_HELP + "\nConcatenates FILE(s) and prints them to the standard output.\n" +#endif + ); } argc--; diff --git a/coreutils/chroot.c b/coreutils/chroot.c index 63fa4d146..34116a60e 100644 --- a/coreutils/chroot.c +++ b/coreutils/chroot.c @@ -28,9 +28,11 @@ #include <errno.h> -static const char chroot_usage[] = "chroot NEWROOT [COMMAND...]\n\n" - - "Run COMMAND with root directory set to NEWROOT.\n"; +static const char chroot_usage[] = "chroot NEWROOT [COMMAND...]\n" +#ifndef BB_FEATURE_TRIVIAL_HELP + "\nRun COMMAND with root directory set to NEWROOT.\n" +#endif + ; diff --git a/coreutils/date.c b/coreutils/date.c index 25ce05d2d..dd054be66 100644 --- a/coreutils/date.c +++ b/coreutils/date.c @@ -40,12 +40,14 @@ mail commands */ static const char date_usage[] = "date [OPTION]... [+FORMAT]\n" - " or: date [OPTION] [MMDDhhmm[[CC]YY][.ss]]\n\n" - "Display the current time in the given FORMAT, or set the system date.\n" - "\nOptions:\n\t-R\t\toutput RFC-822 compliant date string\n" - "\t-s\t\tset time described by STRING\n" - - "\t-u\t\tprint or set Coordinated Universal Time\n"; + " or: date [OPTION] [MMDDhhmm[[CC]YY][.ss]]\n" +#ifndef BB_FEATURE_TRIVIAL_HELP + "\nDisplays the current time in the given FORMAT, or sets the system date.\n" + "\nOptions:\n\t-R\tOutputs RFC-822 compliant date string\n" + "\t-s\tSets time described by STRING\n" + "\t-u\tPrints or sets Coordinated Universal Time\n" +#endif + ; /* Input parsing code is always bulky - used heavy duty libc stuff as diff --git a/coreutils/length.c b/coreutils/length.c index 00e5a171b..4cbe7e17b 100644 --- a/coreutils/length.c +++ b/coreutils/length.c @@ -9,6 +9,6 @@ extern int length_main(int argc, char **argv) if (argc != 2 || **(argv + 1) == '-') { usage("length string\n"); } - printf("%d\n", strlen(argv[1])); + printf("%lu\n", (long)strlen(argv[1])); return (TRUE); } |