summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornyan <nyan@FreeBSD.org>2003-05-01 13:27:11 +0000
committernyan <nyan@FreeBSD.org>2003-05-01 13:27:11 +0000
commit33a268f422abc0f17861af3ee9f7bd25afb39192 (patch)
tree8d5150b0a20c8b308f3948c81153a5b201efcaf5
parent979c0d656829fd523be93f7a75f8481f3dc6a89f (diff)
downloadFreeBSD-src-33a268f422abc0f17861af3ee9f7bd25afb39192.zip
FreeBSD-src-33a268f422abc0f17861af3ee9f7bd25afb39192.tar.gz
Merged from src/sbin/fdisk/fdisk.c revision 1.69.
-rw-r--r--sbin/fdisk_pc98/fdisk.c7
1 files changed, 6 insertions, 1 deletions
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;
OpenPOWER on IntegriCloud