summaryrefslogtreecommitdiffstats
path: root/kernel/list_modules.pm
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/list_modules.pm')
-rw-r--r--kernel/list_modules.pm20
1 files changed, 15 insertions, 5 deletions
diff --git a/kernel/list_modules.pm b/kernel/list_modules.pm
index e9d5d3965..b5359c6f6 100644
--- a/kernel/list_modules.pm
+++ b/kernel/list_modules.pm
@@ -287,13 +287,18 @@ sub load_dependencies {
%moddeps = ();
foreach (cat_($file)) {
- s![^ ]*/!!g;
- s!\.ko!!g;
- s!\.gz!!g;
- my ($filename, $d) = split ':';
- my ($modname, @deps) = map { filename2modname($_) } $filename, split(' ', $d);
+ my ($m, $d) = split ':';
+ my $path = $m;
+ my ($filename, @fdeps) = map {
+ s![^ ]*/!!g;
+ s!\.ko!!g;
+ s!\.gz!!g;
+ $_;
+ } $m, split(' ', $d);
+ my ($modname, @deps) = map { filename2modname($_) } $filename, @fdeps;
$moddeps{$modname}{deps} = \@deps;
$moddeps{$modname}{filename} = $filename;
+ $moddeps{$modname}{path} = $path;
}
}
@@ -318,6 +323,11 @@ sub modname2filename {
$moddeps{$_[0]}{filename};
}
+sub modname2path {
+ load_default_moddeps() if !%moddeps;
+ $moddeps{$_[0]}{path};
+}
+
sub category2modules {
map {
my ($t1, $t2s) = m|(.*)/(.*)|;