diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-10-11 23:25:58 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-10-11 23:26:01 +0200 |
commit | 1dad47cdbc538e7347d953ed157073a64503256c (patch) | |
tree | 88776ae0289e64e7bad40c2788eef5ea5b018fa8 | |
parent | ecf3606ae747ac408dc56de353cd775662fdd358 (diff) | |
download | libatasmart-1dad47cdbc538e7347d953ed157073a64503256c.tar.gz |
atasmart: ignore sector count if it is -1
https://bugs.freedesktop.org/show_bug.cgi?id=25021
-rw-r--r-- | atasmart.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1273,7 +1273,9 @@ static void verify_sectors(SkDisk *d, SkSmartAttributeParsedData *a) { max_sectors = d->size / 512ULL; - if (max_sectors > 0 && a->pretty_value > max_sectors) { + if (a->pretty_value == 0xffffffffULL || + a->pretty_value == 0xffffffffffffffffULL || + (max_sectors > 0 && a->pretty_value > max_sectors)) { a->pretty_value = SK_SMART_ATTRIBUTE_UNIT_UNKNOWN; d->attribute_verification_bad = TRUE; } else { |