aboutsummaryrefslogtreecommitdiffstats
path: root/memdisk
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2011-03-16 13:02:26 -0700
committerH. Peter Anvin <hpa@zytor.com>2011-03-16 13:02:26 -0700
commitb4c7ad318371764675dbd598318f2945bec71132 (patch)
tree214d6a5c43856d0d08dc423b2f2c2d3fb2f03c7e /memdisk
parent3905382158cc8c5c40f71e1b33f1802341838bca (diff)
downloadsyslinux-b4c7ad318371764675dbd598318f2945bec71132.tar.gz
syslinux-b4c7ad318371764675dbd598318f2945bec71132.tar.xz
syslinux-b4c7ad318371764675dbd598318f2945bec71132.zip
memdisk: make sure the disk type is actually set
Make sure we actually set the disk CMOS type. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'memdisk')
-rw-r--r--memdisk/setup.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/memdisk/setup.c b/memdisk/setup.c
index 61cf420c..bc79e127 100644
--- a/memdisk/setup.c
+++ b/memdisk/setup.c
@@ -523,6 +523,8 @@ static const struct geometry *get_disk_image_geometry(uint32_t where,
sectors at the end of the image... */
xsectors++;
}
+
+ hd_geometry.type = type;
}
} else {
/* Assume it is a hard disk image and scan for a partition table */
@@ -558,6 +560,8 @@ static const struct geometry *get_disk_image_geometry(uint32_t where,
}
}
}
+
+ hd_geometry.type = 0;
}
}
@@ -566,8 +570,8 @@ static const struct geometry *get_disk_image_geometry(uint32_t where,
if (!max_s)
max_s = xsectors > 2097152 ? 63 : 32;
- hd_geometry.h = max_h;
- hd_geometry.s = max_s;
+ hd_geometry.h = max_h;
+ hd_geometry.s = max_s;
}
if (!hd_geometry.c)