hdparm: Fix error in sector offset reporting
PATCH 1/1 hdparm: Fix error in sector offset reporting
The sector offset reporting is off by a factor of two...
Signed-off-by Martin K. Petersen <[email protected]>
identify.c +1 -1
@@ -938,7 +938,7 @@printf ("\t%-31s %11u bytes\n" ,"Physical Sector size:" , sector_bytes * pfactor);if ((val[209 ] &0xc000 ) ==0x4000 ) {unsigned int offset = val[209 ] &0x1fff ; -printf ("\t%-31s %11u bytes\n" ,"Logical Sector-0 offset:" , offset * lsize); +printf ("\t%-31s %11u bytes\n" ,"Logical Sector-0 offset:" , offset * sector_bytes); } }if (!bbbig) bbbig = (__u64)(ll>mm ? ll : mm);/* # 512 byte blocks */
Mark Lord
Appliedidentify.c line 941
Quoted 13 lines · Martin K. Petersen
The sector offset reporting is off by a factor of two...
Signed-off-by Martin K. Petersen <[email protected]>diff -urN -X
/home/mkp/bin/dontdiffhdparm-9.27.orig/identify.chdparm-9.27/identify.cidentify.c +1
-1@@ -938,7 +938,7 @@printf ("\t%-31s %11u bytes\n" ,"Physical Sector size:" , sector_bytes * pfactor);if ((val[209 ] &0xc000 ) ==0x4000 ) {unsigned int offset = val[209 ] &0x1fff ; -printf ("\t%-31s %11u bytes\n" ,"Logical Sector-0 offset:" , offset * lsize); +printf ("\t%-31s %11u bytes\n" ,"Logical Sector-0 offset:" , offset * sector_bytes);
..
Thanks, applied. I *like* easy fixes like that!
-ml