aboutsummaryrefslogtreecommitdiff
path: root/modutils/modprobe.c
diff options
context:
space:
mode:
Diffstat (limited to 'modutils/modprobe.c')
-rw-r--r--modutils/modprobe.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/modutils/modprobe.c b/modutils/modprobe.c
index 09e3de6c3..a6224fa63 100644
--- a/modutils/modprobe.c
+++ b/modutils/modprobe.c
@@ -19,7 +19,6 @@
19//config: bool "Blacklist support" 19//config: bool "Blacklist support"
20//config: default y 20//config: default y
21//config: depends on MODPROBE && !MODPROBE_SMALL 21//config: depends on MODPROBE && !MODPROBE_SMALL
22//config: select PLATFORM_LINUX
23//config: help 22//config: help
24//config: Say 'y' here to enable support for the 'blacklist' command in 23//config: Say 'y' here to enable support for the 'blacklist' command in
25//config: modprobe.conf. This prevents the alias resolver to resolve 24//config: modprobe.conf. This prevents the alias resolver to resolve
@@ -113,7 +112,7 @@
113//usage: 112//usage:
114//usage:#define modprobe_trivial_usage 113//usage:#define modprobe_trivial_usage
115//usage: "[-alrqvsD" IF_FEATURE_MODPROBE_BLACKLIST("b") "]" 114//usage: "[-alrqvsD" IF_FEATURE_MODPROBE_BLACKLIST("b") "]"
116//usage: " MODULE [SYMBOL=VALUE]..." 115//usage: " MODULE" IF_FEATURE_CMDLINE_MODULE_OPTIONS(" [SYMBOL=VALUE]...")
117//usage:#define modprobe_full_usage "\n\n" 116//usage:#define modprobe_full_usage "\n\n"
118//usage: " -a Load multiple MODULEs" 117//usage: " -a Load multiple MODULEs"
119//usage: "\n -l List (MODULE is a pattern)" 118//usage: "\n -l List (MODULE is a pattern)"
@@ -175,7 +174,9 @@ static const char modprobe_longopts[] ALIGN1 =
175 174
176struct globals { 175struct globals {
177 llist_t *probes; /* MEs of module(s) requested on cmdline */ 176 llist_t *probes; /* MEs of module(s) requested on cmdline */
177#if ENABLE_FEATURE_CMDLINE_MODULE_OPTIONS
178 char *cmdline_mopts; /* module options from cmdline */ 178 char *cmdline_mopts; /* module options from cmdline */
179#endif
179 int num_unresolved_deps; 180 int num_unresolved_deps;
180 /* bool. "Did we have 'symbol:FOO' requested on cmdline?" */ 181 /* bool. "Did we have 'symbol:FOO' requested on cmdline?" */
181 smallint need_symbols; 182 smallint need_symbols;
@@ -459,8 +460,10 @@ static int do_modprobe(struct module_entry *m)
459 options = m2->options; 460 options = m2->options;
460 m2->options = NULL; 461 m2->options = NULL;
461 options = parse_and_add_kcmdline_module_options(options, m2->modname); 462 options = parse_and_add_kcmdline_module_options(options, m2->modname);
463#if ENABLE_FEATURE_CMDLINE_MODULE_OPTIONS
462 if (m == m2) 464 if (m == m2)
463 options = gather_options_str(options, G.cmdline_mopts); 465 options = gather_options_str(options, G.cmdline_mopts);
466#endif
464 467
465 if (option_mask32 & OPT_SHOW_DEPS) { 468 if (option_mask32 & OPT_SHOW_DEPS) {
466 printf(options ? "insmod %s/%s/%s %s\n" 469 printf(options ? "insmod %s/%s/%s %s\n"
@@ -627,7 +630,9 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv)
627 /* First argument is module name, rest are parameters */ 630 /* First argument is module name, rest are parameters */
628 DBG("probing just module %s", *argv); 631 DBG("probing just module %s", *argv);
629 add_probe(argv[0]); 632 add_probe(argv[0]);
633#if ENABLE_FEATURE_CMDLINE_MODULE_OPTIONS
630 G.cmdline_mopts = parse_cmdline_module_options(argv, /*quote_spaces:*/ 1); 634 G.cmdline_mopts = parse_cmdline_module_options(argv, /*quote_spaces:*/ 1);
635#endif
631 } 636 }
632 637
633 /* Happens if all requested modules are already loaded */ 638 /* Happens if all requested modules are already loaded */