diff options
Diffstat (limited to 'sys/arch/mvmeppc')
-rw-r--r-- | sys/arch/mvmeppc/mvmeppc/disksubr.c | 7 |
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); } |