summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_disklabel.c
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>1996-12-01 11:25:38 +0000
committersos <sos@FreeBSD.org>1996-12-01 11:25:38 +0000
commit304d831859d554948e48205432147cf4e04acca8 (patch)
tree3caeb1000fbf433bbefbf62abe3def80c205c219 /sys/kern/subr_disklabel.c
parent33c2e639e1d61f008dac52121511b79f1fb488e6 (diff)
downloadFreeBSD-src-304d831859d554948e48205432147cf4e04acca8.zip
FreeBSD-src-304d831859d554948e48205432147cf4e04acca8.tar.gz
This update adds the support for != 512 byte sector SCSI devices to
the sd & od drivers. There is also slight changes to fdisk & newfs in order to comply with different sectorsizes. Currently sectors of size 512, 1024 & 2048 are supported, the only restriction beeing in fdisk, which hunts for the sectorsize of the device. This is based on patches to od.c and the other system files by John Gumb & Barry Scott, minor changes and the sd.c patches by me. There also exist some patches for the msdos filesys code, but I havn't been able to test those (yet). John Gumb (john@talisker.demon.co.uk) Barry Scott (barry@scottb.demon.co.uk)
Diffstat (limited to 'sys/kern/subr_disklabel.c')
-rw-r--r--sys/kern/subr_disklabel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/subr_disklabel.c b/sys/kern/subr_disklabel.c
index c5ae8a8..fc1e24e 100644
--- a/sys/kern/subr_disklabel.c
+++ b/sys/kern/subr_disklabel.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)ufs_disksubr.c 8.5 (Berkeley) 1/21/94
- * $Id: ufs_disksubr.c,v 1.25 1996/05/08 04:29:08 gpalmer Exp $
+ * $Id: ufs_disksubr.c,v 1.26 1996/09/20 17:39:44 bde Exp $
*/
#include <sys/param.h>
@@ -182,7 +182,7 @@ readdisklabel(dev, strat, lp)
bp = geteblk((int)lp->d_secsize);
bp->b_dev = dev;
- bp->b_blkno = LABELSECTOR;
+ bp->b_blkno = LABELSECTOR * ((int)lp->d_secsize/DEV_BSIZE);
bp->b_bcount = lp->d_secsize;
bp->b_flags &= ~B_INVAL;
bp->b_flags |= B_BUSY | B_READ;
@@ -284,7 +284,7 @@ writedisklabel(dev, strat, lp)
}
bp = geteblk((int)lp->d_secsize);
bp->b_dev = dkmodpart(dev, labelpart);
- bp->b_blkno = LABELSECTOR;
+ bp->b_blkno = LABELSECTOR * ((int)lp->d_secsize/DEV_BSIZE);
bp->b_bcount = lp->d_secsize;
#if 1
/*
OpenPOWER on IntegriCloud