From: Matthias Heiserer <m.heiserer@proxmox.com>
To: pve-devel@lists.proxmox.com, pbs-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH proxmox-backup] fix #4165: SMART: add raw field
Date: Thu, 21 Jul 2022 12:45:57 +0200 [thread overview]
Message-ID: <20220721104559.302270-1-m.heiserer@proxmox.com> (raw)
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>
---
src/tools/disks/smart.rs | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/tools/disks/smart.rs b/src/tools/disks/smart.rs
index 3738cdfd..787971e9 100644
--- a/src/tools/disks/smart.rs
+++ b/src/tools/disks/smart.rs
@@ -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,
--
2.30.2
next reply other threads:[~2022-07-21 10:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-21 10:45 Matthias Heiserer [this message]
2022-07-21 10:45 ` [pve-devel] [PATCH pve-storage] fix #4165: disk: SMART: add normalized field Matthias Heiserer
2022-09-23 10:29 ` [pve-devel] applied: [pbs-devel] " Thomas Lamprecht
2022-07-21 10:45 ` [pve-devel] [PATCH widget-toolkit] fix #4165: SMART: use changed columns from the API Matthias Heiserer
2022-09-22 10:35 ` [pve-devel] [PATCH proxmox-backup] fix #4165: SMART: add raw field Dominik Csapak
2022-09-23 10:31 ` [pve-devel] [pbs-devel] " Thomas Lamprecht
2022-09-23 10:28 ` [pve-devel] applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220721104559.302270-1-m.heiserer@proxmox.com \
--to=m.heiserer@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox