diff options
Diffstat (limited to 'modutils/modprobe.c')
-rw-r--r-- | modutils/modprobe.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/modutils/modprobe.c b/modutils/modprobe.c index cbec43888..a6224fa63 100644 --- a/modutils/modprobe.c +++ b/modutils/modprobe.c | |||
@@ -112,7 +112,7 @@ | |||
112 | //usage: | 112 | //usage: |
113 | //usage:#define modprobe_trivial_usage | 113 | //usage:#define modprobe_trivial_usage |
114 | //usage: "[-alrqvsD" IF_FEATURE_MODPROBE_BLACKLIST("b") "]" | 114 | //usage: "[-alrqvsD" IF_FEATURE_MODPROBE_BLACKLIST("b") "]" |
115 | //usage: " MODULE [SYMBOL=VALUE]..." | 115 | //usage: " MODULE" IF_FEATURE_CMDLINE_MODULE_OPTIONS(" [SYMBOL=VALUE]...") |
116 | //usage:#define modprobe_full_usage "\n\n" | 116 | //usage:#define modprobe_full_usage "\n\n" |
117 | //usage: " -a Load multiple MODULEs" | 117 | //usage: " -a Load multiple MODULEs" |
118 | //usage: "\n -l List (MODULE is a pattern)" | 118 | //usage: "\n -l List (MODULE is a pattern)" |
@@ -174,7 +174,9 @@ static const char modprobe_longopts[] ALIGN1 = | |||
174 | 174 | ||
175 | struct globals { | 175 | struct globals { |
176 | 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 | ||
177 | char *cmdline_mopts; /* module options from cmdline */ | 178 | char *cmdline_mopts; /* module options from cmdline */ |
179 | #endif | ||
178 | int num_unresolved_deps; | 180 | int num_unresolved_deps; |
179 | /* bool. "Did we have 'symbol:FOO' requested on cmdline?" */ | 181 | /* bool. "Did we have 'symbol:FOO' requested on cmdline?" */ |
180 | smallint need_symbols; | 182 | smallint need_symbols; |
@@ -458,8 +460,10 @@ static int do_modprobe(struct module_entry *m) | |||
458 | options = m2->options; | 460 | options = m2->options; |
459 | m2->options = NULL; | 461 | m2->options = NULL; |
460 | 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 | ||
461 | if (m == m2) | 464 | if (m == m2) |
462 | options = gather_options_str(options, G.cmdline_mopts); | 465 | options = gather_options_str(options, G.cmdline_mopts); |
466 | #endif | ||
463 | 467 | ||
464 | if (option_mask32 & OPT_SHOW_DEPS) { | 468 | if (option_mask32 & OPT_SHOW_DEPS) { |
465 | printf(options ? "insmod %s/%s/%s %s\n" | 469 | printf(options ? "insmod %s/%s/%s %s\n" |
@@ -626,7 +630,9 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv) | |||
626 | /* First argument is module name, rest are parameters */ | 630 | /* First argument is module name, rest are parameters */ |
627 | DBG("probing just module %s", *argv); | 631 | DBG("probing just module %s", *argv); |
628 | add_probe(argv[0]); | 632 | add_probe(argv[0]); |
633 | #if ENABLE_FEATURE_CMDLINE_MODULE_OPTIONS | ||
629 | 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 | ||
630 | } | 636 | } |
631 | 637 | ||
632 | /* Happens if all requested modules are already loaded */ | 638 | /* Happens if all requested modules are already loaded */ |