Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
H. Peter Anvin committed Mar 16, 2011
1 parent 3905382 commit b4c7ad3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions memdisk/setup.c
Expand Up @@ -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 */
Expand Down Expand Up @@ -558,6 +560,8 @@ static const struct geometry *get_disk_image_geometry(uint32_t where,
}
}
}

hd_geometry.type = 0;
}
}

Expand All @@ -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)
Expand Down

0 comments on commit b4c7ad3

Please sign in to comment.