diff options
-rw-r--r-- | modutils/modprobe.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modutils/modprobe.c b/modutils/modprobe.c index 0d28da7ea..7ae459826 100644 --- a/modutils/modprobe.c +++ b/modutils/modprobe.c | |||
@@ -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]); |