diff options
| author | Satoshi Asami <asami@FreeBSD.org> | 1996-05-13 08:38:15 +0000 |
|---|---|---|
| committer | Satoshi Asami <asami@FreeBSD.org> | 1996-05-13 08:38:15 +0000 |
| commit | 0d88ef072c26e5175f07cff1d6d7e4fdaabd1191 (patch) | |
| tree | 4be1320249550f5fe07c631039fbb4a4812b9729 /sys/dev/ccd | |
| parent | 61f20a4c29e04772096b72f82023bccfa6871099 (diff) | |
Notes
Diffstat (limited to 'sys/dev/ccd')
| -rw-r--r-- | sys/dev/ccd/ccd.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/dev/ccd/ccd.c b/sys/dev/ccd/ccd.c index cefe093534c2..284d783f0ec4 100644 --- a/sys/dev/ccd/ccd.c +++ b/sys/dev/ccd/ccd.c @@ -1,4 +1,4 @@ -/* $Id: ccd.c,v 1.9 1996/03/26 02:29:11 asami Exp $ */ +/* $Id: ccd.c,v 1.10 1996/04/24 09:42:22 asami Exp $ */ /* $NetBSD: ccd.c,v 1.22 1995/12/08 19:13:26 thorpej Exp $ */ @@ -229,6 +229,13 @@ int numccd = 0; static int ccd_devsw_installed = 0; /* + * Number of blocks to untouched in front of a component partition. + * This is to avoid violating its disklabel area when it starts at the + * beginning of the slice. + */ +#define CCD_OFFSET 16 + +/* * Called by main() during pseudo-device attachment. All we need * to do is allocate enough space for devices to be configured later, and * add devsw entries. @@ -375,7 +382,7 @@ ccdinit(ccd, cpaths, p) maxsecsize = ((dpart.disklab->d_secsize > maxsecsize) ? dpart.disklab->d_secsize : maxsecsize); - size = dpart.part->p_size; + size = dpart.part->p_size - CCD_OFFSET; } else { #ifdef DEBUG if (ccddebug & (CCDB_FOLLOW|CCDB_INIT)) @@ -879,7 +886,7 @@ ccdbuffer(cb, cs, bp, bn, addr, bcount) cbp->cb_buf.b_iodone = (void (*)(struct buf *))ccdiodone; cbp->cb_buf.b_proc = bp->b_proc; cbp->cb_buf.b_dev = ci->ci_dev; /* XXX */ - cbp->cb_buf.b_blkno = cbn + cboff; + cbp->cb_buf.b_blkno = cbn + cboff + CCD_OFFSET; cbp->cb_buf.b_data = addr; cbp->cb_buf.b_vp = ci->ci_vp; if (cs->sc_ileave == 0) |
