From 3e71c4c3919c3f38ad652f419e032572694ee4cb Mon Sep 17 00:00:00 2001 From: Alan Jenkins Date: Tue, 16 Mar 2010 13:55:27 +0000 Subject: [PATCH] modprobe: --dump-modversions takes one filename only [--all would have worked, but that wasn't documented as a feature] Fix the documentation. Move the code out of the top-level loop. This also makes the next commit easier. --- doc/modprobe.sgml | 2 +- modprobe.c | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/doc/modprobe.sgml b/doc/modprobe.sgml index dcccc7f..85330e1 100644 --- a/doc/modprobe.sgml +++ b/doc/modprobe.sgml @@ -60,7 +60,7 @@ modprobe - --dump-modversions filename + --dump-modversions filename diff --git a/modprobe.c b/modprobe.c index b4424ed..74e7d3a 100644 --- a/modprobe.c +++ b/modprobe.c @@ -1828,6 +1828,11 @@ int main(int argc, char *argv[]) if (type) fatal("-t only supported with -l"); + if (dump_modver) { + dump_modversions(argv[optind], error); + goto out; + } + /* Read aliases, options etc. */ parse_toplevel_config(configname, &conf, dump_config, flags & mit_remove); @@ -1859,12 +1864,8 @@ int main(int argc, char *argv[]) for (i = 0; i < num_modules; i++) { char *modname = argv[optind + i]; - if (dump_modver) - dump_modversions(modname, error); - else - failed |= do_modprobe(modname, cmdline_opts, - &conf, dirname, error, flags); - + failed |= do_modprobe(modname, cmdline_opts, + &conf, dirname, error, flags); } out: -- 2.11.4.GIT