summaryrefslogtreecommitdiffstats
path: root/kernel/list_modules.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-08-20 19:58:50 +0000
committerOlivier Blin <oblin@mandriva.com>2007-08-20 19:58:50 +0000
commit7bd5959701e5ebf89060cfe936055a6e3ed0fed6 (patch)
treec2a5229a2e328a9ca696bc2e9245928e8bb07589 /kernel/list_modules.pm
parent06a27ce5aef8e2887b29ef0d5f4d9daebce751b4 (diff)
downloaddrakx-7bd5959701e5ebf89060cfe936055a6e3ed0fed6.tar
drakx-7bd5959701e5ebf89060cfe936055a6e3ed0fed6.tar.gz
drakx-7bd5959701e5ebf89060cfe936055a6e3ed0fed6.tar.bz2
drakx-7bd5959701e5ebf89060cfe936055a6e3ed0fed6.tar.xz
drakx-7bd5959701e5ebf89060cfe936055a6e3ed0fed6.zip
use '_' in modules names
Diffstat (limited to 'kernel/list_modules.pm')
-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) {