Skip to contentSkip to conversation

Properly calculate ATA_SECTORWORDS, using a fixed-size integer, so it works for both 32-bit and 64-bit targets

PATCH New Stanislav Galabov 1 participant 1 message Feb 17, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 Properly calculate ATA_SECTORWORDS, using a fixed-size integer, so it works for both 32-bit and 64-bit targets

---
 include/ata.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/ata.h +1 -1
index 9d6f59c..dde377c 100644
@@ -126,7 +126,7 @@
 
 #define ATA_BLOCKSIZE	512	/* bytes */
 #define ATA_BLOCKSHIFT	9	/* 2 ^ ATA_BLOCKSIZESHIFT = 512 */
-#define ATA_SECTORWORDS	(512 / sizeof(unsigned long))
+#define ATA_SECTORWORDS	(512 / sizeof(uint32_t))
 
 #ifndef ATA_RESET_TIME
 #define ATA_RESET_TIME	60	/* spec allows up to 31 seconds */
Signature · 1 line
1.9.1