summaryrefslogtreecommitdiffstats
path: root/perl-install/detect_devices.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-03-08 13:43:54 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-03-08 13:43:54 +0000
commit912a7a9a3731ba1fcbd6d90598323fa07f8ffc90 (patch)
tree56c7c4b34d2c60d7604d53c10c8ad31e576e79c3 /perl-install/detect_devices.pm
parent14c73ed3e756c1fcd05b50eb8fd049d9f089aaae (diff)
downloaddrakx-912a7a9a3731ba1fcbd6d90598323fa07f8ffc90.tar
drakx-912a7a9a3731ba1fcbd6d90598323fa07f8ffc90.tar.gz
drakx-912a7a9a3731ba1fcbd6d90598323fa07f8ffc90.tar.bz2
drakx-912a7a9a3731ba1fcbd6d90598323fa07f8ffc90.tar.xz
drakx-912a7a9a3731ba1fcbd6d90598323fa07f8ffc90.zip
(isBurner): use syslog to detect scsi burners
Diffstat (limited to 'perl-install/detect_devices.pm')
-rw-r--r--perl-install/detect_devices.pm10
1 files changed, 9 insertions, 1 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 347ad4c7a..f5e6270c4 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -63,7 +63,15 @@ sub floppies() {
sub floppy { first(floppies()) }
#- example ls120, model = "LS-120 SLIM 02 UHD Floppy"
-sub isBurner { my $f = tryOpen($_[0]); $f && c::isBurner(fileno($f)) }
+sub isBurner {
+ my ($dev) = @_;
+ if (my ($nb) = $dev =~ /scd(.*)/) {
+ grep { /^(scd|sr)$nb:.*writer/ } syslog();
+ } else {
+ my $f = tryOpen($dev);
+ $f && c::isBurner(fileno($f));
+ }
+}
sub isZipDrive { $_[0]->{info} =~ /ZIP\s+\d+/ } #- accept ZIP 100, untested for bigger ZIP drive.
#-sub isJazzDrive { $_[0]->{info} =~ /JAZZ?\s+/ } #- untested.
sub isLS120Drive { $_[0]->{info} =~ /LS-?120|144MB/ }