diff options
-rw-r--r-- | lib/libdisk/change.c | 2 | ||||
-rw-r--r-- | sbin/fdisk/fdisk.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/libdisk/change.c b/lib/libdisk/change.c index 297ac11..9cb2a5c 100644 --- a/lib/libdisk/change.c +++ b/lib/libdisk/change.c @@ -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) diff --git a/sbin/fdisk/fdisk.c b/sbin/fdisk/fdisk.c index 1e121bb..604cc7d 100644 --- a/sbin/fdisk/fdisk.c +++ b/sbin/fdisk/fdisk.c @@ -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; } |