wok rev 1402

busybox: add modprobe -l
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Sep 21 18:00:44 2008 +0000 (2008-09-21)
parents 374b817a98d0
children 9622723b3408
files busybox/receipt busybox/stuff/busybox-1.12.0-modprobe.u
line diff
     1.1 --- a/busybox/receipt	Sat Sep 20 20:30:30 2008 -0700
     1.2 +++ b/busybox/receipt	Sun Sep 21 18:00:44 2008 +0000
     1.3 @@ -27,6 +27,7 @@
     1.4  $PACKAGE-$VERSION-stat.u
     1.5  $PACKAGE-$VERSION-zmodules.u
     1.6  $PACKAGE-$VERSION-modinfo.u
     1.7 +$PACKAGE-$VERSION-modprobe.u
     1.8  EOT
     1.9      cp ../stuff/$PACKAGE-$VERSION.config .config
    1.10      make oldconfig
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/busybox/stuff/busybox-1.12.0-modprobe.u	Sun Sep 21 18:00:44 2008 +0000
     2.3 @@ -0,0 +1,28 @@
     2.4 +--- busybox-1.12.0/modutils/modprobe.c
     2.5 ++++ busybox-1.12.0/modutils/modprobe.c
     2.6 +@@ -932,8 +932,9 @@
     2.7 + 	opt = getopt32(argv, MAIN_OPT_STR, &unused, &unused);
     2.8 + 	argv += optind;
     2.9 + 
    2.10 +-	if (opt & (DUMP_CONF_EXIT | LIST_ALL))
    2.11 ++	if (opt & DUMP_CONF_EXIT)
    2.12 + 		return EXIT_SUCCESS;
    2.13 ++	
    2.14 + 	if (opt & (RESTRICT_DIR | CONFIG_FILE))
    2.15 + 		bb_error_msg_and_die("-t and -C not supported");
    2.16 + 
    2.17 +@@ -942,6 +943,14 @@
    2.18 + 	if (!depend)
    2.19 + 		bb_error_msg_and_die("cannot parse "CONFIG_DEFAULT_DEPMOD_FILE);
    2.20 + 
    2.21 ++	if (opt & LIST_ALL) {
    2.22 ++	    struct dep_t *dt;
    2.23 ++	    for (dt = depend; dt && dt->m_path; dt = dt->m_next) {
    2.24 ++			printf("%s\n",dt->m_path);
    2.25 ++		}
    2.26 ++		return EXIT_SUCCESS;
    2.27 ++	}
    2.28 ++
    2.29 + 	if (remove_opt) {
    2.30 + 		do {
    2.31 + 			/* (*argv) can be NULL here */