summaryrefslogtreecommitdiffstats
path: root/perl-install/detect_devices.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-08-29 09:36:45 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-08-29 09:36:45 +0000
commit701635b319c0153cf68896d34cb74b2906e02407 (patch)
treed7a3cf890e8f1c52603b99a5e6159e1b6df474f8 /perl-install/detect_devices.pm
parent8d03aa6906756ad7ae6f6b513f34704376890683 (diff)
downloaddrakx-backup-do-not-use-701635b319c0153cf68896d34cb74b2906e02407.tar
drakx-backup-do-not-use-701635b319c0153cf68896d34cb74b2906e02407.tar.gz
drakx-backup-do-not-use-701635b319c0153cf68896d34cb74b2906e02407.tar.bz2
drakx-backup-do-not-use-701635b319c0153cf68896d34cb74b2906e02407.tar.xz
drakx-backup-do-not-use-701635b319c0153cf68896d34cb74b2906e02407.zip
better floppy detection/info
Diffstat (limited to 'perl-install/detect_devices.pm')
-rw-r--r--perl-install/detect_devices.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 46626e06c..dba137f4c 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -73,10 +73,15 @@ sub get_mac_generation() {
return "Unknown Generation";
}
+sub dev_is_devfs { 0 && -e "/dev/.devfsd" }
+
sub floppies() {
require modules;
eval { modules::load("floppy") };
- my @fds = map {; { device => $_, media_type => 'fd' } } grep { tryOpen($_) } qw(fd0 fd1);
+ my @fds = map {
+ my $info = (!dev_is_devfs() || -e "/dev/$_") && c::floppy_info(devices::make($_));
+ if_($info && $info ne '(null)', { device => $_, media_type => 'fd', info => $info })
+ } qw(fd0 fd1);
my @ide = ls120s() and modules::load("ide-floppy");
my @scsi = grep { $_->{media_type} eq 'fd' } getSCSI();
@ide, @scsi, @fds;