summaryrefslogtreecommitdiff
path: root/sys/arch/mvmeppc
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2007-06-07 00:28:18 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2007-06-07 00:28:18 +0000
commit2b983a94dd05ba0dcd4e7d0f929d8c333e8c4ff8 (patch)
tree487d5866d3971c6c771894919fbed7e18df24ad8 /sys/arch/mvmeppc
parent7e0751214480a4f7fe318bedcb4bf8e309a3148d (diff)
More bounds_check_with_label homogenization. Fix a couple of typos while
there. 'so go to it!' deraadt@
Diffstat (limited to 'sys/arch/mvmeppc')
-rw-r--r--sys/arch/mvmeppc/mvmeppc/disksubr.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/arch/mvmeppc/mvmeppc/disksubr.c b/sys/arch/mvmeppc/mvmeppc/disksubr.c
index 9b8f5736100..b583c25cb01 100644
--- a/sys/arch/mvmeppc/mvmeppc/disksubr.c
+++ b/sys/arch/mvmeppc/mvmeppc/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.40 2007/06/06 17:15:12 deraadt Exp $ */
+/* $OpenBSD: disksubr.c,v 1.41 2007/06/07 00:28:17 krw Exp $ */
/* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */
/*
@@ -461,7 +461,7 @@ bounds_check_with_label(struct buf *bp, struct disklabel *lp,
if (sz == 0) {
/* If exactly at end of disk, return EOF. */
bp->b_resid = bp->b_bcount;
- goto done;
+ return (-1);
}
if (sz < 0) {
/* If past end of disk, return EINVAL. */
@@ -474,9 +474,7 @@ bounds_check_with_label(struct buf *bp, struct disklabel *lp,
/* Overwriting disk label? */
if (bp->b_blkno + blockpersec(DL_GETPOFFSET(p), lp) <= labelsector &&
-#if LABELSECTOR != 0
bp->b_blkno + blockpersec(DL_GETPOFFSET(p), lp) + sz > labelsector &&
-#endif
(bp->b_flags & B_READ) == 0 && !wlabel) {
bp->b_error = EROFS;
goto bad;
@@ -489,6 +487,5 @@ bounds_check_with_label(struct buf *bp, struct disklabel *lp,
bad:
bp->b_flags |= B_ERROR;
-done:
return (-1);
}