gptmbr: offsets into phdr are decimal, not hex
authorH. Peter Anvin <hpa@zytor.com>
Mon, 25 Feb 2008 23:05:02 +0000 (15:05 -0800)
committerH. Peter Anvin <hpa@zytor.com>
Mon, 25 Feb 2008 23:05:02 +0000 (15:05 -0800)
The offsets into phdr, from the EFI spec, are in decimal, not hex.

mbr/gptmbr.S

index b042cbf..fa0ae2c 100644 (file)
@@ -122,8 +122,8 @@ next:
        /* Number of partition sectors */
        /* We assume the partition table is 32K or less, and that
           the sector size is 512. */
-       movw    (phdr+0x80),%cx         /* NumberOfPartitionEntries */
-       movw    (phdr+0x84),%ax         /* SizeOfPartitionEntry */
+       movw    (phdr+80),%cx           /* NumberOfPartitionEntries */
+       movw    (phdr+84),%ax           /* SizeOfPartitionEntry */
        pushw   %ax
        pushw   %cx
        mulw    %cx
@@ -132,8 +132,8 @@ next:
        incw    %cx
 
        /* Starting LBA of partition array */
-       movl    (phdr+0x72),%eax
-       movl    (phdr+0x76),%edx
+       movl    (phdr+72),%eax
+       movl    (phdr+76),%edx
 
        pushw   %bx
 get_ptab: