diff options
Diffstat (limited to 'sbin/fdisk_pc98')
-rw-r--r-- | sbin/fdisk_pc98/fdisk.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sbin/fdisk_pc98/fdisk.c b/sbin/fdisk_pc98/fdisk.c index 10f13f85b9db..9fd39c443fa9 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; |