diff options
author | Yoshihiro Takahashi <nyan@FreeBSD.org> | 2003-05-01 13:27:11 +0000 |
---|---|---|
committer | Yoshihiro Takahashi <nyan@FreeBSD.org> | 2003-05-01 13:27:11 +0000 |
commit | 7513940d0f647d88654b6ceef8bd0809daf10bde (patch) | |
tree | 8d5150b0a20c8b308f3948c81153a5b201efcaf5 /sbin/fdisk_pc98 | |
parent | 80da55ea72bea049697419aeae40ba4596822232 (diff) | |
download | src-test2-7513940d0f647d88654b6ceef8bd0809daf10bde.tar.gz src-test2-7513940d0f647d88654b6ceef8bd0809daf10bde.zip |
Notes
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; |