summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_diskmbr.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2001-05-26 08:27:58 +0000
committerphk <phk@FreeBSD.org>2001-05-26 08:27:58 +0000
commit2072a71f0e5186928f3cb8cfac61fe8199029442 (patch)
treeb40e6ace9e559eda88dc8e88344909bffdde59e4 /sys/kern/subr_diskmbr.c
parent32df247d021a07cb6a2425587a871d41f24660e6 (diff)
downloadFreeBSD-src-2072a71f0e5186928f3cb8cfac61fe8199029442.zip
FreeBSD-src-2072a71f0e5186928f3cb8cfac61fe8199029442.tar.gz
Create a general facility for making dev_t's depend on another
dev_t. The dev_depends(dev_t, dev_t) function is for tying them to each other. When destroy_dev() is called on a dev_t, all dev_t's depending on it will also be destroyed (depth first order). Rewrite the make_dev_alias() to use this dependency facility. kern/subr_disk.c: Make the disk mini-layer use dependencies to make sure all relevant dev_t's are removed when the disk disappears. Make the disk mini-layer precreate some magic sub devices which the disk/slice/label code expects to be there. kern/subr_disklabel.c: Remove some now unneeded variables. kern/subr_diskmbr.c: Remove some ancient, commented out code. kern/subr_diskslice.c: Minor cleanup. Use name from dev_t instead of dsname()
Diffstat (limited to 'sys/kern/subr_diskmbr.c')
-rw-r--r--sys/kern/subr_diskmbr.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/sys/kern/subr_diskmbr.c b/sys/kern/subr_diskmbr.c
index 593d71b..92234d5 100644
--- a/sys/kern/subr_diskmbr.c
+++ b/sys/kern/subr_diskmbr.c
@@ -298,26 +298,9 @@ reread_mbr:
*/
secpercyl = (u_long)max_nsectors * max_ntracks;
if (secpercyl != 0) {
-#if 0
- u_long secperunit;
-#endif
-
lp->d_nsectors = max_nsectors;
lp->d_ntracks = max_ntracks;
lp->d_secpercyl = secpercyl;
- /*
- * Temporarily, don't even consider adjusting the drive's
- * size, since the adjusted size may exceed the hardware's
- * addressing capabilities. The adjustment helped mainly
- * for ancient MFM drives with > 1024 cylinders, but now
- * breaks at least IDE drives with 63*16*65536 sectors if
- * they are controlled by the wd driver in CHS mode.
- */
-#if 0
- secperunit = secpercyl * max_ncyls;
- if (lp->d_secperunit < secperunit)
- lp->d_secperunit = secperunit;
-#endif
lp->d_ncylinders = lp->d_secperunit / secpercyl;
}
OpenPOWER on IntegriCloud