diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-03-19 01:19:21 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-03-19 01:19:21 +0100 |
commit | 3aa14f7fdea35e55be01217af666e6d42f3ebb48 (patch) | |
tree | eb9788ed7b60d311c5b0e16377c66fcbc76e0298 /atasmart.c | |
parent | b4b54d3b0b700da72c3ff927d0418418e58c346e (diff) |
handle the good status of bad sector attributes especially
Diffstat (limited to 'atasmart.c')
-rw-r--r-- | atasmart.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -1331,6 +1331,16 @@ int sk_disk_smart_parse_attributes(SkDisk *d, SkSmartAttributeParseCallback cb, find_threshold(d, &a); + /* Handle a few fields specially */ + if ((!strcmp(a.name, "reallocated-sector-count") || + !strcmp(a.name, "reallocated-event-count") || + !strcmp(a.name, "current-pending-sector")) && + a.pretty_unit == SK_SMART_ATTRIBUTE_UNIT_SECTORS && + a.pretty_value > 0) { + a.good = FALSE; + a.good_valid = TRUE; + } + cb(d, &a, userdata); free(an); |