From 6050618096ab058d29264a6d6b604275b44121bb Mon Sep 17 00:00:00 2001 From: Mark Whitley Date: Thu, 19 Oct 2000 22:28:06 +0000 Subject: Put getopt_usage where it belongs and added *_usage entries in busybox.[ch] --- applets/busybox.c | 4 ++-- applets/usage.c | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) (limited to 'applets') diff --git a/applets/busybox.c b/applets/busybox.c index d25ddc185..21b8a110e 100644 --- a/applets/busybox.c +++ b/applets/busybox.c @@ -110,7 +110,7 @@ const struct BB_applet applets[] = { {"fsck.minix", fsck_minix_main, _BB_DIR_SBIN, fsck_minix_usage}, #endif #ifdef BB_GETOPT - {"getopt", getopt_main, _BB_DIR_BIN}, + {"getopt", getopt_main, _BB_DIR_BIN, getopt_usage}, #endif #ifdef BB_GREP {"grep", grep_main, _BB_DIR_BIN, grep_usage}, @@ -245,7 +245,7 @@ const struct BB_applet applets[] = { {"reboot", reboot_main, _BB_DIR_SBIN, reboot_usage}, #endif #ifdef BB_RENICE - {"renice", renice_main, _BB_DIR_USR_BIN}, + {"renice", renice_main, _BB_DIR_USR_BIN, renice_usage}, #endif #ifdef BB_RESET {"reset", reset_main, _BB_DIR_USR_BIN, reset_usage}, diff --git a/applets/usage.c b/applets/usage.c index 11326432c..7e3ea8191 100644 --- a/applets/usage.c +++ b/applets/usage.c @@ -375,6 +375,24 @@ const char fsck_minix_usage[] = ; #endif +#if defined BB_GETOPT +const char getopt_usage[] = +"getopt [OPTIONS]...\n" +#ifndef BB_FEATURE_TRIVIAL_HELP +"Parse command options\n" +" -a, --alternative Allow long options starting with single -\n" +" -l, --longoptions=longopts Long options to be recognized\n" +" -n, --name=progname The name under which errors are reported\n" +" -o, --options=optstring Short options to be recognized\n" +" -q, --quiet Disable error reporting by getopt(3)\n" +" -Q, --quiet-output No normal output\n" +" -s, --shell=shell Set shell quoting conventions\n" +" -T, --test Test for getopt(1) version\n" +" -u, --unqote Do not quote the output\n" +#endif +; +#endif + #if defined BB_GREP const char grep_usage[] = "grep [-ihHnqvs] pattern [files...]\n" @@ -1472,3 +1490,4 @@ const char yes_usage[] = #endif ; #endif + -- cgit v1.2.3