diff options
author | Bodo Stroesser <bstroesser at ts.fujitsu.com> | 2010-03-23 17:56:29 +0100 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2010-03-30 15:19:41 -0700 |
commit | 7be3ff1150edfbfe62e1aab9ad3f9824082019d5 (patch) | |
tree | a9e03ec95592ec5e8fa5febb0c53b06f202db6df /memdisk/setup.c | |
parent | 5b872da4196044f92137f5709caf7f2d31999180 (diff) | |
download | syslinux-7be3ff1150edfbfe62e1aab9ad3f9824082019d5.tar.gz |
memdisk: MBR not recognized correctly
This fixes a small inaccuracy in memdisk:
get_disk_image_geometry() does not use MBR data to detect disk
geometry, since it checks MBR signature at wrong offset.
This normally does not cause problems, because memdisk guesses a
reasonable value, if no MBR is found.
Signed-off-by: Bodo Stroesser <bstroesser at ts.fujitsu.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'memdisk/setup.c')
-rw-r--r-- | memdisk/setup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/memdisk/setup.c b/memdisk/setup.c index bcb5d040..cec25ad3 100644 --- a/memdisk/setup.c +++ b/memdisk/setup.c @@ -648,7 +648,7 @@ static const struct geometry *get_disk_image_geometry(uint32_t where, if (!hd_geometry.driveno) hd_geometry.driveno = 0x80; - if (*(uint16_t *) ((char *)where + 512 - 2) == 0xaa55) { + if (*(uint16_t *) ((char *)where + hd_geometry.offset + 512 - 2) == 0xaa55) { for (i = 0; i < 4; i++) { if (ptab[i].type && !(ptab[i].active & 0x7f)) { s = (ptab[i].start_s & 0x3f); |