version 1.56.2.1, 2007/07/15 13:15:41 |
version 1.56.2.2, 2007/08/19 19:24:07 |
|
|
lp = sc->dkdev.dk_label; |
lp = sc->dkdev.dk_label; |
if ((sc->flags & FLPF_HAVELAB) == 0) { |
if ((sc->flags & FLPF_HAVELAB) == 0) { |
bp->b_error = EIO; |
bp->b_error = EIO; |
goto bad; |
goto done; |
} |
} |
if (bp->b_blkno < 0 || (bp->b_bcount % SECTOR_SIZE)) { |
if (bp->b_blkno < 0 || (bp->b_bcount % SECTOR_SIZE)) { |
bp->b_error = EINVAL; |
bp->b_error = EINVAL; |
goto bad; |
goto done; |
} |
} |
if (bp->b_bcount == 0) |
if (bp->b_bcount == 0) |
goto done; |
goto done; |
|
|
goto done; |
goto done; |
if (sz < 0) { /* Past EndOfDisk */ |
if (sz < 0) { /* Past EndOfDisk */ |
bp->b_error = EINVAL; |
bp->b_error = EINVAL; |
goto bad; |
goto done; |
} |
} |
/* Trucate it */ |
/* Trucate it */ |
if (bp->b_flags & B_RAW) |
if (bp->b_flags & B_RAW) |
|
|
splx(sps); |
splx(sps); |
|
|
return; |
return; |
bad: |
|
bp->b_flags |= B_ERROR; |
|
done: |
done: |
bp->b_resid = bp->b_bcount; |
bp->b_resid = bp->b_bcount; |
biodone(bp); |
biodone(bp); |
Line 1009 struct fd_softc *sc; |
|
Line 1007 struct fd_softc *sc; |
|
bp = BUFQ_PEEK(sc->bufq); |
bp = BUFQ_PEEK(sc->bufq); |
|
|
bp->b_error = EIO; |
bp->b_error = EIO; |
bp->b_flags |= B_ERROR; |
|
fd_state = FLP_MON; |
fd_state = FLP_MON; |
|
|
break; |
break; |