- The maximum number of heads is 255, not 256.

Pointed out by:		marcel
This commit is contained in:
Ulf Lilleengen 2009-06-15 16:51:07 +00:00
parent 86baa27ae6
commit 1d695e8ed4
2 changed files with 3 additions and 3 deletions

View file

@ -36,7 +36,7 @@ Sanitize_Bios_Geom(struct disk *disk)
if (disk->bios_cyl >= 65536)
sane = 0;
if (disk->bios_hd > 256)
if (disk->bios_hd >= 256)
sane = 0;
#ifdef PC98
if (disk->bios_sect >= 256)

View file

@ -1066,8 +1066,8 @@ process_geometry(CMD *command)
warnx("ERROR line %d: number of heads not specified",
current_line_number);
status = 0;
} else if (dos_heads > 256) {
warnx("ERROR line %d: number of heads must be within (1-256)",
} else if (dos_heads > 255) {
warnx("ERROR line %d: number of heads must be within (1-255)",
current_line_number);
status = 0;
}