Removed the ``#if 0'' that turned bounds_check_with_label() into worse

than a NOP.  bounds_check_with_label() would return -1 yet NOT set any
of the bio flags to show an error.  This meant the caller would not
properly see that bounds_check_with_label() did not do any work.  This
prevented newfs(8) from being able to write a file system on any partition
other than `c' on a `ccd'.

The logs of this file do not tell _why_ bounds_check_with_label() was
emasculated.  Nor are there any `XXX' comments.  So we'll unemasculated
it, and see what breaks.

Submitted by:	gallatin
This commit is contained in:
David E. O'Brien 2001-03-29 20:18:45 +00:00
parent 847c1df2db
commit 083c3fbb6f

View File

@ -2020,7 +2020,6 @@ Debugger(const char *msg)
int
bounds_check_with_label(struct bio *bp, struct disklabel *lp, int wlabel)
{
#if 0
struct partition *p = lp->d_partitions + dkpart(bp->bio_dev);
int labelsect = lp->d_partitions[0].p_offset;
int maxsz = p->p_size,
@ -2067,7 +2066,6 @@ bounds_check_with_label(struct bio *bp, struct disklabel *lp, int wlabel)
bad:
bp->bio_flags |= BIO_ERROR;
#endif
return(-1);
}