diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-06-07 03:41:53 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-06-07 03:41:53 +0000 |
commit | 703be0dea42fdedcc44500f2747e7f83894e2acb (patch) | |
tree | c635a5e305aeaf6cbea9543b5d2091599b0a2f4d /sys/arch | |
parent | 572bcf7550756be8a3c77f603b85107ecd0ed711 (diff) |
Comment 'fixes'. All bounds_check_with_label now identical except for
vax and alpha.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/luna88k/luna88k/disksubr.c | 6 | ||||
-rw-r--r-- | sys/arch/mac68k/mac68k/disksubr.c | 5 | ||||
-rw-r--r-- | sys/arch/mvme68k/mvme68k/disksubr.c | 5 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/disksubr.c | 5 | ||||
-rw-r--r-- | sys/arch/sparc/sparc/disksubr.c | 7 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/disksubr.c | 7 |
6 files changed, 12 insertions, 23 deletions
diff --git a/sys/arch/luna88k/luna88k/disksubr.c b/sys/arch/luna88k/luna88k/disksubr.c index f0a06e6a103..a8b9dc1464b 100644 --- a/sys/arch/luna88k/luna88k/disksubr.c +++ b/sys/arch/luna88k/luna88k/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.19 2007/06/07 00:28:17 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.20 2007/06/07 03:41:52 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.12 2002/02/19 17:09:44 wiz Exp $ */ /* @@ -329,9 +329,7 @@ bounds_check_with_label(struct buf *bp, struct disklabel *lp, bp->b_bcount = sz << DEV_BSHIFT; } - /* overwriting disk label ? */ - /* XXX this assumes everything <=LABELSECTOR is label! */ - /* But since LABELSECTOR is 0, that's ok for now. */ + /* Overwriting disk label? */ if (bp->b_blkno + blockpersec(DL_GETPOFFSET(p), lp) <= labelsector && bp->b_blkno + blockpersec(DL_GETPOFFSET(p), lp) + sz > labelsector && (bp->b_flags & B_READ) == 0 && !wlabel) { diff --git a/sys/arch/mac68k/mac68k/disksubr.c b/sys/arch/mac68k/mac68k/disksubr.c index 843144d0efc..d8d2d57e336 100644 --- a/sys/arch/mac68k/mac68k/disksubr.c +++ b/sys/arch/mac68k/mac68k/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.40 2007/06/07 00:28:17 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.41 2007/06/07 03:41:52 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.22 1997/11/26 04:18:20 briggs Exp $ */ /* @@ -573,8 +573,7 @@ bounds_check_with_label(struct buf *bp, struct disklabel *lp, bp->b_bcount = sz << DEV_BSHIFT; } - /* overwriting disk label ? */ - /* XXX should also protect bootstrap in first 8K */ + /* Overwriting disk label? */ if (bp->b_blkno + blockpersec(DL_GETPOFFSET(p), lp) <= labelsector && bp->b_blkno + blockpersec(DL_GETPOFFSET(p), lp) + sz > labelsector && (bp->b_flags & B_READ) == 0 && !wlabel) { diff --git a/sys/arch/mvme68k/mvme68k/disksubr.c b/sys/arch/mvme68k/mvme68k/disksubr.c index 50ff5a51299..1b96862e776 100644 --- a/sys/arch/mvme68k/mvme68k/disksubr.c +++ b/sys/arch/mvme68k/mvme68k/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.46 2007/06/07 00:28:17 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.47 2007/06/07 03:41:52 krw Exp $ */ /* * Copyright (c) 1998 Steve Murphree, Jr. * Copyright (c) 1995 Dale Rahn. @@ -275,8 +275,7 @@ bounds_check_with_label(struct buf *bp, struct disklabel *lp, bp->b_bcount = sz << DEV_BSHIFT; } - /* overwriting disk label ? */ - /* XXX should also protect bootstrap in first 8K */ + /* Overwriting disk label? */ if (bp->b_blkno + blockpersec(DL_GETPOFFSET(p), lp) <= labelsector && bp->b_blkno + blockpersec(DL_GETPOFFSET(p), lp) + sz > labelsector && (bp->b_flags & B_READ) == 0 && !wlabel) { diff --git a/sys/arch/mvme88k/mvme88k/disksubr.c b/sys/arch/mvme88k/mvme88k/disksubr.c index 5bc3d7021c7..9bd51b1dc56 100644 --- a/sys/arch/mvme88k/mvme88k/disksubr.c +++ b/sys/arch/mvme88k/mvme88k/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.42 2007/06/07 00:28:17 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.43 2007/06/07 03:41:52 krw Exp $ */ /* * Copyright (c) 1998 Steve Murphree, Jr. * Copyright (c) 1995 Dale Rahn. @@ -275,8 +275,7 @@ bounds_check_with_label(struct buf *bp, struct disklabel *lp, bp->b_bcount = sz << DEV_BSHIFT; } - /* overwriting disk label ? */ - /* XXX should also protect bootstrap in first 8K */ + /* Overwriting disk label? */ if (bp->b_blkno + blockpersec(DL_GETPOFFSET(p), lp) <= labelsector && bp->b_blkno + blockpersec(DL_GETPOFFSET(p), lp) + sz > labelsector && (bp->b_flags & B_READ) == 0 && !wlabel) { diff --git a/sys/arch/sparc/sparc/disksubr.c b/sys/arch/sparc/sparc/disksubr.c index fad671b0e07..9ab424c2cfc 100644 --- a/sys/arch/sparc/sparc/disksubr.c +++ b/sys/arch/sparc/sparc/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.53 2007/06/07 00:28:17 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.54 2007/06/07 03:41:52 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.16 1996/04/28 20:25:59 thorpej Exp $ */ /* @@ -301,10 +301,7 @@ bounds_check_with_label(struct buf *bp, struct disklabel *lp, bp->b_bcount = sz << DEV_BSHIFT; } - /* overwriting disk label ? */ - /* XXX should also protect bootstrap in first 8K */ - /* XXX this assumes everything <=LABELSECTOR is label! */ - /* But since LABELSECTOR is 0, that's ok for now. */ + /* Overwriting disk label? */ if (bp->b_blkno + blockpersec(DL_GETPOFFSET(p), lp) <= labelsector && bp->b_blkno + blockpersec(DL_GETPOFFSET(p), lp) + sz > labelsector && (bp->b_flags & B_READ) == 0 && !wlabel) { diff --git a/sys/arch/sparc64/sparc64/disksubr.c b/sys/arch/sparc64/sparc64/disksubr.c index 4670ab4d780..3f7fae515ae 100644 --- a/sys/arch/sparc64/sparc64/disksubr.c +++ b/sys/arch/sparc64/sparc64/disksubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: disksubr.c,v 1.32 2007/06/07 00:28:17 krw Exp $ */ +/* $OpenBSD: disksubr.c,v 1.33 2007/06/07 03:41:52 krw Exp $ */ /* $NetBSD: disksubr.c,v 1.13 2000/12/17 22:39:18 pk Exp $ */ /* @@ -300,10 +300,7 @@ bounds_check_with_label(struct buf *bp, struct disklabel *lp, bp->b_bcount = sz << DEV_BSHIFT; } - /* overwriting disk label ? */ - /* XXX should also protect bootstrap in first 8K */ - /* XXX this assumes everything <=LABELSECTOR is label! */ - /* But since LABELSECTOR is 0, that's ok for now. */ + /* Overwriting disk label? */ if (bp->b_blkno + blockpersec(DL_GETPOFFSET(p), lp) <= labelsector && bp->b_blkno + blockpersec(DL_GETPOFFSET(p), lp) + sz > labelsector && (bp->b_flags & B_READ) == 0 && !wlabel) { |