diff options
Diffstat (limited to 'modutils')
-rw-r--r-- | modutils/depmod.c | 27 | ||||
-rw-r--r-- | modutils/modprobe-small.c | 6 | ||||
-rw-r--r-- | modutils/modprobe.c | 15 |
3 files changed, 31 insertions, 17 deletions
diff --git a/modutils/depmod.c b/modutils/depmod.c index f6c0bf33a..775236126 100644 --- a/modutils/depmod.c +++ b/modutils/depmod.c | |||
@@ -10,11 +10,6 @@ | |||
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 | |||
18 | #include "libbb.h" | 13 | #include "libbb.h" |
19 | #include "modutils.h" | 14 | #include "modutils.h" |
20 | #include <sys/utsname.h> /* uname() */ | 15 | #include <sys/utsname.h> /* uname() */ |
@@ -131,7 +126,16 @@ static void xfreopen_write(const char *file, FILE *f) | |||
131 | bb_perror_msg_and_die("can't open '%s'", file); | 126 | bb_perror_msg_and_die("can't open '%s'", file); |
132 | } | 127 | } |
133 | 128 | ||
134 | /* Usage: | 129 | //usage:#if !ENABLE_MODPROBE_SMALL |
130 | //usage:#define depmod_trivial_usage "[-n] [-b BASE] [VERSION] [MODFILES]..." | ||
131 | //usage:#define depmod_full_usage "\n\n" | ||
132 | //usage: "Generate modules.dep, alias, and symbols files" | ||
133 | //usage: "\n" | ||
134 | //usage: "\n -b BASE Use BASE/lib/modules/VERSION" | ||
135 | //usage: "\n -n Dry run: print files to stdout" | ||
136 | //usage:#endif | ||
137 | |||
138 | /* Upstream usage: | ||
135 | * [-aAenv] [-C FILE or DIR] [-b BASE] [-F System.map] [VERSION] [MODFILES]... | 139 | * [-aAenv] [-C FILE or DIR] [-b BASE] [-F System.map] [VERSION] [MODFILES]... |
136 | * -a --all | 140 | * -a --all |
137 | * Probe all modules. Default if no MODFILES. | 141 | * Probe all modules. Default if no MODFILES. |
@@ -142,7 +146,7 @@ static void xfreopen_write(const char *file, FILE *f) | |||
142 | * -C --config FILE or DIR | 146 | * -C --config FILE or DIR |
143 | * Path to /etc/depmod.conf or /etc/depmod.d/ | 147 | * Path to /etc/depmod.conf or /etc/depmod.d/ |
144 | * -e --errsyms | 148 | * -e --errsyms |
145 | * When combined with the -F option, this reports any symbols which | 149 | * When combined with the -F option, this reports any symbols |
146 | * which are not supplied by other modules or kernel. | 150 | * which are not supplied by other modules or kernel. |
147 | * -F --filesyms System.map | 151 | * -F --filesyms System.map |
148 | * -n --dry-run | 152 | * -n --dry-run |
@@ -154,8 +158,13 @@ static void xfreopen_write(const char *file, FILE *f) | |||
154 | * -u No-op | 158 | * -u No-op |
155 | * -q No-op | 159 | * -q No-op |
156 | * | 160 | * |
157 | * So far we only support: [-rn] [-b BASE] [VERSION] [MODFILES]... | 161 | * So far we only support: [-n] [-b BASE] [VERSION] [MODFILES]... |
158 | * -aAeF are accepted but ignored. -vC are not accepted. | 162 | * Accepted but ignored: |
163 | * -aAe | ||
164 | * -F System.map | ||
165 | * -C FILE/DIR | ||
166 | * | ||
167 | * Not accepted: -v | ||
159 | */ | 168 | */ |
160 | enum { | 169 | enum { |
161 | //OPT_a = (1 << 0), /* All modules, ignore mods in argv */ | 170 | //OPT_a = (1 << 0), /* All modules, ignore mods in argv */ |
diff --git a/modutils/modprobe-small.c b/modutils/modprobe-small.c index f5b283b47..bd855f628 100644 --- a/modutils/modprobe-small.c +++ b/modutils/modprobe-small.c | |||
@@ -696,6 +696,10 @@ The following options are useful for people managing distributions: | |||
696 | 696 | ||
697 | //usage:#if ENABLE_MODPROBE_SMALL | 697 | //usage:#if ENABLE_MODPROBE_SMALL |
698 | 698 | ||
699 | //// Note: currently, help system shows modprobe --help text for all aliased cmds | ||
700 | //// (see APPLET_ODDNAME macro definition). | ||
701 | //// All other help texts defined below are not used. FIXME? | ||
702 | |||
699 | //usage:#define depmod_trivial_usage NOUSAGE_STR | 703 | //usage:#define depmod_trivial_usage NOUSAGE_STR |
700 | //usage:#define depmod_full_usage "" | 704 | //usage:#define depmod_full_usage "" |
701 | 705 | ||
@@ -805,7 +809,7 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv) | |||
805 | opt_complementary = "-1"; | 809 | opt_complementary = "-1"; |
806 | /* only -q (quiet) and -r (rmmod), | 810 | /* only -q (quiet) and -r (rmmod), |
807 | * the rest are accepted and ignored (compat) */ | 811 | * the rest are accepted and ignored (compat) */ |
808 | getopt32(argv, "qrfsvw"); | 812 | getopt32(argv, "qrfsvwb"); |
809 | argv += optind; | 813 | argv += optind; |
810 | 814 | ||
811 | /* are we rmmod? -> simulate modprobe -r */ | 815 | /* are we rmmod? -> simulate modprobe -r */ |
diff --git a/modutils/modprobe.c b/modutils/modprobe.c index c1a1828d7..fb6c65990 100644 --- a/modutils/modprobe.c +++ b/modutils/modprobe.c | |||
@@ -101,12 +101,15 @@ | |||
101 | //usage: ) | 101 | //usage: ) |
102 | //usage:#endif /* !ENABLE_MODPROBE_SMALL */ | 102 | //usage:#endif /* !ENABLE_MODPROBE_SMALL */ |
103 | 103 | ||
104 | /* Note that usage text doesn't document various 2.4 options | 104 | /* Note: usage text doesn't document various 2.4 options |
105 | * we pull in through INSMOD_OPTS define */ | 105 | * we pull in through INSMOD_OPTS define |
106 | #define MODPROBE_OPTS "alrD" IF_FEATURE_MODPROBE_BLACKLIST("b") | 106 | * Note2: -b is always accepted, but if !FEATURE_MODPROBE_BLACKLIST, |
107 | * it is a no-op. | ||
108 | */ | ||
109 | #define MODPROBE_OPTS "alrDb" | ||
107 | /* -a and -D _are_ in fact compatible */ | 110 | /* -a and -D _are_ in fact compatible */ |
108 | #define MODPROBE_COMPLEMENTARY ("q-v:v-q:l--arD:r--alD:a--lr:D--rl") | 111 | #define MODPROBE_COMPLEMENTARY ("q-v:v-q:l--arD:r--alD:a--lr:D--rl") |
109 | //#define MODPROBE_OPTS "acd:lnrt:C:" IF_FEATURE_MODPROBE_BLACKLIST("b") | 112 | //#define MODPROBE_OPTS "acd:lnrt:C:b" |
110 | //#define MODPROBE_COMPLEMENTARY "q-v:v-q:l--acr:a--lr:r--al" | 113 | //#define MODPROBE_COMPLEMENTARY "q-v:v-q:l--acr:a--lr:r--al" |
111 | enum { | 114 | enum { |
112 | OPT_INSERT_ALL = (INSMOD_OPT_UNUSED << 0), /* a */ | 115 | OPT_INSERT_ALL = (INSMOD_OPT_UNUSED << 0), /* a */ |
@@ -133,10 +136,8 @@ static const char modprobe_longopts[] ALIGN1 = | |||
133 | /* module-init-tools 3.11.1 has only long opt --show-depends | 136 | /* module-init-tools 3.11.1 has only long opt --show-depends |
134 | * but no short -D, we provide long opt for scripts which | 137 | * but no short -D, we provide long opt for scripts which |
135 | * were written for 3.11.1: */ | 138 | * were written for 3.11.1: */ |
136 | "show-depends\0" No_argument "D" | 139 | "show-depends\0" No_argument "D" |
137 | // IF_FEATURE_MODPROBE_BLACKLIST( | ||
138 | // "use-blacklist\0" No_argument "b" | 140 | // "use-blacklist\0" No_argument "b" |
139 | // ) | ||
140 | ; | 141 | ; |
141 | #endif | 142 | #endif |
142 | 143 | ||