wok view 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 source
1 --- busybox-1.12.0/modutils/modprobe.c
2 +++ busybox-1.12.0/modutils/modprobe.c
3 @@ -932,8 +932,9 @@
4 opt = getopt32(argv, MAIN_OPT_STR, &unused, &unused);
5 argv += optind;
7 - if (opt & (DUMP_CONF_EXIT | LIST_ALL))
8 + if (opt & DUMP_CONF_EXIT)
9 return EXIT_SUCCESS;
10 +
11 if (opt & (RESTRICT_DIR | CONFIG_FILE))
12 bb_error_msg_and_die("-t and -C not supported");
14 @@ -942,6 +943,14 @@
15 if (!depend)
16 bb_error_msg_and_die("cannot parse "CONFIG_DEFAULT_DEPMOD_FILE);
18 + if (opt & LIST_ALL) {
19 + struct dep_t *dt;
20 + for (dt = depend; dt && dt->m_path; dt = dt->m_next) {
21 + printf("%s\n",dt->m_path);
22 + }
23 + return EXIT_SUCCESS;
24 + }
25 +
26 if (remove_opt) {
27 do {
28 /* (*argv) can be NULL here */