From b09668cf64352bd3ca5638fbe3d5cd75573331b4 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sat, 31 Dec 2011 16:51:40 -0500 Subject: [PATCH] modprobe: remove --list option This was marked as deprecated in m-i-t's modprobe in favor of find and basename. --- tools/kmod-modprobe.c | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/tools/kmod-modprobe.c b/tools/kmod-modprobe.c index 53efa08a..cac0b477 100644 --- a/tools/kmod-modprobe.c +++ b/tools/kmod-modprobe.c @@ -47,7 +47,7 @@ static int strip_modversion = 0; static int strip_vermagic = 0; static int remove_dependencies = 0; -static const char cmdopts_s[] = "arRibft:lDcnC:d:S:sqvVh"; +static const char cmdopts_s[] = "arRibft:DcnC:d:S:sqvVh"; static const struct option cmdopts[] = { {"all", no_argument, 0, 'a'}, {"remove", no_argument, 0, 'r'}, @@ -62,7 +62,6 @@ static const struct option cmdopts[] = { {"force-vermagic", no_argument, 0, 1}, {"type", required_argument, 0, 't'}, - {"list", no_argument, 0, 'l'}, {"show-depends", no_argument, 0, 'D'}, {"showconfig", no_argument, 0, 'c'}, {"show-config", no_argument, 0, 'c'}, @@ -114,7 +113,6 @@ static void help(const char *progname) "\n" "Query Options:\n" "\t-t, --type=DIR Limit type used by --list\n" - "\t-l, --list List known modules\n" "\t-D, --show-depends Only print module dependencies and exit\n" "\t-c, --showconfig Print out known configuration and exit\n" "\t-c, --show-config Same as --showconfig\n" @@ -207,19 +205,6 @@ static inline void _log(int prio, const char *fmt, ...) #define LOG(...) _log(log_priority, __VA_ARGS__) #define SHOW(...) _show(__VA_ARGS__) -static int show_list(struct kmod_ctx *ctx, const char *list_type, const char *pattern) -{ - ERR("TODO - list is missing in kmod.\n"); - /* - needs: - struct kmod_list *kmod_get_dependencies(struct kmod_ctx *ctx); - kmod_dependency_get_name() - kmod_dependency_get_dependencies() - kmod_dependency_unref_list() - */ - return -ENOENT; -} - static int show_config(struct kmod_ctx *ctx) { ERR("TODO - config is missing in kmod.\n"); @@ -1103,7 +1088,6 @@ static int do_modprobe(int argc, char **orig_argv) int do_remove = 0; int do_show_config = 0; int do_show_modversions = 0; - int do_show_list = 0; int err; argv = prepend_options_from_env(&argc, orig_argv); @@ -1153,9 +1137,6 @@ static int do_modprobe(int argc, char **orig_argv) case 't': list_type = optarg; break; - case 'l': - do_show_list = 1; - break; case 'D': ignore_loaded = 1; dry_run = 1; @@ -1229,14 +1210,14 @@ static int do_modprobe(int argc, char **orig_argv) args = argv + optind; nargs = argc - optind; - if (!do_show_config && !do_show_list) { + if (!do_show_config) { if (nargs == 0) { fputs("Error: missing parameters. See -h.\n", stderr); goto cmdline_failed; } } - if (!do_show_list && list_type != NULL) { + if (list_type != NULL) { fputs("Error: -t (--type) only supported with -l (--list).\n", stderr); goto cmdline_failed; @@ -1272,9 +1253,7 @@ static int do_modprobe(int argc, char **orig_argv) kmod_set_log_fn(ctx, log_syslog, NULL); } - if (do_show_list) - err = show_list(ctx, list_type, nargs > 0 ? args[0] : NULL); - else if (do_show_config) + if (do_show_config) err = show_config(ctx); else if (do_show_modversions) err = show_modversions(ctx, args[0]); -- 2.47.2