diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-07-24 10:23:21 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-07-24 10:23:21 +0000 |
commit | 7e5672eb837597a08dc886dc022f704be9b97665 (patch) | |
tree | 51aba798e9eb6501aa32cc1cfdbf4d759a031b3b /perl-install/detect_devices.pm | |
parent | 5d8a5663900537c6695f08692920d666f5ec9213 (diff) | |
download | drakx-backup-do-not-use-7e5672eb837597a08dc886dc022f704be9b97665.tar drakx-backup-do-not-use-7e5672eb837597a08dc886dc022f704be9b97665.tar.gz drakx-backup-do-not-use-7e5672eb837597a08dc886dc022f704be9b97665.tar.bz2 drakx-backup-do-not-use-7e5672eb837597a08dc886dc022f704be9b97665.tar.xz drakx-backup-do-not-use-7e5672eb837597a08dc886dc022f704be9b97665.zip |
generalize the use of chomp_ as the functional alternative to chomp (and works on lists)
Diffstat (limited to 'perl-install/detect_devices.pm')
-rw-r--r-- | perl-install/detect_devices.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index a210515b5..6bc394744 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -147,9 +147,9 @@ sub getIDE() { #- Great. 2.2 kernel, things are much easier and less error prone. foreach my $d (sort @{[glob_('/proc/ide/hd*')]}) { - my ($t) = chop_(cat_("$d/media")); + my $t = chomp_(cat_("$d/media")); my $type = $ {{disk => 'hd', cdrom => 'cdrom', tape => 'tape', floppy => 'fd'}}{$t} or next; - my ($info) = chop_(cat_("$d/model")); $info ||= "(none)"; + my $info = chomp_(cat_("$d/model")) || "(none)"; my $num = ord (($d =~ /(.)$/)[0]) - ord 'a'; push @idi, { type => $type, device => basename($d), info => $info, bus => $num/2, id => $num%2 }; |