summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1995-08-23 11:43:45 +0000
committerjkh <jkh@FreeBSD.org>1995-08-23 11:43:45 +0000
commit20b06a26bb71495bbb95282b9996e8f14b5b5472 (patch)
tree6328c3afdb6179425f95ef80f08dda464bdaef4f
parent9949f9b3181261cbedade6f1578c12481bf57755 (diff)
downloadFreeBSD-src-20b06a26bb71495bbb95282b9996e8f14b5b5472.zip
FreeBSD-src-20b06a26bb71495bbb95282b9996e8f14b5b5472.tar.gz
Don't clip d_ncylinders to value used by partitions.
-rw-r--r--sys/i386/isa/diskslice_machdep.c4
-rw-r--r--sys/kern/subr_diskmbr.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/i386/isa/diskslice_machdep.c b/sys/i386/isa/diskslice_machdep.c
index 52a4c38..d92b709 100644
--- a/sys/i386/isa/diskslice_machdep.c
+++ b/sys/i386/isa/diskslice_machdep.c
@@ -35,7 +35,7 @@
*
* from: @(#)ufs_disksubr.c 7.16 (Berkeley) 5/4/91
* from: ufs_disksubr.c,v 1.8 1994/06/07 01:21:39 phk Exp $
- * $Id: diskslice_machdep.c,v 1.14 1995/05/18 22:45:35 phk Exp $
+ * $Id: diskslice_machdep.c,v 1.15 1995/08/23 10:41:57 jkh Exp $
*/
#include <stddef.h>
@@ -298,13 +298,13 @@ reread_mbr:
if (secpercyl != 0) {
u_long secperunit;
- lp->d_ncylinders = max_ncyls;
lp->d_nsectors = max_nsectors;
lp->d_ntracks = max_ntracks;
lp->d_secpercyl = secpercyl;
secperunit = secpercyl * max_ncyls;
if (lp->d_secperunit < secperunit)
lp->d_secperunit = secperunit;
+ lp->d_ncylinders = lp->d_secperunit / secpercyl;
}
/*
diff --git a/sys/kern/subr_diskmbr.c b/sys/kern/subr_diskmbr.c
index 52a4c38..d92b709 100644
--- a/sys/kern/subr_diskmbr.c
+++ b/sys/kern/subr_diskmbr.c
@@ -35,7 +35,7 @@
*
* from: @(#)ufs_disksubr.c 7.16 (Berkeley) 5/4/91
* from: ufs_disksubr.c,v 1.8 1994/06/07 01:21:39 phk Exp $
- * $Id: diskslice_machdep.c,v 1.14 1995/05/18 22:45:35 phk Exp $
+ * $Id: diskslice_machdep.c,v 1.15 1995/08/23 10:41:57 jkh Exp $
*/
#include <stddef.h>
@@ -298,13 +298,13 @@ reread_mbr:
if (secpercyl != 0) {
u_long secperunit;
- lp->d_ncylinders = max_ncyls;
lp->d_nsectors = max_nsectors;
lp->d_ntracks = max_ntracks;
lp->d_secpercyl = secpercyl;
secperunit = secpercyl * max_ncyls;
if (lp->d_secperunit < secperunit)
lp->d_secperunit = secperunit;
+ lp->d_ncylinders = lp->d_secperunit / secpercyl;
}
/*
OpenPOWER on IntegriCloud