# HG changeset patch # User Pascal Bellard # Date 1222704747 -7200 # Node ID 6e89af8c5f82bcdbd81399b015ecaf50099e6dc3 # Parent e14946791c0507134e89a7b62652e961f8923cc9 busybox/modprobe -l: add pattern support diff -r e14946791c05 -r 6e89af8c5f82 busybox/stuff/busybox-1.12.0-modprobe.u --- a/busybox/stuff/busybox-1.12.0-modprobe.u Sun Sep 28 23:14:14 2008 +0200 +++ b/busybox/stuff/busybox-1.12.0-modprobe.u Mon Sep 29 18:12:27 2008 +0200 @@ -11,14 +11,15 @@ if (opt & (RESTRICT_DIR | CONFIG_FILE)) bb_error_msg_and_die("-t and -C not supported"); -@@ -942,6 +943,14 @@ +@@ -942,6 +943,15 @@ 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); ++ struct dep_t *dt; ++ for (dt = depend; dt && dt->m_path; dt = dt->m_next) { ++ if (*argv && fnmatch(*argv,dt->m_name,0)) continue; ++ puts(dt->m_path); + } + return EXIT_SUCCESS; + }