summaryrefslogtreecommitdiffstats
path: root/atasmart.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-08-20 00:51:13 +0200
committerLennart Poettering <lennart@poettering.net>2009-08-20 00:51:13 +0200
commit7e8f3350aea65ed203305c8e7e4fc1cfd4656393 (patch)
tree5c891bdd163b764ff259f5bd1248ddbeff82e75f /atasmart.c
parent819b6abef79e6bedfc7fff330d12791105d2e6dc (diff)
support some ssd smart attrs
Diffstat (limited to 'atasmart.c')
-rw-r--r--atasmart.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/atasmart.c b/atasmart.c
index bce315b..b6bcb90 100644
--- a/atasmart.c
+++ b/atasmart.c
@@ -1183,7 +1183,8 @@ static void make_pretty(SkSmartAttributeParsedData *a) {
a->pretty_value = (fourtyeight & 0xFFFF)*100 + 273150;
else if (!strcmp(a->name, "power-on-minutes"))
a->pretty_value = fourtyeight * 60 * 1000;
- else if (!strcmp(a->name, "power-on-seconds"))
+ else if (!strcmp(a->name, "power-on-seconds") ||
+ !strcmp(a->name, "power-on-seconds-2"))
a->pretty_value = fourtyeight * 1000;
else if (!strcmp(a->name, "power-on-half-minutes"))
a->pretty_value = fourtyeight * 30 * 1000;
@@ -1309,6 +1310,13 @@ static const SkSmartAttributeInfo const attribute_info[256] = {
[228] = { "power-off-retract-count-2", SK_SMART_ATTRIBUTE_UNIT_NONE, NULL },
[230] = { "head-amplitude", SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
[231] = { "temperature-celsius", SK_SMART_ATTRIBUTE_UNIT_MKELVIN, verify_temperature },
+
+ /* http://www.adtron.com/pdf/SMART_for_XceedLite_SATA_RevA.pdf */
+ [232] = { "endurance-remaining", SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
+ [233] = { "power-on-seconds-2", SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
+ [234] = { "uncorrectable-ecc-count", SK_SMART_ATTRIBUTE_UNIT_SECTORS, NULL },
+ [235] = { "good-block-rate", SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, NULL },
+
[240] = { "head-flying-hours", SK_SMART_ATTRIBUTE_UNIT_MSECONDS, verify_long_time },
[250] = { "read-error-retry-rate", SK_SMART_ATTRIBUTE_UNIT_NONE, NULL }
};
@@ -1911,6 +1919,7 @@ static void power_on_cb(SkDisk *d, const SkSmartAttributeParsedData *a, struct a
if (!strcmp(a->name, "power-on-minutes") ||
!strcmp(a->name, "power-on-seconds") ||
+ !strcmp(a->name, "power-on-seconds-2") ||
!strcmp(a->name, "power-on-half-minutes") ||
!strcmp(a->name, "power-on-hours")) {