diff options
author | Lennart Poettering <lennart@poettering.net> | 2008-06-29 21:14:39 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2008-06-29 21:14:39 +0200 |
commit | 60c555bb050ba862f27f8ec36b6ee07c8053ee88 (patch) | |
tree | 4189c3c94f5023a02b5c1bebc1c586a877b7c8dc /smart.h | |
parent | 9479e21980fd72b1b135553f53ee4ba8d2481a32 (diff) |
implement attribute parsing properly
Diffstat (limited to 'smart.h')
-rw-r--r-- | smart.h | 19 |
1 files changed, 14 insertions, 5 deletions
@@ -41,7 +41,9 @@ typedef struct SkSmartParsedData { } SkSmartParsedData; typedef enum SkSmartAttributeUnit { - SK_SMART_ATTRIBUTE_UNIT_SECONDS, + SK_SMART_ATTRIBUTE_UNIT_UNKNOWN, + SK_SMART_ATTRIBUTE_UNIT_NONE, + SK_SMART_ATTRIBUTE_UNIT_MSECONDS, SK_SMART_ATTRIBUTE_UNIT_SECTORS, SK_SMART_ATTRIBUTE_UNIT_KELVIN, _SK_SMART_ATTRIBUTE_UNIT_MAX @@ -51,15 +53,21 @@ typedef struct SkSmartAttribute { /* Static data */ guint8 id; const char *name; + SkSmartAttributeUnit pretty_unit; /* for pretty value */ + guint8 threshold; - SkSmartAttributeUnit unit; /* for pretty_value */ + gboolean threshold_valid:1; + gboolean online:1; gboolean prefailure:1; + guint8 flag; + /* Volatile data */ - gboolean over_threshold:1; - guint8 value; - unsigned pretty_value; + gboolean bad:1; + guint8 current_value, worst_value; + guint64 pretty_value; + guint8 raw[6]; /* This structure may be extended at any time without being * considered an ABI change. So take care when you copy it. */ @@ -86,5 +94,6 @@ int sk_disk_dump(SkDevice *d); void sk_disk_free(SkDevice *d); const char* sk_offline_data_collection_status_to_string(SkOfflineDataCollectionStatus status); +const char* sk_smart_attribute_unit_to_string(SkSmartAttributeUnit unit); #endif |