diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-10-11 23:53:59 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-10-11 23:58:35 +0200 |
commit | 8f5648e829bbb83d1d4f670c232ff8d738dd0cc7 (patch) | |
tree | b54a0b2b755574bbafcbe72047a9399ae312cee5 | |
parent | 33742d6e2865e46f0675c84884799d6bfe68b49a (diff) |
atasmart: multiply by sector threshold by 1024 to avoid false positives
https://bugs.freedesktop.org/show_bug.cgi?id=25772
-rw-r--r-- | atasmart.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -2285,9 +2285,10 @@ int sk_disk_smart_get_overall(SkDisk *d, SkSmartOverall *overall) { sectors = 0; } else { - /* We use log2(n_sectors) as a threshold here. We had to pick - * something, and this makes a bit of sense, or doesn't it? */ - sector_threshold = u64log2(d->size/512); + /* We use log2(n_sectors)*1024 as a threshold here. We + * had to pick something, and this makes a bit of + * sense, or doesn't it? */ + sector_threshold = u64log2(d->size/512) * 1024; if (sectors >= sector_threshold) { *overall = SK_SMART_OVERALL_BAD_SECTOR_MANY; |