diff --git a/PVE/API2/Disks.pm b/PVE/API2/Disks.pm index 366cd62..de8287e 100644 --- a/PVE/API2/Disks.pm +++ b/PVE/API2/Disks.pm @@ -138,8 +138,6 @@ __PACKAGE__->register_method ({ my $disk = PVE::Diskmanage::verify_blockdev_path($param->{disk}); - my $result = {}; - my $result = PVE::Diskmanage::get_smart_data($disk, $param->{healthonly}); $result->{health} = 'UNKNOWN' if !defined $result->{health}; diff --git a/PVE/Diskmanage.pm b/PVE/Diskmanage.pm index 97c6f7b..6cc5e1c 100644 --- a/PVE/Diskmanage.pm +++ b/PVE/Diskmanage.pm @@ -301,7 +301,7 @@ sub get_wear_leveling_info { my $attrid; - foreach my $vendor (keys $vendormap) { + foreach my $vendor (keys %$vendormap) { if ($model =~ m/$vendor/i) { $attrid = $vendormap->{$vendor}; # found the attribute