"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/Ocsinventory/Agent/Backend/OS/Linux/Storages.pm" between
Ocsinventory-Unix-Agent-2.6.1.tar.gz and Ocsinventory-Unix-Agent-2.8.0.tar.gz

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

Storages.pm  (Ocsinventory-Unix-Agent-2.6.1):Storages.pm  (Ocsinventory-Unix-Agent-2.8.0)
skipping to change at line 216 skipping to change at line 216
$foundcdroms++; $foundcdroms++;
} }
$input .= $_; $input .= $_;
} }
if ($input =~ !/<list>/g) { # adding "<list> " root element because if ($input =~ !/<list>/g) { # adding "<list> " root element because
$input =~ s/\?>/\?>\n<list>/; # prior to versi on B.02.16, "lshw -class disk -xml" produces xml output $input =~ s/\?>/\?>\n<list>/; # prior to versi on B.02.16, "lshw -class disk -xml" produces xml output
$input .= "\n</list>"; # without the "< list>" root element, which does not parse correctly. $input .= "\n</list>"; # without the "< list>" root element, which does not parse correctly.
} }
my $xml = new XML::Simple; my $xml = new XML::Simple;
my $data = $xml->XMLin($input); my $data = $xml->XMLin($input);
my $nodes = $data->{list}->{node}; # my $nodes = $data->{list}->{node};
my $nodes = $data->{list};
foreach my $device (sort keys %$nodes) { foreach my $device (sort keys %$nodes) {
my $description = ""; my $description = "";
my $size = 0; my $size = 0;
my $sizeUnits = ""; my $sizeUnits = "";
my $name = "not set"; my $name = "not set";
my $type = ""; my $type = "";
my $vendor = ""; my $vendor = "";
my $model = ""; my $model = "";
my $serial = ""; my $serial = "";
 End of changes. 1 change blocks. 
1 lines changed or deleted 2 lines changed or added

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