summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/usage.src.h20
-rw-r--r--modutils/depmod.c5
-rw-r--r--modutils/insmod.c2
-rw-r--r--modutils/lsmod.c7
-rw-r--r--modutils/modprobe-small.c43
-rw-r--r--modutils/rmmod.c13
6 files changed, 69 insertions, 21 deletions
diff --git a/include/usage.src.h b/include/usage.src.h
index 1bb4b56..048e3e0 100644
--- a/include/usage.src.h
+++ b/include/usage.src.h
@@ -751,9 +751,6 @@ INSERT
#define deluser_full_usage "\n\n" \
"Delete USER from the system"
-#define depmod_trivial_usage NOUSAGE_STR
-#define depmod_full_usage ""
-
#define devmem_trivial_usage \
"ADDRESS [WIDTH [VALUE]]"
@@ -2251,11 +2248,6 @@ INSERT
"\n -l List long flag names" \
"\n -v List the file's version/generation number" \
-#define lsmod_trivial_usage \
- ""
-#define lsmod_full_usage "\n\n" \
- "List the currently loaded kernel modules"
-
#define lspci_trivial_usage \
"[-mk]"
#define lspci_full_usage "\n\n" \
@@ -3256,18 +3248,6 @@ INSERT
#define rmdir_example_usage \
"# rmdir /tmp/foo\n"
-#define rmmod_trivial_usage \
- "[-wfa] [MODULE]..."
-#define rmmod_full_usage "\n\n" \
- "Unload kernel modules\n" \
- "\nOptions:" \
- "\n -w Wait until the module is no longer used" \
- "\n -f Force unload" \
- "\n -a Remove all unused modules (recursively)" \
-
-#define rmmod_example_usage \
- "$ rmmod tulip\n"
-
#define route_trivial_usage \
"[{add|del|delete}]"
#define route_full_usage "\n\n" \
diff --git a/modutils/depmod.c b/modutils/depmod.c
index 6a43aa1..fec6498 100644
--- a/modutils/depmod.c
+++ b/modutils/depmod.c
@@ -10,6 +10,11 @@
//applet:IF_DEPMOD(APPLET(depmod, _BB_DIR_SBIN, _BB_SUID_DROP))
+//usage:#if !ENABLE_MODPROBE_SMALL
+//usage:#define depmod_trivial_usage NOUSAGE_STR
+//usage:#define depmod_full_usage ""
+//usage:#endif
+
#include "libbb.h"
#include "modutils.h"
#include <sys/utsname.h> /* uname() */
diff --git a/modutils/insmod.c b/modutils/insmod.c
index d1f1b07..7ec3cae 100644
--- a/modutils/insmod.c
+++ b/modutils/insmod.c
@@ -15,6 +15,7 @@
/* 2.6 style insmod has no options and required filename
* (not module name - .ko can't be omitted) */
+//usage:#if !ENABLE_MODPROBE_SMALL
//usage:#define insmod_trivial_usage
//usage: IF_FEATURE_2_4_MODULES("[OPTIONS] MODULE ")
//usage: IF_NOT_FEATURE_2_4_MODULES("FILE ")
@@ -33,6 +34,7 @@
//usage: )
//usage: "\n -x Don't export externs"
//usage: )
+//usage:#endif
int insmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int insmod_main(int argc UNUSED_PARAM, char **argv)
diff --git a/modutils/lsmod.c b/modutils/lsmod.c
index a1477ed..ab7c11f 100644
--- a/modutils/lsmod.c
+++ b/modutils/lsmod.c
@@ -10,6 +10,13 @@
//applet:IF_LSMOD(APPLET(lsmod, _BB_DIR_SBIN, _BB_SUID_DROP))
+//usage:#if !ENABLE_MODPROBE_SMALL
+//usage:#define lsmod_trivial_usage
+//usage: ""
+//usage:#define lsmod_full_usage "\n\n"
+//usage: "List the currently loaded kernel modules"
+//usage:#endif
+
#include "libbb.h"
#include "unicode.h"
diff --git a/modutils/modprobe-small.c b/modutils/modprobe-small.c
index 8647089..ec3ddfb 100644
--- a/modutils/modprobe-small.c
+++ b/modutils/modprobe-small.c
@@ -694,6 +694,46 @@ The following options are useful for people managing distributions:
*/
//usage:#if ENABLE_MODPROBE_SMALL
+
+//usage:#define depmod_trivial_usage NOUSAGE_STR
+//usage:#define depmod_full_usage ""
+
+//usage:#define lsmod_trivial_usage
+//usage: ""
+//usage:#define lsmod_full_usage "\n\n"
+//usage: "List the currently loaded kernel modules"
+
+//usage:#define insmod_trivial_usage
+//usage: IF_FEATURE_2_4_MODULES("[OPTIONS] MODULE ")
+//usage: IF_NOT_FEATURE_2_4_MODULES("FILE ")
+//usage: "[SYMBOL=VALUE]..."
+//usage:#define insmod_full_usage "\n\n"
+//usage: "Load the specified kernel modules into the kernel"
+//usage: IF_FEATURE_2_4_MODULES( "\n"
+//usage: "\nOptions:"
+//usage: "\n -f Force module to load into the wrong kernel version"
+//usage: "\n -k Make module autoclean-able"
+//usage: "\n -v Verbose"
+//usage: "\n -q Quiet"
+//usage: "\n -L Lock: prevent simultaneous loads"
+//usage: IF_FEATURE_INSMOD_LOAD_MAP(
+//usage: "\n -m Output load map to stdout"
+//usage: )
+//usage: "\n -x Don't export externs"
+//usage: )
+
+//usage:#define rmmod_trivial_usage
+//usage: "[-wfa] [MODULE]..."
+//usage:#define rmmod_full_usage "\n\n"
+//usage: "Unload kernel modules\n"
+//usage: "\nOptions:"
+//usage: "\n -w Wait until the module is no longer used"
+//usage: "\n -f Force unload"
+//usage: "\n -a Remove all unused modules (recursively)"
+//usage:
+//usage:#define rmmod_example_usage
+//usage: "$ rmmod tulip\n"
+
//usage:#define modprobe_trivial_usage
//usage: "[-qfwrsv] MODULE [symbol=value]..."
//usage:#define modprobe_full_usage "\n\n"
@@ -704,7 +744,8 @@ The following options are useful for people managing distributions:
//usage: "\n -f Force"
//usage: "\n -w Wait for unload"
//usage: "\n -s Report via syslog instead of stderr"
-//usage:#endif /* ENABLE_MODPROBE_SMALL */
+
+//usage:#endif
int modprobe_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int modprobe_main(int argc UNUSED_PARAM, char **argv)
diff --git a/modutils/rmmod.c b/modutils/rmmod.c
index 51390eb..dde7773 100644
--- a/modutils/rmmod.c
+++ b/modutils/rmmod.c
@@ -10,6 +10,19 @@
//applet:IF_RMMOD(APPLET(rmmod, _BB_DIR_SBIN, _BB_SUID_DROP))
+//usage:#if !ENABLE_MODPROBE_SMALL
+//usage:#define rmmod_trivial_usage
+//usage: "[-wfa] [MODULE]..."
+//usage:#define rmmod_full_usage "\n\n"
+//usage: "Unload kernel modules\n"
+//usage: "\nOptions:"
+//usage: "\n -w Wait until the module is no longer used"
+//usage: "\n -f Force unload"
+//usage: "\n -a Remove all unused modules (recursively)"
+//usage:#define rmmod_example_usage
+//usage: "$ rmmod tulip\n"
+//usage:#endif
+
#include "libbb.h"
#include "modutils.h"