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