diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-04-23 00:25:39 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-04-23 00:41:47 +0200 |
commit | aa1f82fd2ba0cd0345cb5a36a66de64a0b70d321 (patch) | |
tree | 559336ed66e088bd313bf75da5a3e78886c982c9 | |
parent | 24d80863a2a27e88815ce5f662c7e71b899848db (diff) |
use only uppermost 32 bits for reallocated-sectors-count attribute pretty value
This seems to fix the attribute for Fujitsu drives. And those 32 bit
should be enough to still encode bad sectors up to 2TB which should be
more than enough. Hence it is probably safe to ignore the remaing 16 bit
even on non-Fujitsu drives.
See rhbz #496087.
-rw-r--r-- | atasmart.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1129,6 +1129,8 @@ static void make_pretty(SkSmartAttributeParsedData *a) { !strcmp(a->name, "loaded-hours") || !strcmp(a->name, "head-flying-hours")) a->pretty_value = fourtyeight * 60 * 60 * 1000; + else if (!strcmp(a->name, "reallocated-sector-count")) + a->pretty_value = fourtyeight & 0xFFFFFFFFU; else a->pretty_value = fourtyeight; } |