line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FusionInventory::Agent::Task::Inventory::Generic::PCI::Videos; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
118180730
|
use strict; |
|
1
|
|
|
|
|
15
|
|
|
1
|
|
|
|
|
100
|
|
4
|
1
|
|
|
1
|
|
9
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
81
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
6
|
use English qw(-no_match_vars); |
|
1
|
|
|
|
|
34
|
|
|
1
|
|
|
|
|
27
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
1318
|
use FusionInventory::Agent::Tools::Generic; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
269
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub isEnabled { |
11
|
0
|
|
|
0
|
0
|
|
my (%params) = @_; |
12
|
0
|
0
|
|
|
|
|
return 0 if $params{no_category}->{video}; |
13
|
|
|
|
|
|
|
# both windows and linux have dedicated modules |
14
|
|
|
|
|
|
|
return |
15
|
0
|
|
0
|
|
|
|
$OSNAME ne 'MSWin32' && |
16
|
|
|
|
|
|
|
$OSNAME ne 'linux'; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub doInventory { |
20
|
0
|
|
|
0
|
0
|
|
my (%params) = @_; |
21
|
|
|
|
|
|
|
|
22
|
0
|
|
|
|
|
|
my $inventory = $params{inventory}; |
23
|
0
|
|
|
|
|
|
my $logger = $params{logger}; |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
foreach my $video (_getVideos(logger => $logger)) { |
26
|
0
|
|
|
|
|
|
$inventory->addEntry( |
27
|
|
|
|
|
|
|
section => 'VIDEOS', |
28
|
|
|
|
|
|
|
entry => $video |
29
|
|
|
|
|
|
|
); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub _getVideos { |
34
|
0
|
|
|
0
|
|
|
my @videos; |
35
|
|
|
|
|
|
|
|
36
|
0
|
|
|
|
|
|
foreach my $device (getPCIDevices(@_)) { |
37
|
0
|
0
|
|
|
|
|
next unless $device->{NAME} =~ /graphics|vga|video|display/i; |
38
|
0
|
|
|
|
|
|
push @videos, { |
39
|
|
|
|
|
|
|
CHIPSET => $device->{NAME}, |
40
|
|
|
|
|
|
|
NAME => $device->{MANUFACTURER}, |
41
|
|
|
|
|
|
|
}; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
0
|
|
|
|
|
|
return @videos; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |