svn commit: trunk/busybox/miscutils

landley at busybox.net landley at busybox.net
Mon Apr 17 22:29:14 UTC 2006


Author: landley
Date: 2006-04-17 15:29:13 -0700 (Mon, 17 Apr 2006)
New Revision: 14902

Log:
Patch from Tito to fix printing null and make output look like hdparm 6.3.


Modified:
   trunk/busybox/miscutils/hdparm.c


Changeset:
Modified: trunk/busybox/miscutils/hdparm.c
===================================================================
--- trunk/busybox/miscutils/hdparm.c	2006-04-17 21:49:34 UTC (rev 14901)
+++ trunk/busybox/miscutils/hdparm.c	2006-04-17 22:29:13 UTC (rev 14902)
@@ -291,8 +291,8 @@
 	"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 @@
 	{
 		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 */




More information about the busybox-cvs mailing list