"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/Ocsinventory/Agent/Backend/OS/MacOS/Mem.pm" between
Ocsinventory-Unix-Agent-2.8.0.tar.gz and Ocsinventory-Unix-Agent-2.8.1.tar.gz

About: Ocsinventory-Agent is a Linux agent for OCS Inventory NG.

Mem.pm  (Ocsinventory-Unix-Agent-2.8.0):Mem.pm  (Ocsinventory-Unix-Agent-2.8.1)
skipping to change at line 56 skipping to change at line 56
# 10.7 # 10.7
if ($slot =~ /^DIMM (\d)/) { if ($slot =~ /^DIMM (\d)/) {
$slot = $1; $slot = $1;
} }
my $size = $memory->{'dimm_size'}; my $size = $memory->{'dimm_size'};
my $desc = $memory->{'dimm_part_number'}; my $desc = $memory->{'dimm_part_number'};
if ($desc !~ /empty/) { if ($desc !~ /empty/) {
# dimm_part_number is an hex string, convert it to ascii # dimm_part_number is an hex string, convert it to ascii
$desc = $desc =~ s/^0x//;
$desc = pack "H*", $desc; $desc = pack "H*", $desc;
$desc =~ s/\s+$//; $desc =~ s/\s+$//;
# New macs might have some specific characters, perform a regex to f
ix it
$desc =~ s/(?!-)[[:punct:]]//g;
} }
# if system_profiler lables the size in gigs, we need to trim it down to megs so it's displayed properly # if system_profiler lables the size in gigs, we need to trim it down to megs so it's displayed properly
if($size =~ /GB$/){ if($size =~ /GB$/){
$size =~ s/GB$//; $size =~ s/GB$//;
$size *= 1024; $size *= 1024;
} }
$common->addMemory({ $common->addMemory({
'CAPACITY' => $size, 'CAPACITY' => $size,
'SPEED' => $memory->{'dimm_speed'}, 'SPEED' => $memory->{'dimm_speed'},
 End of changes. 2 change blocks. 
0 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)