summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/list_modules.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/kernel/list_modules.pm b/kernel/list_modules.pm
index a5e0dac90..d37a5a585 100644
--- a/kernel/list_modules.pm
+++ b/kernel/list_modules.pm
@@ -299,7 +299,8 @@ sub dependencies_closure {
(@l, $_[0]);
}
-sub category2modules {
+#- give module filenames, with '-' characters
+sub category2modules_raw {
map {
my ($t1, $t2s) = m|(.*)/(.*)|;
my @sub = $t2s eq '*' ? keys %{$l{$t1}} : split('\|', $t2s);
@@ -310,12 +311,18 @@ sub category2modules {
} split(' ', $_[0]);
}
+#- give driver names, with '_' characters
+sub category2modules {
+ map { s/-/_/g; $_ } category2modules_raw(@_);
+}
+
sub all_modules() {
map { @$_ } map { values %$_ } values %l;
}
sub module2category {
my ($module) = @_;
+ $module =~ s/-/_/g;
foreach my $t1 (keys %l) {
my $h = $l{$t1};
foreach my $t2 (keys %$h) {