mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-05-29 16:26:38 +00:00
fix #4165: SMART: add raw field
This makes it consistent with the naming scheme in PVE/GUI. Keep value for API stability reasons, and remove it in 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:
parent
37cfd7b336
commit
500014e83b
@ -25,8 +25,11 @@ pub enum SmartStatus {
|
||||
pub struct SmartAttribute {
|
||||
/// Attribute name
|
||||
name: String,
|
||||
/// Attribute raw value
|
||||
// fixme remove value in major release
|
||||
/// duplicate of raw - kept for API stability
|
||||
value: String,
|
||||
/// Attribute raw value
|
||||
raw: String,
|
||||
// the rest of the values is available for ATA type
|
||||
/// ATA Attribute ID
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
@ -146,7 +149,8 @@ pub fn get_smart_data(disk: &super::Disk, health_only: bool) -> Result<SmartData
|
||||
|
||||
attributes.push(SmartAttribute {
|
||||
name,
|
||||
value: raw_value,
|
||||
value: raw_value.clone(),
|
||||
raw: raw_value,
|
||||
id: Some(id),
|
||||
flags: Some(flags),
|
||||
normalized: Some(normalized),
|
||||
@ -180,6 +184,7 @@ pub fn get_smart_data(disk: &super::Disk, health_only: bool) -> Result<SmartData
|
||||
attributes.push(SmartAttribute {
|
||||
name: name.to_string(),
|
||||
value: value.to_string(),
|
||||
raw: value.to_string(),
|
||||
id: None,
|
||||
flags: None,
|
||||
normalized: None,
|
||||
|
Loading…
Reference in New Issue
Block a user