diff options
Diffstat (limited to '')
-rw-r--r-- | debian/patches/52_remove-pragma.diff | 265 |
1 files changed, 265 insertions, 0 deletions
diff --git a/debian/patches/52_remove-pragma.diff b/debian/patches/52_remove-pragma.diff new file mode 100644 index 0000000..5a92422 --- /dev/null +++ b/debian/patches/52_remove-pragma.diff @@ -0,0 +1,265 @@ +From: Giuseppe Iuculano <iuculano@debian.org> +Date: Thu, 27 Sep 2018 19:03:07 +0800 +Subject: _remove-pragma + +--- + atacmds.h | 15 --------------- + 1 file changed, 15 deletions(-) + +--- a/atacmds.h ++++ b/atacmds.h +@@ -110,9 +110,8 @@ + #define NUMBER_ATA_SMART_ATTRIBUTES 30 + + // Needed parts of the ATA DRIVE IDENTIFY Structure. Those labeled + // word* are NOT used. +-#pragma pack(1) + struct ata_identify_device { + unsigned short words000_009[10]; + unsigned char serial_no[20]; + unsigned short words020_022[3]; +@@ -132,9 +131,8 @@ + #pragma pack() + STATIC_ASSERT(sizeof(ata_identify_device) == 512); + + /* ata_smart_attribute is the vendor specific in SFF-8035 spec */ +-#pragma pack(1) + struct ata_smart_attribute { + unsigned char id; + // meaning of flag bits: see MACROS just below + // WARNING: MISALIGNED! +@@ -193,9 +191,8 @@ + + + // Format of data returned by SMART READ DATA + // Table 62 of T13/1699-D (ATA8-ACS) Revision 6a, September 2008 +-#pragma pack(1) + struct ata_smart_values { + unsigned short int revnumber; + struct ata_smart_attribute vendor_attributes [NUMBER_ATA_SMART_ATTRIBUTES]; + unsigned char offline_data_collection_status; +@@ -226,9 +223,8 @@ + 05 - Read scan + */ + + /* Vendor attribute of SMART Threshold (compare to ata_smart_attribute above) */ +-#pragma pack(1) + struct ata_smart_threshold_entry { + unsigned char id; + unsigned char threshold; + unsigned char reserved[10]; +@@ -237,9 +233,8 @@ + STATIC_ASSERT(sizeof(ata_smart_threshold_entry) == 12); + + /* Format of Read SMART THreshold Command */ + /* Compare to ata_smart_values above */ +-#pragma pack(1) + struct ata_smart_thresholds_pvt { + unsigned short int revnumber; + struct ata_smart_threshold_entry thres_entries[NUMBER_ATA_SMART_ATTRIBUTES]; + unsigned char reserved[149]; +@@ -249,9 +244,8 @@ + STATIC_ASSERT(sizeof(ata_smart_thresholds_pvt) == 512); + + + // Table 42 of T13/1321D Rev 1 spec (Error Data Structure) +-#pragma pack(1) + struct ata_smart_errorlog_error_struct { + unsigned char reserved; + unsigned char error_register; + unsigned char sector_count; +@@ -268,9 +262,8 @@ + STATIC_ASSERT(sizeof(ata_smart_errorlog_error_struct) == 30); + + + // Table 41 of T13/1321D Rev 1 spec (Command Data Structure) +-#pragma pack(1) + struct ata_smart_errorlog_command_struct { + unsigned char devicecontrolreg; + unsigned char featuresreg; + unsigned char sector_count; +@@ -284,18 +277,16 @@ + #pragma pack() + STATIC_ASSERT(sizeof(ata_smart_errorlog_command_struct) == 12); + + // Table 40 of T13/1321D Rev 1 spec (Error log data structure) +-#pragma pack(1) + struct ata_smart_errorlog_struct { + struct ata_smart_errorlog_command_struct commands[5]; + struct ata_smart_errorlog_error_struct error_struct; + } ATTR_PACKED; + #pragma pack() + STATIC_ASSERT(sizeof(ata_smart_errorlog_struct) == 90); + + // Table 39 of T13/1321D Rev 1 spec (SMART error log sector) +-#pragma pack(1) + struct ata_smart_errorlog { + unsigned char revnumber; + unsigned char error_log_pointer; + struct ata_smart_errorlog_struct errorlog_struct[5]; +@@ -313,9 +304,8 @@ + // T13/1699-D Revision 6a (Working Draft), September 6, 2008. + + // Command data structure + // Table A.9 of T13/1699-D Revision 6a +-#pragma pack(1) + struct ata_smart_exterrlog_command + { + unsigned char device_control_register; + unsigned char features_register; +@@ -338,9 +328,8 @@ + STATIC_ASSERT(sizeof(ata_smart_exterrlog_command) == 18); + + // Error data structure + // Table A.10 T13/1699-D Revision 6a +-#pragma pack(1) + struct ata_smart_exterrlog_error + { + unsigned char device_control_register; + unsigned char error_register; +@@ -363,9 +352,8 @@ + STATIC_ASSERT(sizeof(ata_smart_exterrlog_error) == 34); + + // Error log data structure + // Table A.8 of T13/1699-D Revision 6a +-#pragma pack(1) + struct ata_smart_exterrlog_error_log + { + ata_smart_exterrlog_command commands[5]; + ata_smart_exterrlog_error error; +@@ -374,9 +362,8 @@ + STATIC_ASSERT(sizeof(ata_smart_exterrlog_error_log) == 124); + + // Ext. Comprehensive SMART error log + // Table A.7 of T13/1699-D Revision 6a +-#pragma pack(1) + struct ata_smart_exterrlog + { + unsigned char version; + unsigned char reserved1; +@@ -390,9 +377,8 @@ + STATIC_ASSERT(sizeof(ata_smart_exterrlog) == 512); + + + // Table 45 of T13/1321D Rev 1 spec (Self-test log descriptor entry) +-#pragma pack(1) + struct ata_smart_selftestlog_struct { + unsigned char selftestnumber; // Sector number register + unsigned char selfteststatus; + unsigned short int timestamp; +@@ -403,9 +389,8 @@ + #pragma pack() + STATIC_ASSERT(sizeof(ata_smart_selftestlog_struct) == 24); + + // Table 44 of T13/1321D Rev 1 spec (Self-test log data structure) +-#pragma pack(1) + struct ata_smart_selftestlog { + unsigned short int revnumber; + struct ata_smart_selftestlog_struct selftest_struct[21]; + unsigned char vendorspecific[2]; +@@ -422,9 +407,8 @@ + // T13/1699-D Revision 6a (Working Draft), September 6, 2008. + + // Extended Self-test log descriptor entry + // Table A.13 of T13/1699-D Revision 6a +-#pragma pack(1) + struct ata_smart_extselftestlog_desc + { + unsigned char self_test_type; + unsigned char self_test_status; +@@ -437,9 +421,8 @@ + STATIC_ASSERT(sizeof(ata_smart_extselftestlog_desc) == 26); + + // Extended Self-test log data structure + // Table A.12 of T13/1699-D Revision 6a +-#pragma pack(1) + struct ata_smart_extselftestlog + { + unsigned char version; + unsigned char reserved1; +@@ -452,17 +435,15 @@ + #pragma pack() + STATIC_ASSERT(sizeof(ata_smart_extselftestlog) == 512); + + // SMART LOG DIRECTORY Table 52 of T13/1532D Vol 1 Rev 1a +-#pragma pack(1) + struct ata_smart_log_entry { + unsigned char numsectors; + unsigned char reserved; + } ATTR_PACKED; + #pragma pack() + STATIC_ASSERT(sizeof(ata_smart_log_entry) == 2); + +-#pragma pack(1) + struct ata_smart_log_directory { + unsigned short int logversion; + struct ata_smart_log_entry entry[255]; + } ATTR_PACKED; +@@ -470,17 +451,15 @@ + STATIC_ASSERT(sizeof(ata_smart_log_directory) == 512); + + // SMART SELECTIVE SELF-TEST LOG Table 61 of T13/1532D Volume 1 + // Revision 3 +-#pragma pack(1) + struct test_span { + uint64_t start; + uint64_t end; + } ATTR_PACKED; + #pragma pack() + STATIC_ASSERT(sizeof(test_span) == 16); + +-#pragma pack(1) + struct ata_selective_self_test_log { + unsigned short logversion; + struct test_span span[5]; + unsigned char reserved1[337-82+1]; +@@ -507,9 +486,8 @@ + // T13/1699-D Revision 3f (Working Draft), December 11, 2006. + + // SCT Status response (read with SMART_READ_LOG page 0xe0) + // Table 194 of T13/BSR INCITS 529 (ACS-4) Revision 20, October 26, 2017 +-#pragma pack(1) + struct ata_sct_status_response + { + unsigned short format_version; // 0-1: Status response format version number (2, 3) + unsigned short sct_version; // 2-3: Vendor specific version number +@@ -540,9 +518,8 @@ + STATIC_ASSERT(sizeof(ata_sct_status_response) == 512); + + // SCT Error Recovery Control command (send with SMART_WRITE_LOG page 0xe0) + // Table 88 of T13/1699-D Revision 6a +-#pragma pack(1) + struct ata_sct_error_recovery_control_command + { + unsigned short action_code; // 3 = Error Recovery Control + unsigned short function_code; // 1 = Set Current, 2 = Return Current, 3 = Set Power-on, 4 = Return Power-on, 5 = Restore Default +@@ -554,9 +531,8 @@ + STATIC_ASSERT(sizeof(ata_sct_error_recovery_control_command) == 512); + + // SCT Feature Control command (send with SMART_WRITE_LOG page 0xe0) + // Table 72 of T13/1699-D Revision 3f +-#pragma pack(1) + struct ata_sct_feature_control_command + { + unsigned short action_code; // 4 = Feature Control + unsigned short function_code; // 1 = Set, 2 = Return, 3 = Return options +@@ -569,9 +545,8 @@ + STATIC_ASSERT(sizeof(ata_sct_feature_control_command) == 512); + + // SCT Data Table command (send with SMART_WRITE_LOG page 0xe0) + // Table 73 of T13/1699-D Revision 3f +-#pragma pack(1) + struct ata_sct_data_table_command + { + unsigned short action_code; // 5 = Data Table + unsigned short function_code; // 1 = Read Table +@@ -582,9 +557,8 @@ + STATIC_ASSERT(sizeof(ata_sct_data_table_command) == 512); + + // SCT Temperature History Table (read with SMART_READ_LOG page 0xe1) + // Table 75 of T13/1699-D Revision 3f +-#pragma pack(1) + struct ata_sct_temperature_history_table + { + unsigned short format_version; // 0-1: Data table format version number (2) + unsigned short sampling_period; // 2-3: Temperature sampling period in minutes |