From b4c7ad318371764675dbd598318f2945bec71132 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Wed, 16 Mar 2011 13:02:26 -0700 Subject: memdisk: make sure the disk type is actually set Make sure we actually set the disk CMOS type. Signed-off-by: H. Peter Anvin --- memdisk/setup.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'memdisk/setup.c') 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) -- cgit v1.2.1