diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-09-07 02:38:26 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-09-07 02:38:26 +0200 |
commit | 0c6914e50c913b54632b7279dbe3544ca7e633d0 (patch) | |
tree | 347e5580023c368fc16dd21ff6539a609c963b3b /include | |
parent | f9c814b0eedf757f13d4796c254329d84a4ae85c (diff) | |
download | busybox-w32-0c6914e50c913b54632b7279dbe3544ca7e633d0.tar.gz busybox-w32-0c6914e50c913b54632b7279dbe3544ca7e633d0.tar.bz2 busybox-w32-0c6914e50c913b54632b7279dbe3544ca7e633d0.zip |
modprobe-small: make string buffer code robust; fix help text
together with previous one-liner:
function old new delta
append 70 99 +29
parse_module 295 311 +16
copy_stringbuf 35 36 +1
packed_usage 26545 26540 -5
appendc 27 - -27
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 3/1 up/down: 46/-32) Total: 14 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/usage.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/include/usage.h b/include/usage.h index e571d2ba3..036cf9db7 100644 --- a/include/usage.h +++ b/include/usage.h | |||
@@ -2824,9 +2824,21 @@ | |||
2824 | "-rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM\n" | 2824 | "-rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM\n" |
2825 | 2825 | ||
2826 | #define modprobe_trivial_usage \ | 2826 | #define modprobe_trivial_usage \ |
2827 | "[-knqrsv] MODULE [symbol=value...]" | 2827 | IF_MODPROBE_SMALL("[-qfwrsv] MODULE [symbol=value...]") \ |
2828 | IF_NOT_MODPROBE_SMALL("[-" \ | ||
2829 | IF_FEATURE_2_4_MODULES("k")"nqrsv" \ | ||
2830 | IF_FEATURE_MODPROBE_BLACKLIST("b")"] MODULE [symbol=value...]") | ||
2828 | #define modprobe_full_usage "\n\n" \ | 2831 | #define modprobe_full_usage "\n\n" \ |
2829 | "Options:" \ | 2832 | "Options:" \ |
2833 | IF_MODPROBE_SMALL( \ | ||
2834 | "\n -q Quiet" \ | ||
2835 | "\n -f Force" \ | ||
2836 | "\n -w Wait for unload" \ | ||
2837 | "\n -r Remove module (stacks) or do autoclean" \ | ||
2838 | "\n -s Report via syslog instead of stderr" \ | ||
2839 | "\n -v Verbose" \ | ||
2840 | ) \ | ||
2841 | IF_NOT_MODPROBE_SMALL( \ | ||
2830 | IF_FEATURE_2_4_MODULES( \ | 2842 | IF_FEATURE_2_4_MODULES( \ |
2831 | "\n -k Make module autoclean-able" \ | 2843 | "\n -k Make module autoclean-able" \ |
2832 | ) \ | 2844 | ) \ |
@@ -2837,7 +2849,8 @@ | |||
2837 | "\n -v Verbose" \ | 2849 | "\n -v Verbose" \ |
2838 | IF_FEATURE_MODPROBE_BLACKLIST( \ | 2850 | IF_FEATURE_MODPROBE_BLACKLIST( \ |
2839 | "\n -b Apply blacklist to module names too" \ | 2851 | "\n -b Apply blacklist to module names too" \ |
2840 | ) | 2852 | ) \ |
2853 | ) | ||
2841 | 2854 | ||
2842 | #define modprobe_notes_usage \ | 2855 | #define modprobe_notes_usage \ |
2843 | "modprobe can (un)load a stack of modules, passing each module options (when\n" \ | 2856 | "modprobe can (un)load a stack of modules, passing each module options (when\n" \ |