From 33a268f422abc0f17861af3ee9f7bd25afb39192 Mon Sep 17 00:00:00 2001 From: nyan Date: Thu, 1 May 2003 13:27:11 +0000 Subject: Merged from src/sbin/fdisk/fdisk.c revision 1.69. --- sbin/fdisk_pc98/fdisk.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sbin') diff --git a/sbin/fdisk_pc98/fdisk.c b/sbin/fdisk_pc98/fdisk.c index 10f13f8..9fd39c4 100644 --- a/sbin/fdisk_pc98/fdisk.c +++ b/sbin/fdisk_pc98/fdisk.c @@ -932,15 +932,20 @@ get_params() error = ioctl(fd, DIOCGFWSECTORS, &u); if (error == 0) sectors = dos_sectors = u; + else + sectors = dos_sectors = 63; + error = ioctl(fd, DIOCGFWHEADS, &u); if (error == 0) heads = dos_heads = u; + else + heads = dos_heads = 255; dos_cylsecs = cylsecs = heads * sectors; disksecs = cyls * heads * sectors; error = ioctl(fd, DIOCGSECTORSIZE, &u); - if (error != 0) + if (error != 0 || u == 0) u = 512; #ifdef PC98 secsize = u; -- cgit v1.1