line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FusionInventory::Agent::Task::Inventory::Generic::PCI::Modems; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
123205329
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
78
|
|
4
|
2
|
|
|
2
|
|
8
|
use warnings; |
|
2
|
|
|
|
|
11
|
|
|
2
|
|
|
|
|
108
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
588
|
use FusionInventory::Agent::Tools; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
321
|
|
7
|
2
|
|
|
2
|
|
939
|
use FusionInventory::Agent::Tools::Generic; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
483
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub isEnabled { |
10
|
0
|
|
|
0
|
0
|
0
|
my (%params) = @_; |
11
|
0
|
0
|
|
|
|
0
|
return 0 if $params{no_category}->{modem}; |
12
|
0
|
|
|
|
|
0
|
return 1; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub doInventory { |
16
|
0
|
|
|
0
|
0
|
0
|
my (%params) = @_; |
17
|
|
|
|
|
|
|
|
18
|
0
|
|
|
|
|
0
|
my $inventory = $params{inventory}; |
19
|
0
|
|
|
|
|
0
|
my $logger = $params{logger}; |
20
|
|
|
|
|
|
|
|
21
|
0
|
|
|
|
|
0
|
foreach my $modem (_getModems(logger => $logger)) { |
22
|
0
|
|
|
|
|
0
|
$inventory->addEntry( |
23
|
|
|
|
|
|
|
section => 'MODEMS', |
24
|
|
|
|
|
|
|
entry => $modem |
25
|
|
|
|
|
|
|
); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub _getModems { |
30
|
1
|
|
|
1
|
|
8
|
my @modems; |
31
|
|
|
|
|
|
|
|
32
|
1
|
|
|
|
|
20
|
foreach my $device (getPCIDevices(@_)) { |
33
|
24
|
50
|
|
|
|
42
|
next unless $device->{NAME} =~ /modem/i; |
34
|
|
|
|
|
|
|
push @modems, { |
35
|
|
|
|
|
|
|
DESCRIPTION => $device->{NAME}, |
36
|
|
|
|
|
|
|
NAME => $device->{MANUFACTURER}, |
37
|
0
|
|
|
|
|
0
|
}; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
1
|
|
|
|
|
2
|
return @modems; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
1; |