diff options
author | bde <bde@FreeBSD.org> | 1997-10-27 14:55:49 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1997-10-27 14:55:49 +0000 |
commit | 4cd9d808cf40254677887f0863d5987dfadcda6b (patch) | |
tree | 29278c8f17af0b75a38c03d52b0cfb178d3a04a8 /sys/isofs | |
parent | ed590696250cf836ce9c6db935d76ad9a89db2c8 (diff) | |
download | FreeBSD-src-4cd9d808cf40254677887f0863d5987dfadcda6b.zip FreeBSD-src-4cd9d808cf40254677887f0863d5987dfadcda6b.tar.gz |
Use bread() instead of cluster_read() for reading the last block
in a file. There was a (harmless, I think) off-by-1 error. This
was fixed in ufs long ago (rev.1.21 of ufs_readwrite.c) but not
in cd9660.
cd9660_read() has stagnated in many other ways. It is closer to
the Net/2 ufs_read() (which is was cloned from) than ufs_read()
itself is.
Diffstat (limited to 'sys/isofs')
-rw-r--r-- | sys/isofs/cd9660/cd9660_vnops.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/isofs/cd9660/cd9660_vnops.c b/sys/isofs/cd9660/cd9660_vnops.c index c693c8f..6b0f801 100644 --- a/sys/isofs/cd9660/cd9660_vnops.c +++ b/sys/isofs/cd9660/cd9660_vnops.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)cd9660_vnops.c 8.19 (Berkeley) 5/27/95 - * $Id: cd9660_vnops.c,v 1.47 1997/10/26 20:55:09 phk Exp $ + * $Id: cd9660_vnops.c,v 1.48 1997/10/27 13:33:37 bde Exp $ */ #include <sys/param.h> @@ -284,7 +284,7 @@ cd9660_read(ap) size = blksize(imp, ip, lbn); rablock = lbn + 1; if ((vp->v_mount->mnt_flag & MNT_NOCLUSTERR) == 0) { - if (lblktosize(imp, rablock) <= ip->i_size) + if (lblktosize(imp, rablock) < ip->i_size) error = cluster_read(vp, (off_t)ip->i_size, lbn, size, NOCRED, uio->uio_resid, (ap->a_ioflag >> 16), &bp); |