]> git.proxmox.com Git - pve-storage.git/commitdiff
Diskmanage: correctly add wearout value of 0
authorDominik Csapak <d.csapak@proxmox.com>
Tue, 4 Jun 2019 11:05:29 +0000 (13:05 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 4 Jun 2019 11:14:45 +0000 (13:14 +0200)
if wearout is 0 we showed 'N/A' instead of 100%
(wearout is really the 'life left' value)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
PVE/Diskmanage.pm

index 10b5737aaba2fceb4735c081c1ad94124e0a1463..41158f4843df2e7be5e3a967feabd0ac0179e643 100644 (file)
@@ -512,7 +512,7 @@ sub get_disks {
                if ($type eq 'ssd') {
                    # if we have an ssd we try to get the wearout indicator
                    my $wearval = get_wear_leveling_info($smartdata, $data->{model} || $sysdata->{model});
-                   $wearout = $wearval if $wearval;
+                   $wearout = $wearval if defined($wearval);
                }
            };
        }