From 11a6615944395ac6edc95c6f3d45ed22b0616e02 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 19 May 2005 03:03:14 +0000 Subject: - simplify through modules::probe_category() - ensure modules.pm is loaded since we used it for quite some time --- perl-install/harddrake/data.pm | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'perl-install/harddrake/data.pm') diff --git a/perl-install/harddrake/data.pm b/perl-install/harddrake/data.pm index 37fc9c491..a29b57fdc 100644 --- a/perl-install/harddrake/data.pm +++ b/perl-install/harddrake/data.pm @@ -3,6 +3,7 @@ package harddrake::data; use strict; use detect_devices; use common; +use modules; our @ISA = qw(Exporter); our @EXPORT_OK = qw(version tree); @@ -349,11 +350,7 @@ our @tree = string => N("SATA controllers"), icon => "ide_hd.png", configurator => "", - detector => sub { - require list_modules; - my @modules = list_modules::category2modules('disk/sata'); - f(grep { member($_->{driver}, @modules) } @devices); - }, + detector => sub { f(modules::probe_category('disk/sata')) }, checked_on_boot => 1, }, @@ -362,11 +359,7 @@ our @tree = string => N("RAID controllers"), icon => "ide_hd.png", configurator => "", - detector => sub { - require list_modules; - my @modules = list_modules::category2modules('disk/hardware_raid'); - f(grep { member($_->{driver}, @modules) } @devices); - }, + detector => sub { f(modules::probe_category('disk/hardware_raid')) }, checked_on_boot => 1, }, -- cgit v1.2.1