diff options
Diffstat (limited to 'modutils/modprobe.c')
-rw-r--r-- | modutils/modprobe.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/modutils/modprobe.c b/modutils/modprobe.c index e3bacac56..7ae459826 100644 --- a/modutils/modprobe.c +++ b/modutils/modprobe.c | |||
@@ -170,7 +170,7 @@ struct globals { | |||
170 | #define G (*(struct globals*)&bb_common_bufsiz1) | 170 | #define G (*(struct globals*)&bb_common_bufsiz1) |
171 | #define INIT_G() do { } while (0) | 171 | #define INIT_G() do { } while (0) |
172 | struct BUG_G_too_big { | 172 | struct BUG_G_too_big { |
173 | char BUG_G_too_big[sizeof(G) <= COMMON_BUFSIZE ? 1 : -1]; | 173 | char BUG_G_too_big[sizeof(G) <= COMMON_BUFSIZE ? 1 : -1]; |
174 | }; | 174 | }; |
175 | 175 | ||
176 | 176 | ||
@@ -530,10 +530,14 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv) | |||
530 | xchdir(G.uts.release); | 530 | xchdir(G.uts.release); |
531 | 531 | ||
532 | if (opt & OPT_LIST_ONLY) { | 532 | if (opt & OPT_LIST_ONLY) { |
533 | int i; | ||
533 | char name[MODULE_NAME_LEN]; | 534 | char name[MODULE_NAME_LEN]; |
534 | char *colon, *tokens[2]; | 535 | char *colon, *tokens[2]; |
535 | parser_t *p = config_open2(CONFIG_DEFAULT_DEPMOD_FILE, xfopen_for_read); | 536 | parser_t *p = config_open2(CONFIG_DEFAULT_DEPMOD_FILE, xfopen_for_read); |
536 | 537 | ||
538 | for (i = 0; argv[i]; i++) | ||
539 | replace(argv[i], '-', '_'); | ||
540 | |||
537 | while (config_read(p, tokens, 2, 1, "# \t", PARSE_NORMAL)) { | 541 | while (config_read(p, tokens, 2, 1, "# \t", PARSE_NORMAL)) { |
538 | colon = last_char_is(tokens[0], ':'); | 542 | colon = last_char_is(tokens[0], ':'); |
539 | if (!colon) | 543 | if (!colon) |
@@ -543,7 +547,6 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv) | |||
543 | if (!argv[0]) | 547 | if (!argv[0]) |
544 | puts(tokens[0]); | 548 | puts(tokens[0]); |
545 | else { | 549 | else { |
546 | int i; | ||
547 | for (i = 0; argv[i]; i++) { | 550 | for (i = 0; argv[i]; i++) { |
548 | if (fnmatch(argv[i], name, 0) == 0) { | 551 | if (fnmatch(argv[i], name, 0) == 0) { |
549 | puts(tokens[0]); | 552 | puts(tokens[0]); |
@@ -589,7 +592,7 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv) | |||
589 | /* First argument is module name, rest are parameters */ | 592 | /* First argument is module name, rest are parameters */ |
590 | DBG("probing just module %s", *argv); | 593 | DBG("probing just module %s", *argv); |
591 | add_probe(argv[0]); | 594 | add_probe(argv[0]); |
592 | G.cmdline_mopts = parse_cmdline_module_options(argv); | 595 | G.cmdline_mopts = parse_cmdline_module_options(argv, /*quote_spaces:*/ 1); |
593 | } | 596 | } |
594 | 597 | ||
595 | /* Happens if all requested modules are already loaded */ | 598 | /* Happens if all requested modules are already loaded */ |