diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-03-31 18:43:55 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-03-31 18:43:55 +0000 |
commit | 81901a096c67b079fced2e63af4e15a2ca50465e (patch) | |
tree | 4e20f68dfb7373e902f2fb8430c02209d6eb78e8 /applets | |
parent | 2766eedde85f092153a2affb2d3da491e2670982 (diff) | |
download | busybox-w32-81901a096c67b079fced2e63af4e15a2ca50465e.tar.gz busybox-w32-81901a096c67b079fced2e63af4e15a2ca50465e.tar.bz2 busybox-w32-81901a096c67b079fced2e63af4e15a2ca50465e.zip |
- add option to suppress the terse usage messages. Saves 6.8k for defconfig:
text data bss dec hex filename
861791 11264 1039140 1912195 1d2d83 busybox.have-terse-usage
854799 11264 1039140 1905203 1d1233 busybox.no-terse
Diffstat (limited to 'applets')
-rw-r--r-- | applets/applets.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/applets/applets.c b/applets/applets.c index 82a6417de..77e4fdbfe 100644 --- a/applets/applets.c +++ b/applets/applets.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <assert.h> | 32 | #include <assert.h> |
33 | #include "busybox.h" | 33 | #include "busybox.h" |
34 | 34 | ||
35 | #if ENABLE_SHOW_USAGE | ||
35 | const char usage_messages[] = | 36 | const char usage_messages[] = |
36 | 37 | ||
37 | #define MAKE_USAGE | 38 | #define MAKE_USAGE |
@@ -42,6 +43,7 @@ const char usage_messages[] = | |||
42 | ; | 43 | ; |
43 | 44 | ||
44 | #undef MAKE_USAGE | 45 | #undef MAKE_USAGE |
46 | #endif /* ENABLE_SHOW_USAGE */ | ||
45 | #undef APPLET | 47 | #undef APPLET |
46 | #undef APPLET_NOUSAGE | 48 | #undef APPLET_NOUSAGE |
47 | #undef PROTOTYPES | 49 | #undef PROTOTYPES |
@@ -407,6 +409,7 @@ static void check_suid (struct BB_applet *applet) | |||
407 | 409 | ||
408 | void bb_show_usage (void) | 410 | void bb_show_usage (void) |
409 | { | 411 | { |
412 | #if ENABLE_SHOW_USAGE | ||
410 | const char *format_string; | 413 | const char *format_string; |
411 | const char *usage_string = usage_messages; | 414 | const char *usage_string = usage_messages; |
412 | int i; | 415 | int i; |
@@ -422,6 +425,7 @@ void bb_show_usage (void) | |||
422 | format_string = "%s\n\nNo help available.\n\n"; | 425 | format_string = "%s\n\nNo help available.\n\n"; |
423 | fprintf (stderr, format_string, bb_msg_full_version, applet_using->name, | 426 | fprintf (stderr, format_string, bb_msg_full_version, applet_using->name, |
424 | usage_string); | 427 | usage_string); |
428 | #endif /* ENABLE_SHOW_USAGE */ | ||
425 | 429 | ||
426 | exit (bb_default_error_retval); | 430 | exit (bb_default_error_retval); |
427 | } | 431 | } |