--- busybox-1.12.0/modutils/modprobe.c +++ busybox-1.12.0/modutils/modprobe.c @@ -932,8 +932,9 @@ opt = getopt32(argv, MAIN_OPT_STR, &unused, &unused); argv += optind; - if (opt & (DUMP_CONF_EXIT | LIST_ALL)) + if (opt & DUMP_CONF_EXIT) return EXIT_SUCCESS; + if (opt & (RESTRICT_DIR | CONFIG_FILE)) bb_error_msg_and_die("-t and -C not supported"); @@ -942,6 +943,14 @@ if (!depend) bb_error_msg_and_die("cannot parse "CONFIG_DEFAULT_DEPMOD_FILE); + if (opt & LIST_ALL) { + struct dep_t *dt; + for (dt = depend; dt && dt->m_path; dt = dt->m_next) { + printf("%s\n",dt->m_path); + } + return EXIT_SUCCESS; + } + if (remove_opt) { do { /* (*argv) can be NULL here */