diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/list_modules.pm | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/kernel/list_modules.pm b/kernel/list_modules.pm index 6e41aaa76..25022d95e 100644 --- a/kernel/list_modules.pm +++ b/kernel/list_modules.pm @@ -281,18 +281,22 @@ our %l = ( ); my %dependencies; +my %filenames; sub load_dependencies { my ($file) = @_; - %dependencies = map { + %dependencies = (); + %filenames = (); + foreach (cat_($file)) { s![^ ]*/!!g; s!\.ko!!g; s!\.gz!!g; my ($filename, $d) = split ':'; my ($modname, @deps) = map { filename2modname($_) } $filename, split(' ', $d); $dependencies{$modname} = \@deps; - } cat_($file); + $filenames{$modname} = $filename; + } } sub dependencies_closure { @@ -306,6 +310,10 @@ sub filename2modname { $modname; } +sub modname2filename { + $filenames{$_[0]}; +} + #- give module filenames, with '-' characters sub category2modules_raw { map { |