- The maximum number of heads is 255, not 256.
Pointed out by: marcel
This commit is contained in:
@@ -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)
|
||||
|
||||
+2
-2
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user