From aa1f82fd2ba0cd0345cb5a36a66de64a0b70d321 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 23 Apr 2009 00:25:39 +0200 Subject: 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. --- atasmart.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'atasmart.c') diff --git a/atasmart.c b/atasmart.c index 20c3931..053cb88 100644 --- a/atasmart.c +++ b/atasmart.c @@ -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; } -- cgit