summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2009-04-14 12:01:07 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2009-04-14 12:01:07 -0700
commit62ffbac86c660e537af0be0fb1c7457ee25bf53e (patch)
treedabc313a92d0e31dbd9778ab3199600dca1f8897
parentd05f79f204be71f7e60137b0cdc7bd69d30b7109 (diff)
downloadsyslinux-62ffbac86c660e537af0be0fb1c7457ee25bf53e.tar.gz
MEMDISK: fix MBR geometry extraction
Fix the MBR geometry extraction; there was an off-by-2 error in the MBR signature offset. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
-rw-r--r--memdisk/setup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/memdisk/setup.c b/memdisk/setup.c
index 0fee9820..6507e563 100644
--- a/memdisk/setup.c
+++ b/memdisk/setup.c
@@ -565,7 +565,7 @@ const struct geometry *get_disk_image_geometry(uint32_t where, uint32_t size)
hd_geometry.driveno = 0x80; /* Assume hard disk */
- if (*(uint16_t *)((char *)where+512) == 0xaa55)
+ if (*(uint16_t *)((char *)where+512-2) == 0xaa55)
for ( i = 0 ; i < 4 ; i++ ) {
if ( ptab[i].type && !(ptab[i].active & 0x7f) ) {
s = (ptab[i].start_s & 0x3f);