diff options
Diffstat (limited to 'xpp/utils/zconf/Zaptel/Hardware.pm')
-rw-r--r-- | xpp/utils/zconf/Zaptel/Hardware.pm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/xpp/utils/zconf/Zaptel/Hardware.pm b/xpp/utils/zconf/Zaptel/Hardware.pm index 39305fb..8423c18 100644 --- a/xpp/utils/zconf/Zaptel/Hardware.pm +++ b/xpp/utils/zconf/Zaptel/Hardware.pm @@ -18,6 +18,7 @@ sub device_detected($$) { my $name = shift || die; warn "Device '$name' already known\n" if grep { $_->hardware_name eq $name } @zaptel_devices; + $dev->{'HARDWARE_NAME'} = $name; push(@zaptel_devices, $dev); } @@ -34,6 +35,16 @@ sub devices($) { return @zaptel_devices; } +sub drivers($) { + my $pack = shift or die "Wasn't called as a class method\n"; + my @devs = $pack->devices(); + my @drvs = map { $_->{DRIVER} } @devs; + # Make unique + my %drivers; + @drivers{@drvs} = 1; + return sort keys %drivers; +} + sub scan_hardware($) { my $pack = shift || die; |