# HG changeset patch # User Pascal Bellard # Date 1222020044 0 # Node ID a4138e62dd41fcc6228a7eb238804317234ffe76 # Parent 374b817a98d00539ac9eb8bb46f84ed258b36f8c busybox: add modprobe -l diff -r 374b817a98d0 -r a4138e62dd41 busybox/receipt --- a/busybox/receipt Sat Sep 20 20:30:30 2008 -0700 +++ b/busybox/receipt Sun Sep 21 18:00:44 2008 +0000 @@ -27,6 +27,7 @@ $PACKAGE-$VERSION-stat.u $PACKAGE-$VERSION-zmodules.u $PACKAGE-$VERSION-modinfo.u +$PACKAGE-$VERSION-modprobe.u EOT cp ../stuff/$PACKAGE-$VERSION.config .config make oldconfig diff -r 374b817a98d0 -r a4138e62dd41 busybox/stuff/busybox-1.12.0-modprobe.u --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/busybox/stuff/busybox-1.12.0-modprobe.u Sun Sep 21 18:00:44 2008 +0000 @@ -0,0 +1,28 @@ +--- 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 */