1 Index: smartmontools/atacmds.h
2 ===================================================================
3 --- smartmontools.orig/atacmds.h 2007-03-31 15:56:12.000000000 +0200
4 +++ smartmontools/atacmds.h 2007-11-01 13:16:28.000000000 +0100
7 // Needed parts of the ATA DRIVE IDENTIFY Structure. Those labeled
10 struct ata_identify_device {
11 unsigned short words000_009[10];
12 unsigned char serial_no[20];
14 ASSERT_SIZEOF_STRUCT(ata_identify_device, 512);
16 /* ata_smart_attribute is the vendor specific in SFF-8035 spec */
18 struct ata_smart_attribute {
20 // meaning of flag bits: see MACROS just below
23 /* ata_smart_values is format of the read drive Attribute command */
24 /* see Table 34 of T13/1321D Rev 1 spec (Device SMART data structure) for *some* info */
26 struct ata_smart_values {
27 unsigned short int revnumber;
28 struct ata_smart_attribute vendor_attributes [NUMBER_ATA_SMART_ATTRIBUTES];
32 /* Vendor attribute of SMART Threshold (compare to ata_smart_attribute above) */
34 struct ata_smart_threshold_entry {
36 unsigned char threshold;
39 /* Format of Read SMART THreshold Command */
40 /* Compare to ata_smart_values above */
42 struct ata_smart_thresholds_pvt {
43 unsigned short int revnumber;
44 struct ata_smart_threshold_entry thres_entries[NUMBER_ATA_SMART_ATTRIBUTES];
48 // Table 42 of T13/1321D Rev 1 spec (Error Data Structure)
50 struct ata_smart_errorlog_error_struct {
51 unsigned char reserved;
52 unsigned char error_register;
56 // Table 41 of T13/1321D Rev 1 spec (Command Data Structure)
58 struct ata_smart_errorlog_command_struct {
59 unsigned char devicecontrolreg;
60 unsigned char featuresreg;
62 ASSERT_SIZEOF_STRUCT(ata_smart_errorlog_command_struct, 12);
64 // Table 40 of T13/1321D Rev 1 spec (Error log data structure)
66 struct ata_smart_errorlog_struct {
67 struct ata_smart_errorlog_command_struct commands[5];
68 struct ata_smart_errorlog_error_struct error_struct;
70 ASSERT_SIZEOF_STRUCT(ata_smart_errorlog_struct, 90);
72 // Table 39 of T13/1321D Rev 1 spec (SMART error log sector)
74 struct ata_smart_errorlog {
75 unsigned char revnumber;
76 unsigned char error_log_pointer;
78 ASSERT_SIZEOF_STRUCT(ata_smart_errorlog, 512);
80 // Table 45 of T13/1321D Rev 1 spec (Self-test log descriptor entry)
82 struct ata_smart_selftestlog_struct {
83 unsigned char selftestnumber; // Sector number register
84 unsigned char selfteststatus;
86 ASSERT_SIZEOF_STRUCT(ata_smart_selftestlog_struct, 24);
88 // Table 44 of T13/1321D Rev 1 spec (Self-test log data structure)
90 struct ata_smart_selftestlog {
91 unsigned short int revnumber;
92 struct ata_smart_selftestlog_struct selftest_struct[21];
94 ASSERT_SIZEOF_STRUCT(ata_smart_selftestlog, 512);
96 // SMART LOG DIRECTORY Table 52 of T13/1532D Vol 1 Rev 1a
98 struct ata_smart_log_entry {
99 unsigned char numsectors;
100 unsigned char reserved;
103 ASSERT_SIZEOF_STRUCT(ata_smart_log_entry, 2);
106 struct ata_smart_log_directory {
107 unsigned short int logversion;
108 struct ata_smart_log_entry entry[255];
111 // SMART SELECTIVE SELF-TEST LOG Table 61 of T13/1532D Volume 1
119 ASSERT_SIZEOF_STRUCT(test_span, 16);
122 struct ata_selective_self_test_log {
123 unsigned short logversion;
124 struct test_span span[5];