]> 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>
Fri, 14 Jun 2019 08:07:46 +0000 (10:07 +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>
(cherry picked from commit 9250ddfe3ac3b85bec54b321d1f4a5b641a64ed3)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/Diskmanage.pm

index 3d2e6a9c1e89c9e791a4284f175839b53ea64a28..2c330d11a322eea137729df83d8d96017df56965 100644 (file)
@@ -472,7 +472,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);
                }
            };
        }