fix #4165: disk: SMART: add normalized field

This makes it consistent with the naming scheme in PBS/GUI.
Keep value for API stability reasons and remove it in the next major version.

Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.cspak@proxmox.com>
This commit is contained in:
Matthias Heiserer
2022-07-21 12:45:58 +02:00
committed by Thomas Lamprecht
parent 88f272b204
commit 4c86c7111c
8 changed files with 145 additions and 0 deletions

View File

@ -123,7 +123,9 @@ sub get_smart_data {
$entry->{name} = $2 if defined $2;
$entry->{flags} = $3 if defined $3;
# the +0 makes a number out of the strings
# fixme remove next line in major release, use normalized instead
$entry->{value} = $4+0 if defined $4;
$entry->{normalized} = $4+0 if defined $4;
$entry->{worst} = $5+0 if defined $5;
# some disks report the default threshold as --- instead of 000
if (defined($6) && $6 eq '---') {