projects
/
platform
/
upstream
/
libatasmart.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ecf3606
)
atasmart: ignore sector count if it is -1
author
Lennart Poettering
<lennart@poettering.net>
Tue, 11 Oct 2011 21:25:58 +0000
(23:25 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 11 Oct 2011 21:26:01 +0000
(23:26 +0200)
https://bugs.freedesktop.org/show_bug.cgi?id=25021
atasmart.c
patch
|
blob
|
history
diff --git
a/atasmart.c
b/atasmart.c
index
a30efe8
..
f3c8e32
100644
(file)
--- a/
atasmart.c
+++ b/
atasmart.c
@@
-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 {