summaryrefslogtreecommitdiffstats
path: root/kernel/modules.pl
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-09-28 23:27:08 +0000
committerOlivier Blin <oblin@mandriva.org>2005-09-28 23:27:08 +0000
commitfe0e906afb1cba1fbb1f8fd8ec3718d8eb83c911 (patch)
treecef52eaab560a6e80a7aa4c3d045a717352e6409 /kernel/modules.pl
parent90292573c8b966753fe413d79702b73d804a34c4 (diff)
downloaddrakx-backup-do-not-use-fe0e906afb1cba1fbb1f8fd8ec3718d8eb83c911.tar
drakx-backup-do-not-use-fe0e906afb1cba1fbb1f8fd8ec3718d8eb83c911.tar.gz
drakx-backup-do-not-use-fe0e906afb1cba1fbb1f8fd8ec3718d8eb83c911.tar.bz2
drakx-backup-do-not-use-fe0e906afb1cba1fbb1f8fd8ec3718d8eb83c911.tar.xz
drakx-backup-do-not-use-fe0e906afb1cba1fbb1f8fd8ec3718d8eb83c911.zip
factorize chomps
Diffstat (limited to 'kernel/modules.pl')
-rw-r--r--kernel/modules.pl7
1 files changed, 3 insertions, 4 deletions
diff --git a/kernel/modules.pl b/kernel/modules.pl
index 1e058cce4..a00bb0544 100644
--- a/kernel/modules.pl
+++ b/kernel/modules.pl
@@ -208,12 +208,12 @@ sub make_modules_description {
sub get_main_modules() {
my $base = dirname($0);
my $main = chomp_(cat_("$base/RPMS/.main"));
- `tar tvf $base/all.kernels/$main/all_modules.tar | awk '{ print \$6 }'`;
+ chomp_(`tar tvf $base/all.kernels/$main/all_modules.tar | awk '{ print \$6 }'`);
}
sub pci_modules4stage1 {
my ($category) = @_;
- my @list = map { s/\.k?o.*$//; chomp_($_) } get_main_modules();
+ my @list = map { s/\.k?o.*$//; $_ } get_main_modules();
my %listed;
@listed{@list} = ();
my @modules = difference2([ category2modules($category) ], \@modules_removed_from_stage1);
@@ -240,7 +240,6 @@ sub check() {
my ($msg, $verbose, @l) = @_;
my %not_listed;
foreach (@l) {
- chomp;
my ($mod) = m|([^/]*)\.k?o(\.gz)?$| or next;
delete $deprecated_modules{$mod};
next if $listed{$mod};
@@ -256,7 +255,7 @@ sub check() {
}
};
$not_listed->('NOT LISTED', 1, get_main_modules());
- $not_listed->('not listed', $verbose, `rpm -qpl RPMS/kernel-*2.6*`);
+ $not_listed->('not listed', $verbose, chomp_(`rpm -qpl RPMS/kernel-*2.6*`));
if (%deprecated_modules) {
my %per_cat;
push @{$per_cat{$listed{$_}}}, $_ foreach keys %deprecated_modules;