summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-07-06 11:04:58 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-07-06 11:04:58 +0000
commit949328c9ee3581b2157c44fdb30018db88579587 (patch)
tree8bbfc3c9d365a1816e8b8e6a3cc6035cd37cc736
parent9ddba7f1d76c11c1e9f4315b828326ca742134cd (diff)
downloaddrakx-949328c9ee3581b2157c44fdb30018db88579587.tar
drakx-949328c9ee3581b2157c44fdb30018db88579587.tar.gz
drakx-949328c9ee3581b2157c44fdb30018db88579587.tar.bz2
drakx-949328c9ee3581b2157c44fdb30018db88579587.tar.xz
drakx-949328c9ee3581b2157c44fdb30018db88579587.zip
the "each" trap got me :-(
fixed (=> fixes the modules.conf missing many aliases)
-rw-r--r--kernel/list_modules.pm12
1 files changed, 5 insertions, 7 deletions
diff --git a/kernel/list_modules.pm b/kernel/list_modules.pm
index 0da372abc..48929f95e 100644
--- a/kernel/list_modules.pm
+++ b/kernel/list_modules.pm
@@ -169,15 +169,13 @@ sub category2modules {
sub module2category {
my ($module) = @_;
- my ($t1, $t2);
- while (($t1, my $h) = each %l) {
- while (($t2, my $l) = each %$h) {
- $module eq $_ and goto found foreach @$l;
- }
+ foreach my $t1 (keys %l) {
+ my $h = $l{$t1};
+ foreach my $t2 (keys %$h) {
+ $module eq $_ and return "$t1/$t2" foreach @{$h->{$t2}};
+ }
}
return;
- found:
- "$t1/$t2";
}
sub sub_categories {