From: "Jörg Sommer" <joerg@alea.gnuu.de>
To: zsh-workers@sunsite.dk
Cc: "Jörg Sommer" <joerg@alea.gnuu.de>
Subject: [PATCH 2/3] Replace obsolate modprobe -l by file search
Date: Mon, 26 Jan 2009 22:10:47 +0100 [thread overview]
Message-ID: <1233004248-24000-2-git-send-email-joerg@alea.gnuu.de> (raw)
In-Reply-To: <1233004248-24000-1-git-send-email-joerg@alea.gnuu.de>
In the manual page of the current modprobe (version 3.4) the option -l is
marked as obsolate; “This option is provided for backwards
compatibility.” So use Zsh tools to get the name of the modules. The base
directory is takes from the manual page that says: “modprobe looks in
the module directory /lib/modules/‘uname -r‘ for all the modules […].”
---
Completion/Linux/Command/_modutils | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Completion/Linux/Command/_modutils b/Completion/Linux/Command/_modutils
index db419ac..fe1b58e 100644
--- a/Completion/Linux/Command/_modutils
+++ b/Completion/Linux/Command/_modutils
@@ -77,7 +77,7 @@ case "$state" in
;&
all_modules)
- modules=( ${${${${(f)"$(_call_program modules ${(M)words[1]##*/}modprobe -l 2>/dev/null)"}:#}##*/}%%.*} )
+ modules=( /lib/modules/$(uname -r)/(*~source)/**/*(.:t:r) )
if [[ $state = loadable_modules ]]; then
modules=( ${modules:#(${(j:|:)~${=loaded_modules//_/-}})} )
--
1.6.0.6
next prev parent reply other threads:[~2009-01-26 21:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-26 21:10 [PATCH 1/3] modinfo: remove invalid option -f Jörg Sommer
2009-01-26 21:10 ` Jörg Sommer [this message]
2009-01-26 21:10 ` [PATCH 3/3] modinfo: Add option -k for different kernel version Jörg Sommer
2009-01-27 4:06 ` [PATCH 1/3] modinfo: remove invalid option -f Andrey Borzenkov
2009-01-29 17:56 ` Jörg Sommer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1233004248-24000-2-git-send-email-joerg@alea.gnuu.de \
--to=joerg@alea.gnuu.de \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).