summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>1999-09-23 00:09:08 +0000
committerdillon <dillon@FreeBSD.org>1999-09-23 00:09:08 +0000
commitfc40d2e20f0b76e9734c856a4dfec0f5a4f45fa9 (patch)
treecfb69d7e2fd2b95f6d86b0a3fdcd6e6f47caf28e /sys
parenteec66756612ac54252ac4d819b3702182c4c059a (diff)
downloadFreeBSD-src-fc40d2e20f0b76e9734c856a4dfec0f5a4f45fa9.zip
FreeBSD-src-fc40d2e20f0b76e9734c856a4dfec0f5a4f45fa9.tar.gz
Fix bug in pseudo-geometry calculation code that assumed a sector size
smaller then 1024 bytes.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ccd/ccd.c2
-rw-r--r--sys/geom/geom_ccd.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ccd/ccd.c b/sys/dev/ccd/ccd.c
index e13ac65..4037f79 100644
--- a/sys/dev/ccd/ccd.c
+++ b/sys/dev/ccd/ccd.c
@@ -484,7 +484,7 @@ ccdinit(ccd, cpaths, p)
*/
ccg->ccg_secsize = maxsecsize;
ccg->ccg_ntracks = 1;
- ccg->ccg_nsectors = 1024 * (1024 / ccg->ccg_secsize);
+ ccg->ccg_nsectors = 1024 * 1024 / ccg->ccg_secsize;
ccg->ccg_ncylinders = cs->sc_size / ccg->ccg_nsectors;
/*
diff --git a/sys/geom/geom_ccd.c b/sys/geom/geom_ccd.c
index e13ac65..4037f79 100644
--- a/sys/geom/geom_ccd.c
+++ b/sys/geom/geom_ccd.c
@@ -484,7 +484,7 @@ ccdinit(ccd, cpaths, p)
*/
ccg->ccg_secsize = maxsecsize;
ccg->ccg_ntracks = 1;
- ccg->ccg_nsectors = 1024 * (1024 / ccg->ccg_secsize);
+ ccg->ccg_nsectors = 1024 * 1024 / ccg->ccg_secsize;
ccg->ccg_ncylinders = cs->sc_size / ccg->ccg_nsectors;
/*
OpenPOWER on IntegriCloud