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