On Mon, Feb 9, 2015 at 9:15 PM, Caio Marcelo de Oliveira Filho <caio.oliveira@xxxxxxxxx> wrote: > From: Caio Marcelo de Oliveira Filho <cmarcelo@xxxxxxxxx> > printf("Usage:\n" > - "\t%s [options] filename [args]\n" > + "\t%s%s [options] filename [args]\n" > "Options:\n" > "\t-a, --author Print only 'author'\n" > "\t-d, --description Print only 'description'\n" > @@ -343,7 +343,8 @@ static void help(void) > "\t-b, --basedir=DIR Use DIR as filesystem root for /lib/modules\n" > "\t-V, --version Show version\n" > "\t-h, --help Show this help\n", > - program_invocation_short_name); > + program_invocation_short_name, > + is_kmod_cmd() ? " info" : ""); humn... what I really wanted with the commands was to normalize the common options. For example, --version would only be used as an option to kmod, not "kmod info". "-b, --basedir"... this should be an option to kmod as well. depmod and modprobe also make use of it, though with a different name (-d in modprobe, -b in depmod) > } > > static bool is_module_filename(const char *name) > @@ -464,3 +465,9 @@ const struct kmod_cmd kmod_cmd_compat_modinfo = { > .cmd = do_modinfo, > .help = "compat modinfo command", > }; > + > +const struct kmod_cmd kmod_cmd_info = { > + .name = "info", > + .cmd = do_modinfo, > + .help = "show information about a module", > +}; anyway... I think we can merge something like this and start factoring out the common options later. -- Lucas De Marchi -- To unsubscribe from this list: send the line "unsubscribe linux-modules" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html