Change ' to " in configure call to fix build
[platform/upstream/libatasmart.git] / atasmart.h
index 38590ff..0808b25 100644 (file)
@@ -130,9 +130,12 @@ unsigned sk_smart_self_test_polling_minutes(const SkSmartParsedData *d, SkSmartS
 typedef enum SkSmartAttributeUnit {
         SK_SMART_ATTRIBUTE_UNIT_UNKNOWN,
         SK_SMART_ATTRIBUTE_UNIT_NONE,
-        SK_SMART_ATTRIBUTE_UNIT_MSECONDS,    /* milliseconds */
+        SK_SMART_ATTRIBUTE_UNIT_MSECONDS,      /* milliseconds */
         SK_SMART_ATTRIBUTE_UNIT_SECTORS,
-        SK_SMART_ATTRIBUTE_UNIT_MKELVIN,     /* millikelvin */
+        SK_SMART_ATTRIBUTE_UNIT_MKELVIN,       /* millikelvin */
+        SK_SMART_ATTRIBUTE_UNIT_SMALL_PERCENT, /* percentage with 3 decimal points */
+        SK_SMART_ATTRIBUTE_UNIT_PERCENT,       /* integer percentage */
+        SK_SMART_ATTRIBUTE_UNIT_MB,
         _SK_SMART_ATTRIBUTE_UNIT_MAX
 
         /* This enum may be extended at any time without this being
@@ -157,8 +160,10 @@ typedef struct SkSmartAttributeParsedData {
         SkBool prefailure:1;
 
         /* Volatile data */
-        SkBool good:1, good_valid:1;
+        SkBool good_now:1, good_now_valid:1;
+        SkBool good_in_the_past:1, good_in_the_past_valid:1;
         SkBool current_value_valid:1, worst_value_valid:1;
+        SkBool warn:1;
         uint8_t current_value, worst_value;
         uint64_t pretty_value;
         uint8_t raw[6];
@@ -171,9 +176,11 @@ typedef struct SkDisk SkDisk;
 
 typedef enum SkSmartOverall  {
         SK_SMART_OVERALL_GOOD,
-        SK_SMART_OVERALL_BAD_STATUS,     /* Smart Self Assessment negative */
-        SK_SMART_OVERALL_BAD_SECTOR,     /* At least one bad sector */
-        SK_SMART_OVERALL_BAD_ATTRIBUTE,  /* At least one attribute exceeded its threshold */
+        SK_SMART_OVERALL_BAD_ATTRIBUTE_IN_THE_PAST,  /* At least one pre-fail attribute exceeded its threshold in the past */
+        SK_SMART_OVERALL_BAD_SECTOR,                 /* At least one bad sector */
+        SK_SMART_OVERALL_BAD_ATTRIBUTE_NOW,          /* At least one pre-fail attribute is exceeding its threshold now */
+        SK_SMART_OVERALL_BAD_SECTOR_MANY,            /* Many bad sectors */
+        SK_SMART_OVERALL_BAD_STATUS,                 /* Smart Self Assessment negative */
         _SK_SMART_OVERALL_MAX
 
         /* This enum may be extended at any time without this being
@@ -213,6 +220,9 @@ int sk_disk_smart_self_test(SkDisk *d, SkSmartSelfTest test);
 /* High level API to get the power on time */
 int sk_disk_smart_get_power_on(SkDisk *d, uint64_t *mseconds);
 
+/* High level API to get the power cycle count */
+int sk_disk_smart_get_power_cycle(SkDisk *d, uint64_t *count);
+
 /* High level API to get the number of bad sectors (i.e. pending and reallocated) */
 int sk_disk_smart_get_bad(SkDisk *d, uint64_t *sectors);