From 0c6914e50c913b54632b7279dbe3544ca7e633d0 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 7 Sep 2009 02:38:26 +0200 Subject: 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 --- include/usage.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'include') 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 @@ "-rw------- 1 andersen andersen 0 Apr 25 17:10 /tmp/temp.mWiLjM\n" #define modprobe_trivial_usage \ - "[-knqrsv] MODULE [symbol=value...]" + IF_MODPROBE_SMALL("[-qfwrsv] MODULE [symbol=value...]") \ + IF_NOT_MODPROBE_SMALL("[-" \ + IF_FEATURE_2_4_MODULES("k")"nqrsv" \ + IF_FEATURE_MODPROBE_BLACKLIST("b")"] MODULE [symbol=value...]") #define modprobe_full_usage "\n\n" \ "Options:" \ + IF_MODPROBE_SMALL( \ + "\n -q Quiet" \ + "\n -f Force" \ + "\n -w Wait for unload" \ + "\n -r Remove module (stacks) or do autoclean" \ + "\n -s Report via syslog instead of stderr" \ + "\n -v Verbose" \ + ) \ + IF_NOT_MODPROBE_SMALL( \ IF_FEATURE_2_4_MODULES( \ "\n -k Make module autoclean-able" \ ) \ @@ -2837,7 +2849,8 @@ "\n -v Verbose" \ IF_FEATURE_MODPROBE_BLACKLIST( \ "\n -b Apply blacklist to module names too" \ - ) + ) \ + ) #define modprobe_notes_usage \ "modprobe can (un)load a stack of modules, passing each module options (when\n" \ -- cgit v1.2.3