Skip to content

Commit

Permalink
Merge branch '2.2.x' into 2.3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Gonéri Le Bouder committed May 30, 2012
2 parents 7401d8b + 6546aa2 commit 3dc1918
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
7 changes: 3 additions & 4 deletions README
Expand Up @@ -3,10 +3,9 @@

Description
-----------
The fusioinventory agent is a generic agent, running on each managed node. It
can perform a certain number of actions, called tasks, according to its own
execution plan, or on behalf of a GLPI server with fusioninventory plugin,
acting as a control point.
The FusionInventory agent is a generic management agent. It can perform a
certain number of tasks, according to its own execution plan, or on behalf of a
GLPI server with fusioninventory plugin, acting as a control point.

Two of these tasks are included in agent source distribution, local inventory
and wake on lan. Other tasks are distributed separatly, excepted for binary
Expand Down
1 change: 1 addition & 0 deletions lib/FusionInventory/Agent/Tools/Linux.pm
Expand Up @@ -33,6 +33,7 @@ sub getDevicesFromUdev {
file => $file,
pattern => qr/^N:(\S+)/
);
next unless $device;
next unless $device =~ /([hsv]d[a-z]|sr\d+)$/;
push (@devices, _parseUdevEntry(
logger => $params{logger}, file => $file, device => $device
Expand Down
12 changes: 6 additions & 6 deletions lib/FusionInventory/Agent/Tools/Screen.pm
Expand Up @@ -282,7 +282,7 @@ sub checkParsedEdid {
sub _build_detailed_timing {
my ($pixel_clock, $vv) = @_;

my $h = get_many_bits($vv, 'detailed_timing');
my $h = _get_many_bits($vv, 'detailed_timing');
$h->{pixel_clock} = $pixel_clock / 100; # to have it in MHz
my %detailed_timing_field_size = map { $_->[1], $_->[0] } @{$subfields{detailed_timing}};
foreach my $field (keys %detailed_timing_field_size) {
Expand All @@ -301,7 +301,7 @@ sub _add_standard_timing_modes {
'4/3', '5/4', '16/9',
);
$v = [ map {
my $h = get_many_bits($_, 'standard_timing');
my $h = _get_many_bits($_, 'standard_timing');
$h->{X} = ($h->{X} + 31) * 8;
if ($_ ne "\x20\x20" && $h->{X} > 256) { # cf VALID_TIMING in Xorg edid.h
$h->{vfreq} += 60;
Expand Down Expand Up @@ -426,15 +426,15 @@ sub parseEdid {
$dtd_offset -= 4;

while ($dtd_offset > 0) {
my $h = get_many_bits($v, 'cea_data_block_collection');
my $h = _get_many_bits($v, 'cea_data_block_collection');
$dtd_offset -= $h->{size} + 1;

my $vv;
($vv, $v) = unpack("x a$h->{size} a*", $v);
if ($h->{type} == 0x02) { # Video Data Block
my @vmodes = unpack("a" x $h->{size}, $vv);
foreach my $vmode (@vmodes) {
$h = get_many_bits($vmode, 'cea_video_data_block');
$h = _get_many_bits($vmode, 'cea_video_data_block');
my $cea_mode = $cea_video_modes[$h->{mode} - 1];
if (!$cea_mode) {
warn "parse_edid: unhandled CEA mode $h->{mode}\n" if $verbose;
Expand Down Expand Up @@ -504,7 +504,7 @@ sub parseEdid {
if ($error < 1 && $in_cm{vertical}) {
# using it for the ratio
$edid{ratio} = $in_cm{horizontal} / $in_cm{vertical};
$edid{ratio_name} = ratio_name($in_cm{horizontal}, $in_cm{vertical}, 'mm');
$edid{ratio_name} = _ratio_name($in_cm{horizontal}, $in_cm{vertical}, 'mm');
$edid{ratio_precision} = 'mm';
}

Expand Down Expand Up @@ -533,7 +533,7 @@ sub parseEdid {
$h->{pixel_clock} / $horizontal_total / $vertical_total * 1000 * 1000 * ($h->{interlaced} ? 2 : 1),
$h->{pixel_clock} / $horizontal_total * 1000,
$h->{interlaced} ? "interlaced, " : '',
nearest_ratio($h->{horizontal_active} / $h->{vertical_active}, 0.01) || sprintf("%.2f", $h->{horizontal_active} / $h->{vertical_active}),
_nearest_ratio($h->{horizontal_active} / $h->{vertical_active}, 0.01) || sprintf("%.2f", $h->{horizontal_active} / $h->{vertical_active}),
$dpi_string ? ", $dpi_string" : '';

$h->{ModeLine} = sprintf qq("%dx%d" $h->{pixel_clock} %d %d %d %d %d %d %d %d %shsync %svsync%s),
Expand Down
4 changes: 2 additions & 2 deletions lib/FusionInventory/Agent/Tools/Win32.pm
Expand Up @@ -187,8 +187,8 @@ sub runCommand {
};

$job->spawn(
"$ENV{SYSTEMROOT}/system32/cmd.exe",
"cmd.exe /c $params{command}",
"$ENV{SYSTEMROOT}\\system32\\cmd.exe",
"cmd /c $params{command}",
$args
);

Expand Down
2 changes: 1 addition & 1 deletion tools/createExtLinks.sh
Expand Up @@ -2,7 +2,7 @@
# Create symblink to the subi task modules
set -e

for task in Deploy SNMPQuery NetDiscovery ESX; do
for task in Deploy SNMPQuery NetDiscovery NetInventory ESX; do
taskLcName=`perl -e" print lc \"$task\""`
taskFile=$PWD/../agent-task-$taskLcName/lib/FusionInventory/Agent/Task/$task.pm
taskDir=$PWD/../agent-task-$taskLcName/lib/FusionInventory/Agent/Task/$task
Expand Down

0 comments on commit 3dc1918

Please sign in to comment.