summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-08-21 12:12:49 +0000
committerOlivier Blin <oblin@mandriva.com>2007-08-21 12:12:49 +0000
commit1a811e066b38db62cbd236e635295a6ca32a24b7 (patch)
tree3acd2733671ea6bf939dbb4789f1e988b5f77dd7 /kernel
parent571990ffbf2d191b00b335b8c320be53a7e03e54 (diff)
downloaddrakx-backup-do-not-use-1a811e066b38db62cbd236e635295a6ca32a24b7.tar
drakx-backup-do-not-use-1a811e066b38db62cbd236e635295a6ca32a24b7.tar.gz
drakx-backup-do-not-use-1a811e066b38db62cbd236e635295a6ca32a24b7.tar.bz2
drakx-backup-do-not-use-1a811e066b38db62cbd236e635295a6ca32a24b7.tar.xz
drakx-backup-do-not-use-1a811e066b38db62cbd236e635295a6ca32a24b7.zip
add filename2modname
Diffstat (limited to 'kernel')
-rw-r--r--kernel/list_modules.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/kernel/list_modules.pm b/kernel/list_modules.pm
index d37a5a585..70fa2cdfe 100644
--- a/kernel/list_modules.pm
+++ b/kernel/list_modules.pm
@@ -299,6 +299,12 @@ sub dependencies_closure {
(@l, $_[0]);
}
+sub filename2modname {
+ my ($modname) = @_;
+ $modname =~ s/-/_/g;
+ $modname;
+}
+
#- give module filenames, with '-' characters
sub category2modules_raw {
map {
@@ -313,7 +319,7 @@ sub category2modules_raw {
#- give driver names, with '_' characters
sub category2modules {
- map { s/-/_/g; $_ } category2modules_raw(@_);
+ map { filename2modname($_) } category2modules_raw(@_);
}
sub all_modules() {
@@ -322,7 +328,7 @@ sub all_modules() {
sub module2category {
my ($module) = @_;
- $module =~ s/-/_/g;
+ $module = filename2modname($module);
foreach my $t1 (keys %l) {
my $h = $l{$t1};
foreach my $t2 (keys %$h) {