wok diff busybox/stuff/busybox-1.12.0-modprobe.u @ 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 | |
children | 6e89af8c5f82 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/busybox/stuff/busybox-1.12.0-modprobe.u Sun Sep 21 18:00:44 2008 +0000 1.3 @@ -0,0 +1,28 @@ 1.4 +--- busybox-1.12.0/modutils/modprobe.c 1.5 ++++ busybox-1.12.0/modutils/modprobe.c 1.6 +@@ -932,8 +932,9 @@ 1.7 + opt = getopt32(argv, MAIN_OPT_STR, &unused, &unused); 1.8 + argv += optind; 1.9 + 1.10 +- if (opt & (DUMP_CONF_EXIT | LIST_ALL)) 1.11 ++ if (opt & DUMP_CONF_EXIT) 1.12 + return EXIT_SUCCESS; 1.13 ++ 1.14 + if (opt & (RESTRICT_DIR | CONFIG_FILE)) 1.15 + bb_error_msg_and_die("-t and -C not supported"); 1.16 + 1.17 +@@ -942,6 +943,14 @@ 1.18 + if (!depend) 1.19 + bb_error_msg_and_die("cannot parse "CONFIG_DEFAULT_DEPMOD_FILE); 1.20 + 1.21 ++ if (opt & LIST_ALL) { 1.22 ++ struct dep_t *dt; 1.23 ++ for (dt = depend; dt && dt->m_path; dt = dt->m_next) { 1.24 ++ printf("%s\n",dt->m_path); 1.25 ++ } 1.26 ++ return EXIT_SUCCESS; 1.27 ++ } 1.28 ++ 1.29 + if (remove_opt) { 1.30 + do { 1.31 + /* (*argv) can be NULL here */