summaryrefslogtreecommitdiffstats
path: root/perl-install/detect_devices.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-08-29 20:15:36 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-08-29 20:15:36 +0000
commitd5e061896a35a49a50124949c2882ac9cbe94589 (patch)
tree920e7af830e2aa3a766dba5b7aacdca4a6b50a44 /perl-install/detect_devices.pm
parentc05cafad9c601272884cf75ee4e056bfbf4b2917 (diff)
downloaddrakx-backup-do-not-use-d5e061896a35a49a50124949c2882ac9cbe94589.tar
drakx-backup-do-not-use-d5e061896a35a49a50124949c2882ac9cbe94589.tar.gz
drakx-backup-do-not-use-d5e061896a35a49a50124949c2882ac9cbe94589.tar.bz2
drakx-backup-do-not-use-d5e061896a35a49a50124949c2882ac9cbe94589.tar.xz
drakx-backup-do-not-use-d5e061896a35a49a50124949c2882ac9cbe94589.zip
no_comment
Diffstat (limited to 'perl-install/detect_devices.pm')
-rw-r--r--perl-install/detect_devices.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index b8e9c9993..19bae0339 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -5,6 +5,7 @@ use strict;
use log;
use common qw(:common :file);
+use devices;
use c;
@@ -30,9 +31,8 @@ sub get {
sub hds() { grep { $_->{type} eq 'hd' } get(); }
sub cdroms() { grep { $_->{type} eq 'cdrom' } get(); }
sub floppies() {
- my @l = grep { $_->{type} eq 'fd' } get();
- unshift @l, "fd0" if tryOpen("fd0");
- @l;
+ (grep { tryOpen($_) } qw(fd0 fd1)),
+ (grep { $_->{type} eq 'fd' } get());
}
sub hasSCSI() {
@@ -134,7 +134,7 @@ sub getDAC960() {
sub getNet() {
- grep { hasNetDevice($_) } qw(eth0 tr0 plip0 plip1 plip2 fddi0);
+ grep { hasNetDevice($_) } qw(eth0 eth1 eth2 eth3 tr0 plip0 plip1 plip2 fddi0);
}
sub getPlip() {
foreach (0..2) {
@@ -151,5 +151,5 @@ sub hasNetDevice($) { c::hasNetDevice($_[0]) }
sub tryOpen($) {
local *F;
- sysopen F, "/dev/$_[0]", c::O_NONBLOCK();
+ sysopen F, devices::make($_[0]), c::O_NONBLOCK();
}