fix #2087
This commit is contained in:
parent
547cf2115f
commit
f0e668fb10
|
@ -350,22 +350,23 @@ sub manage_selection {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defined($self->{option_results}->{filter_duplicate})) {
|
if (defined($self->{option_results}->{filter_duplicate})) {
|
||||||
my $sid = $_;
|
my $duplicate = 0;
|
||||||
my @duplicate = grep {
|
foreach my $entry (values %{$self->{storage}}) {
|
||||||
($self->{storage}->{$_}->{allocation_units} == $result->{$oid_hrStorageAllocationUnits . "." . $sid}) &&
|
if (($entry->{allocation_units} == $result->{$oid_hrStorageAllocationUnits . '.' . $_}) &&
|
||||||
($self->{storage}->{$_}->{size} == $result->{$oid_hrStorageSize . "." . $sid}) &&
|
($entry->{size} == $result->{$oid_hrStorageSize . "." . $_}) &&
|
||||||
($self->{storage}->{$_}->{used} == $result->{$oid_hrStorageUsed . "." . $sid})
|
($entry->{used} == $result->{$oid_hrStorageUsed . "." . $_})) {
|
||||||
} keys $self->{storage};
|
$duplicate = 1;
|
||||||
if (scalar(@duplicate)) {
|
last;
|
||||||
next;
|
}
|
||||||
}
|
}
|
||||||
|
next if ($duplicate == 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
$self->{storage}->{$_} = {
|
$self->{storage}->{$_} = {
|
||||||
display => $name_storage,
|
display => $name_storage,
|
||||||
allocation_units => $result->{$oid_hrStorageAllocationUnits . "." . $_},
|
allocation_units => $result->{$oid_hrStorageAllocationUnits . '.' . $_},
|
||||||
size => $result->{$oid_hrStorageSize . "." . $_},
|
size => $result->{$oid_hrStorageSize . '.' . $_},
|
||||||
used => $result->{$oid_hrStorageUsed . "." . $_},
|
used => $result->{$oid_hrStorageUsed . '.' . $_},
|
||||||
access => defined($access_result->{$_}) ? $access_result->{$_} : undef,
|
access => defined($access_result->{$_}) ? $access_result->{$_} : undef,
|
||||||
};
|
};
|
||||||
$self->{global}->{count}++;
|
$self->{global}->{count}++;
|
||||||
|
|
Loading…
Reference in New Issue