Skip to content

Commit

Permalink
properly save the results when exit is non-zero and useSN=1
Browse files Browse the repository at this point in the history
  • Loading branch information
VVelox committed Jul 2, 2023
1 parent fa82f21 commit f0fd4cb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions snmp/smart-v1
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,8 @@ foreach my $line (@disks) {
# only bother to save this if useSN is not being used
if ( !$useSN ) {
$to_return->{data}{disks}{$disk_id} = \%IDs;
} elsif ( $IDs{exit} == 0 ) {
$to_return->{data}{disks}{$disk_id} = \%IDs;
}
} ## end foreach my $line (@disks)

Expand Down

0 comments on commit f0fd4cb

Please sign in to comment.