diff options
-rw-r--r-- | include/usage.src.h | 20 | ||||
-rw-r--r-- | modutils/depmod.c | 5 | ||||
-rw-r--r-- | modutils/insmod.c | 2 | ||||
-rw-r--r-- | modutils/lsmod.c | 7 | ||||
-rw-r--r-- | modutils/modprobe-small.c | 43 | ||||
-rw-r--r-- | modutils/rmmod.c | 13 |
6 files changed, 69 insertions, 21 deletions
diff --git a/include/usage.src.h b/include/usage.src.h index 1bb4b563c..048e3e08f 100644 --- a/include/usage.src.h +++ b/include/usage.src.h | |||
@@ -751,9 +751,6 @@ INSERT | |||
751 | #define deluser_full_usage "\n\n" \ | 751 | #define deluser_full_usage "\n\n" \ |
752 | "Delete USER from the system" | 752 | "Delete USER from the system" |
753 | 753 | ||
754 | #define depmod_trivial_usage NOUSAGE_STR | ||
755 | #define depmod_full_usage "" | ||
756 | |||
757 | #define devmem_trivial_usage \ | 754 | #define devmem_trivial_usage \ |
758 | "ADDRESS [WIDTH [VALUE]]" | 755 | "ADDRESS [WIDTH [VALUE]]" |
759 | 756 | ||
@@ -2251,11 +2248,6 @@ INSERT | |||
2251 | "\n -l List long flag names" \ | 2248 | "\n -l List long flag names" \ |
2252 | "\n -v List the file's version/generation number" \ | 2249 | "\n -v List the file's version/generation number" \ |
2253 | 2250 | ||
2254 | #define lsmod_trivial_usage \ | ||
2255 | "" | ||
2256 | #define lsmod_full_usage "\n\n" \ | ||
2257 | "List the currently loaded kernel modules" | ||
2258 | |||
2259 | #define lspci_trivial_usage \ | 2251 | #define lspci_trivial_usage \ |
2260 | "[-mk]" | 2252 | "[-mk]" |
2261 | #define lspci_full_usage "\n\n" \ | 2253 | #define lspci_full_usage "\n\n" \ |
@@ -3256,18 +3248,6 @@ INSERT | |||
3256 | #define rmdir_example_usage \ | 3248 | #define rmdir_example_usage \ |
3257 | "# rmdir /tmp/foo\n" | 3249 | "# rmdir /tmp/foo\n" |
3258 | 3250 | ||
3259 | #define rmmod_trivial_usage \ | ||
3260 | "[-wfa] [MODULE]..." | ||
3261 | #define rmmod_full_usage "\n\n" \ | ||
3262 | "Unload kernel modules\n" \ | ||
3263 | "\nOptions:" \ | ||
3264 | "\n -w Wait until the module is no longer used" \ | ||
3265 | "\n -f Force unload" \ | ||
3266 | "\n -a Remove all unused modules (recursively)" \ | ||
3267 | |||
3268 | #define rmmod_example_usage \ | ||
3269 | "$ rmmod tulip\n" | ||
3270 | |||
3271 | #define route_trivial_usage \ | 3251 | #define route_trivial_usage \ |
3272 | "[{add|del|delete}]" | 3252 | "[{add|del|delete}]" |
3273 | #define route_full_usage "\n\n" \ | 3253 | #define route_full_usage "\n\n" \ |
diff --git a/modutils/depmod.c b/modutils/depmod.c index 6a43aa110..fec649882 100644 --- a/modutils/depmod.c +++ b/modutils/depmod.c | |||
@@ -10,6 +10,11 @@ | |||
10 | 10 | ||
11 | //applet:IF_DEPMOD(APPLET(depmod, _BB_DIR_SBIN, _BB_SUID_DROP)) | 11 | //applet:IF_DEPMOD(APPLET(depmod, _BB_DIR_SBIN, _BB_SUID_DROP)) |
12 | 12 | ||
13 | //usage:#if !ENABLE_MODPROBE_SMALL | ||
14 | //usage:#define depmod_trivial_usage NOUSAGE_STR | ||
15 | //usage:#define depmod_full_usage "" | ||
16 | //usage:#endif | ||
17 | |||
13 | #include "libbb.h" | 18 | #include "libbb.h" |
14 | #include "modutils.h" | 19 | #include "modutils.h" |
15 | #include <sys/utsname.h> /* uname() */ | 20 | #include <sys/utsname.h> /* uname() */ |
diff --git a/modutils/insmod.c b/modutils/insmod.c index d1f1b076b..7ec3cae47 100644 --- a/modutils/insmod.c +++ b/modutils/insmod.c | |||
@@ -15,6 +15,7 @@ | |||
15 | /* 2.6 style insmod has no options and required filename | 15 | /* 2.6 style insmod has no options and required filename |
16 | * (not module name - .ko can't be omitted) */ | 16 | * (not module name - .ko can't be omitted) */ |
17 | 17 | ||
18 | //usage:#if !ENABLE_MODPROBE_SMALL | ||
18 | //usage:#define insmod_trivial_usage | 19 | //usage:#define insmod_trivial_usage |
19 | //usage: IF_FEATURE_2_4_MODULES("[OPTIONS] MODULE ") | 20 | //usage: IF_FEATURE_2_4_MODULES("[OPTIONS] MODULE ") |
20 | //usage: IF_NOT_FEATURE_2_4_MODULES("FILE ") | 21 | //usage: IF_NOT_FEATURE_2_4_MODULES("FILE ") |
@@ -33,6 +34,7 @@ | |||
33 | //usage: ) | 34 | //usage: ) |
34 | //usage: "\n -x Don't export externs" | 35 | //usage: "\n -x Don't export externs" |
35 | //usage: ) | 36 | //usage: ) |
37 | //usage:#endif | ||
36 | 38 | ||
37 | int insmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 39 | int insmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
38 | int insmod_main(int argc UNUSED_PARAM, char **argv) | 40 | int insmod_main(int argc UNUSED_PARAM, char **argv) |
diff --git a/modutils/lsmod.c b/modutils/lsmod.c index a1477ed85..ab7c11f2a 100644 --- a/modutils/lsmod.c +++ b/modutils/lsmod.c | |||
@@ -10,6 +10,13 @@ | |||
10 | 10 | ||
11 | //applet:IF_LSMOD(APPLET(lsmod, _BB_DIR_SBIN, _BB_SUID_DROP)) | 11 | //applet:IF_LSMOD(APPLET(lsmod, _BB_DIR_SBIN, _BB_SUID_DROP)) |
12 | 12 | ||
13 | //usage:#if !ENABLE_MODPROBE_SMALL | ||
14 | //usage:#define lsmod_trivial_usage | ||
15 | //usage: "" | ||
16 | //usage:#define lsmod_full_usage "\n\n" | ||
17 | //usage: "List the currently loaded kernel modules" | ||
18 | //usage:#endif | ||
19 | |||
13 | #include "libbb.h" | 20 | #include "libbb.h" |
14 | #include "unicode.h" | 21 | #include "unicode.h" |
15 | 22 | ||
diff --git a/modutils/modprobe-small.c b/modutils/modprobe-small.c index 86470892a..ec3ddfb8f 100644 --- a/modutils/modprobe-small.c +++ b/modutils/modprobe-small.c | |||
@@ -694,6 +694,46 @@ The following options are useful for people managing distributions: | |||
694 | */ | 694 | */ |
695 | 695 | ||
696 | //usage:#if ENABLE_MODPROBE_SMALL | 696 | //usage:#if ENABLE_MODPROBE_SMALL |
697 | |||
698 | //usage:#define depmod_trivial_usage NOUSAGE_STR | ||
699 | //usage:#define depmod_full_usage "" | ||
700 | |||
701 | //usage:#define lsmod_trivial_usage | ||
702 | //usage: "" | ||
703 | //usage:#define lsmod_full_usage "\n\n" | ||
704 | //usage: "List the currently loaded kernel modules" | ||
705 | |||
706 | //usage:#define insmod_trivial_usage | ||
707 | //usage: IF_FEATURE_2_4_MODULES("[OPTIONS] MODULE ") | ||
708 | //usage: IF_NOT_FEATURE_2_4_MODULES("FILE ") | ||
709 | //usage: "[SYMBOL=VALUE]..." | ||
710 | //usage:#define insmod_full_usage "\n\n" | ||
711 | //usage: "Load the specified kernel modules into the kernel" | ||
712 | //usage: IF_FEATURE_2_4_MODULES( "\n" | ||
713 | //usage: "\nOptions:" | ||
714 | //usage: "\n -f Force module to load into the wrong kernel version" | ||
715 | //usage: "\n -k Make module autoclean-able" | ||
716 | //usage: "\n -v Verbose" | ||
717 | //usage: "\n -q Quiet" | ||
718 | //usage: "\n -L Lock: prevent simultaneous loads" | ||
719 | //usage: IF_FEATURE_INSMOD_LOAD_MAP( | ||
720 | //usage: "\n -m Output load map to stdout" | ||
721 | //usage: ) | ||
722 | //usage: "\n -x Don't export externs" | ||
723 | //usage: ) | ||
724 | |||
725 | //usage:#define rmmod_trivial_usage | ||
726 | //usage: "[-wfa] [MODULE]..." | ||
727 | //usage:#define rmmod_full_usage "\n\n" | ||
728 | //usage: "Unload kernel modules\n" | ||
729 | //usage: "\nOptions:" | ||
730 | //usage: "\n -w Wait until the module is no longer used" | ||
731 | //usage: "\n -f Force unload" | ||
732 | //usage: "\n -a Remove all unused modules (recursively)" | ||
733 | //usage: | ||
734 | //usage:#define rmmod_example_usage | ||
735 | //usage: "$ rmmod tulip\n" | ||
736 | |||
697 | //usage:#define modprobe_trivial_usage | 737 | //usage:#define modprobe_trivial_usage |
698 | //usage: "[-qfwrsv] MODULE [symbol=value]..." | 738 | //usage: "[-qfwrsv] MODULE [symbol=value]..." |
699 | //usage:#define modprobe_full_usage "\n\n" | 739 | //usage:#define modprobe_full_usage "\n\n" |
@@ -704,7 +744,8 @@ The following options are useful for people managing distributions: | |||
704 | //usage: "\n -f Force" | 744 | //usage: "\n -f Force" |
705 | //usage: "\n -w Wait for unload" | 745 | //usage: "\n -w Wait for unload" |
706 | //usage: "\n -s Report via syslog instead of stderr" | 746 | //usage: "\n -s Report via syslog instead of stderr" |
707 | //usage:#endif /* ENABLE_MODPROBE_SMALL */ | 747 | |
748 | //usage:#endif | ||
708 | 749 | ||
709 | int modprobe_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 750 | int modprobe_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
710 | int modprobe_main(int argc UNUSED_PARAM, char **argv) | 751 | int modprobe_main(int argc UNUSED_PARAM, char **argv) |
diff --git a/modutils/rmmod.c b/modutils/rmmod.c index 51390eb83..dde77731f 100644 --- a/modutils/rmmod.c +++ b/modutils/rmmod.c | |||
@@ -10,6 +10,19 @@ | |||
10 | 10 | ||
11 | //applet:IF_RMMOD(APPLET(rmmod, _BB_DIR_SBIN, _BB_SUID_DROP)) | 11 | //applet:IF_RMMOD(APPLET(rmmod, _BB_DIR_SBIN, _BB_SUID_DROP)) |
12 | 12 | ||
13 | //usage:#if !ENABLE_MODPROBE_SMALL | ||
14 | //usage:#define rmmod_trivial_usage | ||
15 | //usage: "[-wfa] [MODULE]..." | ||
16 | //usage:#define rmmod_full_usage "\n\n" | ||
17 | //usage: "Unload kernel modules\n" | ||
18 | //usage: "\nOptions:" | ||
19 | //usage: "\n -w Wait until the module is no longer used" | ||
20 | //usage: "\n -f Force unload" | ||
21 | //usage: "\n -a Remove all unused modules (recursively)" | ||
22 | //usage:#define rmmod_example_usage | ||
23 | //usage: "$ rmmod tulip\n" | ||
24 | //usage:#endif | ||
25 | |||
13 | #include "libbb.h" | 26 | #include "libbb.h" |
14 | #include "modutils.h" | 27 | #include "modutils.h" |
15 | 28 | ||