summaryrefslogtreecommitdiff
path: root/sbin/fdisk/cmd.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-01-04 23:57:30 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-01-04 23:57:30 +0000
commitb951689586f68c511350841fe391112ebe47cafd (patch)
tree95c5e305c0c7fe3b057fd4596581122662fa040f /sbin/fdisk/cmd.c
parent6bb6aa4d6433c7b07101605721e0a55c8e4b85fb (diff)
fix maximal cyl/heads; vons@usa.net
Diffstat (limited to 'sbin/fdisk/cmd.c')
-rw-r--r--sbin/fdisk/cmd.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sbin/fdisk/cmd.c b/sbin/fdisk/cmd.c
index fa9ddfc4f13..b1dd77b4b41 100644
--- a/sbin/fdisk/cmd.c
+++ b/sbin/fdisk/cmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd.c,v 1.15 1997/12/23 23:52:58 deraadt Exp $ */
+/* $OpenBSD: cmd.c,v 1.16 1998/01/04 23:57:29 deraadt Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
@@ -71,13 +71,13 @@ Xreinit(cmd, disk, mbr, tt, offset)
mbr->part[3].shead = 1;
mbr->part[3].ssect = 1;
- /* Go right to the end */
- mbr->part[3].ecyl = disk->real->cylinders;
- mbr->part[3].ehead = disk->real->heads;
- mbr->part[3].esect = disk->real->sectors;
+ /* Go right to the end */
+ mbr->part[3].ecyl = disk->real->cylinders - 1;
+ mbr->part[3].ehead = disk->real->heads - 1;
+ mbr->part[3].esect = disk->real->sectors;
- /* Fix up start/length fields */
- PRT_fix_BN(disk, &mbr->part[3]);
+ /* Fix up start/length fields */
+ PRT_fix_BN(disk, &mbr->part[3]);
/* Tell em we did something */
printf("In memory copy is initialized to:\n");