line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FusionInventory::Agent::Task::Inventory::Generic::PCI::Modems; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
149904264
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
139
|
|
4
|
2
|
|
|
2
|
|
14
|
use warnings; |
|
2
|
|
|
|
|
12
|
|
|
2
|
|
|
|
|
143
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
1155
|
use FusionInventory::Agent::Tools; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
395
|
|
7
|
2
|
|
|
2
|
|
1230
|
use FusionInventory::Agent::Tools::Generic; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
561
|
|
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
|
|
11
|
my @modems; |
31
|
|
|
|
|
|
|
|
32
|
1
|
|
|
|
|
27
|
foreach my $device (getPCIDevices(@_)) { |
33
|
24
|
50
|
|
|
|
68
|
next unless $device->{NAME} =~ /modem/i; |
34
|
|
|
|
|
|
|
push @modems, { |
35
|
|
|
|
|
|
|
DESCRIPTION => $device->{NAME}, |
36
|
|
|
|
|
|
|
NAME => $device->{MANUFACTURER}, |
37
|
0
|
|
|
|
|
0
|
}; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
1
|
|
|
|
|
5
|
return @modems; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
1; |