diff options
Diffstat (limited to 'miscutils/hdparm.c')
-rw-r--r-- | miscutils/hdparm.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c index 98cc04fd3..484c97061 100644 --- a/miscutils/hdparm.c +++ b/miscutils/hdparm.c | |||
@@ -128,7 +128,7 @@ | |||
128 | #define CDROM 0x0005 | 128 | #define CDROM 0x0005 |
129 | 129 | ||
130 | #if ENABLE_FEATURE_HDPARM_GET_IDENTITY | 130 | #if ENABLE_FEATURE_HDPARM_GET_IDENTITY |
131 | static const char * const pkt_str[] = { | 131 | static const char *const pkt_str[] = { |
132 | "Direct-access device", /* word 0, bits 12-8 = 00 */ | 132 | "Direct-access device", /* word 0, bits 12-8 = 00 */ |
133 | "Sequential-access device", /* word 0, bits 12-8 = 01 */ | 133 | "Sequential-access device", /* word 0, bits 12-8 = 01 */ |
134 | "Printer", /* word 0, bits 12-8 = 02 */ | 134 | "Printer", /* word 0, bits 12-8 = 02 */ |
@@ -163,7 +163,7 @@ static const char * const pkt_str[] = { | |||
163 | "Unknown", /* word 0, bits 12-8 = 1f */ | 163 | "Unknown", /* word 0, bits 12-8 = 1f */ |
164 | }; | 164 | }; |
165 | 165 | ||
166 | static const char * const ata1_cfg_str[] = { /* word 0 in ATA-1 mode */ | 166 | static const char *const ata1_cfg_str[] = { /* word 0 in ATA-1 mode */ |
167 | "Reserved", /* bit 0 */ | 167 | "Reserved", /* bit 0 */ |
168 | "hard sectored", /* bit 1 */ | 168 | "hard sectored", /* bit 1 */ |
169 | "soft sectored", /* bit 2 */ | 169 | "soft sectored", /* bit 2 */ |
@@ -326,7 +326,7 @@ static const char actual_ver[MINOR_MAX+2] = { | |||
326 | #define NUM_CMD_FEAT_STR 48 | 326 | #define NUM_CMD_FEAT_STR 48 |
327 | 327 | ||
328 | #if ENABLE_FEATURE_HDPARM_GET_IDENTITY | 328 | #if ENABLE_FEATURE_HDPARM_GET_IDENTITY |
329 | static const char * const cmd_feat_str[] = { | 329 | static const char *const cmd_feat_str[] = { |
330 | "", /* word 82 bit 15: obsolete */ | 330 | "", /* word 82 bit 15: obsolete */ |
331 | "NOP cmd", /* word 82 bit 14 */ | 331 | "NOP cmd", /* word 82 bit 14 */ |
332 | "READ BUFFER cmd", /* word 82 bit 13 */ | 332 | "READ BUFFER cmd", /* word 82 bit 13 */ |
@@ -413,7 +413,7 @@ void identify_from_stdin(void); | |||
413 | #define SECU_LEVEL 0x0010 | 413 | #define SECU_LEVEL 0x0010 |
414 | #define NUM_SECU_STR 6 | 414 | #define NUM_SECU_STR 6 |
415 | #if ENABLE_FEATURE_HDPARM_GET_IDENTITY | 415 | #if ENABLE_FEATURE_HDPARM_GET_IDENTITY |
416 | static const char * const secu_str[] = { | 416 | static const char *const secu_str[] = { |
417 | "supported", /* word 128, bit 0 */ | 417 | "supported", /* word 128, bit 0 */ |
418 | "enabled", /* word 128, bit 1 */ | 418 | "enabled", /* word 128, bit 1 */ |
419 | "locked", /* word 128, bit 2 */ | 419 | "locked", /* word 128, bit 2 */ |
@@ -1096,14 +1096,16 @@ static unsigned long hwif_irq; | |||
1096 | // Too bad, really. | 1096 | // Too bad, really. |
1097 | 1097 | ||
1098 | #if ENABLE_FEATURE_HDPARM_GET_IDENTITY | 1098 | #if ENABLE_FEATURE_HDPARM_GET_IDENTITY |
1099 | static const char * const cfg_str[] = | 1099 | static const char *const cfg_str[] = { |
1100 | { "", "HardSect", "SoftSect", "NotMFM", | 1100 | "", "HardSect", "SoftSect", "NotMFM", |
1101 | "HdSw>15uSec", "SpinMotCtl", "Fixed", "Removeable", | 1101 | "HdSw>15uSec", "SpinMotCtl", "Fixed", "Removeable", |
1102 | "DTR<=5Mbs", "DTR>5Mbs", "DTR>10Mbs", "RotSpdTol>.5%", | 1102 | "DTR<=5Mbs", "DTR>5Mbs", "DTR>10Mbs", "RotSpdTol>.5%", |
1103 | "dStbOff", "TrkOff", "FmtGapReq", "nonMagnetic" | 1103 | "dStbOff", "TrkOff", "FmtGapReq", "nonMagnetic" |
1104 | }; | 1104 | }; |
1105 | 1105 | ||
1106 | static const char * const BuffType[] = {"Unknown", "1Sect", "DualPort", "DualPortCache"}; | 1106 | static const char *const BuffType[] = { |
1107 | "Unknown", "1Sect", "DualPort", "DualPortCache" | ||
1108 | }; | ||
1107 | 1109 | ||
1108 | static void dump_identity(const struct hd_driveid *id) | 1110 | static void dump_identity(const struct hd_driveid *id) |
1109 | { | 1111 | { |
@@ -1930,7 +1932,8 @@ static void parse_xfermode(int flag, smallint *get, smallint *set, int *value) | |||
1930 | } | 1932 | } |
1931 | 1933 | ||
1932 | /*------- getopt short options --------*/ | 1934 | /*------- getopt short options --------*/ |
1933 | static const char hdparm_options[] = "gfu::n::p:r::m::c::k::a::B:tTh" | 1935 | static const char hdparm_options[] ALIGN1 = |
1936 | "gfu::n::p:r::m::c::k::a::B:tTh" | ||
1934 | USE_FEATURE_HDPARM_GET_IDENTITY("iI") | 1937 | USE_FEATURE_HDPARM_GET_IDENTITY("iI") |
1935 | USE_FEATURE_HDPARM_HDIO_GETSET_DMA("d::") | 1938 | USE_FEATURE_HDPARM_HDIO_GETSET_DMA("d::") |
1936 | #ifdef HDIO_DRIVE_CMD | 1939 | #ifdef HDIO_DRIVE_CMD |