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>
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);