summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley2006-04-17 22:29:13 +0000
committerRob Landley2006-04-17 22:29:13 +0000
commit026147a48f7adeb81a65c0367f282f6b65897c38 (patch)
tree5cec0edde3f3fefba738813873653562d8846c1e
parent8b1f11da52319fafd43b27545a78c4b683cb7d1a (diff)
downloadbusybox-026147a48f7adeb81a65c0367f282f6b65897c38.zip
busybox-026147a48f7adeb81a65c0367f282f6b65897c38.tar.gz
Patch from Tito to fix printing null and make output look like hdparm 6.3.
-rw-r--r--miscutils/hdparm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c
index 7c80cf6..c948d14 100644
--- a/miscutils/hdparm.c
+++ b/miscutils/hdparm.c
@@ -291,8 +291,8 @@ static const char * const minor_str[] = { /* word 81 value: */
"Reserved", /* 0x001a */
"ATA/ATAPI-6 T13 1410D revision 2", /* 0x001b */
"ATA/ATAPI-6 T13 1410D revision 1", /* 0x001c */
- "reserved" /* 0x001d */
- "reserved" /* 0x001e */
+ "reserved", /* 0x001d */
+ "reserved", /* 0x001e */
"reserved" /* 0x001f-0xfffe*/
};
#endif
@@ -1427,10 +1427,10 @@ static void dump_identity (const struct hd_driveid *id)
{
printf("\n Drive conforms to: ");
if_else_printf((id->minor_rev_num <= 31),"%s: ","unknown: ", minor_str[id->minor_rev_num]);
- if (id->major_rev_num < 31)
- {
+ if (id->major_rev_num != 0x0000 && /* NOVAL_0 */
+ id->major_rev_num != 0xFFFF) { /* NOVAL_1 */
for (i=0; i <= 15; i++)
- if_printf((id->major_rev_num & (1<<i))," %u", i);
+ if_printf((id->major_rev_num & (1<<i))," ATA/ATAPI-%u", i);
}
}
#endif /* __NEW_HD_DRIVE_ID */