From f9640e4952073e66f428c1fe3691c435c1e4bb63 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 6 Aug 2002 20:29:40 +0000 Subject: - dont detect undef devices --- perl-install/harddrake/data.pm | 4 ++-- perl-install/scanner.pm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/perl-install/harddrake/data.pm b/perl-install/harddrake/data.pm index 6f6c6c4bb..285585836 100644 --- a/perl-install/harddrake/data.pm +++ b/perl-install/harddrake/data.pm @@ -52,8 +52,8 @@ our @tree = # ["","FDDI cards", "Ethernetcard.png", "", \&detect_devices::getNet], ["MODEM","Modem", "modem.png", "", sub { require network::modem; my $modem; - modem_detect_backend($modem); - $modem->{device} ?$modem : {}; + network::modem::modem_detect_backend($modem); + grep {$modem->{device} } @{ $modem}; } ], # ["","Isdn", "", "", \&detect_devices::getNet] diff --git a/perl-install/scanner.pm b/perl-install/scanner.pm index 1bc381c9d..a820bd41d 100755 --- a/perl-install/scanner.pm +++ b/perl-install/scanner.pm @@ -65,7 +65,7 @@ sub detect { }}; ++$i; } - foreach ({$_->{media_type} =~ /scanner/ } detect_devices::getSCSI()) { + foreach (grep {$_->{media_type} =~ /scanner/ } detect_devices::getSCSI()) { push @res, { port => "/dev/usb/scanner$i", val => { DESCRIPTION => $_->{info} }, }; -- cgit v1.2.1