line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FusionInventory::Agent::Task::Inventory::AIX::Sounds; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
84666093
|
use strict; |
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
61
|
|
4
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
70
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
723
|
use FusionInventory::Agent::Tools; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
331
|
|
7
|
2
|
|
|
2
|
|
891
|
use FusionInventory::Agent::Tools::AIX; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
419
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub isEnabled { |
10
|
0
|
|
|
0
|
0
|
0
|
my (%params) = @_; |
11
|
0
|
0
|
|
|
|
0
|
return 0 if $params{no_category}->{sound}; |
12
|
0
|
|
|
|
|
0
|
return canRun('lsdev'); |
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 $sound (_getSounds( |
22
|
|
|
|
|
|
|
logger => $logger |
23
|
|
|
|
|
|
|
)) { |
24
|
0
|
|
|
|
|
0
|
$inventory->addEntry( |
25
|
|
|
|
|
|
|
section => 'SOUNDS', |
26
|
|
|
|
|
|
|
entry => $sound |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub _getSounds { |
33
|
7
|
|
|
7
|
|
9902
|
my @adapters = getAdaptersFromLsdev(@_); |
34
|
|
|
|
|
|
|
|
35
|
7
|
|
|
|
|
46
|
my @sounds; |
36
|
7
|
|
|
|
|
11
|
foreach my $adapter (@adapters) { |
37
|
82
|
50
|
|
|
|
124
|
next unless $adapter->{DESCRIPTION} =~ /audio/i; |
38
|
|
|
|
|
|
|
push @sounds, { |
39
|
|
|
|
|
|
|
NAME => $adapter->{NAME}, |
40
|
|
|
|
|
|
|
DESCRIPTION => $adapter->{DESCRIPTION} |
41
|
0
|
|
|
|
|
0
|
}; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
7
|
|
|
|
|
14
|
return @sounds; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |