check the right boolean when calculating blob size
authorLennart Poettering <lennart@poettering.net>
Fri, 23 Oct 2009 21:40:53 +0000 (23:40 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 23 Oct 2009 21:40:53 +0000 (23:40 +0200)
atasmart.c

index bfb38c7..3ec6c19 100644 (file)
@@ -2679,7 +2679,7 @@ int sk_disk_get_blob(SkDisk *d, const void **blob, size_t *rsize) {
         size =
                 (d->identify_valid ? 8 + sizeof(d->identify) : 0) +
                 (d->smart_data_valid ? 8 + sizeof(d->smart_data) : 0) +
-                (d->smart_thresholds ? 8 + sizeof(d->smart_thresholds) : 0);
+                (d->smart_thresholds_valid ? 8 + sizeof(d->smart_thresholds) : 0);
 
         if (sk_disk_smart_status(d, &good) >= 0) {
                 size += 12;