SCCS-vsn: sys/ufs/ffs/ffs_vnops.c 7.33
SCCS-vsn: sys/ufs/ffs/ufs_vnops.c 7.33
SCCS-vsn: sys/ufs/lfs/lfs_vnops.c 7.33
SCCS-vsn: sys/ufs/ufs/ufs_vnops.c 7.33
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#)ffs_vnops.c 7.32 (Berkeley) %G%
+ * @(#)ffs_vnops.c 7.33 (Berkeley) %G%
/*
* Vnode op for read and write
*/
/*
* Vnode op for read and write
*/
-ufs_readdir(vp, uio, cred)
+ufs_readdir(vp, uio, cred, eofflagp)
struct vnode *vp;
register struct uio *uio;
struct ucred *cred;
struct vnode *vp;
register struct uio *uio;
struct ucred *cred;
{
int count, lost, error;
{
int count, lost, error;
uio->uio_iov->iov_len = count;
error = ufs_read(vp, uio, 0, cred);
uio->uio_resid += lost;
uio->uio_iov->iov_len = count;
error = ufs_read(vp, uio, 0, cred);
uio->uio_resid += lost;
+ if ((VTOI(vp)->i_size - uio->uio_offset) <= 0)
+ *eofflagp = 1;
+ else
+ *eofflagp = 0;
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#)ufs_vnops.c 7.32 (Berkeley) %G%
+ * @(#)ufs_vnops.c 7.33 (Berkeley) %G%
/*
* Vnode op for read and write
*/
/*
* Vnode op for read and write
*/
-ufs_readdir(vp, uio, cred)
+ufs_readdir(vp, uio, cred, eofflagp)
struct vnode *vp;
register struct uio *uio;
struct ucred *cred;
struct vnode *vp;
register struct uio *uio;
struct ucred *cred;
{
int count, lost, error;
{
int count, lost, error;
uio->uio_iov->iov_len = count;
error = ufs_read(vp, uio, 0, cred);
uio->uio_resid += lost;
uio->uio_iov->iov_len = count;
error = ufs_read(vp, uio, 0, cred);
uio->uio_resid += lost;
+ if ((VTOI(vp)->i_size - uio->uio_offset) <= 0)
+ *eofflagp = 1;
+ else
+ *eofflagp = 0;
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#)lfs_vnops.c 7.32 (Berkeley) %G%
+ * @(#)lfs_vnops.c 7.33 (Berkeley) %G%
/*
* Vnode op for read and write
*/
/*
* Vnode op for read and write
*/
-ufs_readdir(vp, uio, cred)
+ufs_readdir(vp, uio, cred, eofflagp)
struct vnode *vp;
register struct uio *uio;
struct ucred *cred;
struct vnode *vp;
register struct uio *uio;
struct ucred *cred;
{
int count, lost, error;
{
int count, lost, error;
uio->uio_iov->iov_len = count;
error = ufs_read(vp, uio, 0, cred);
uio->uio_resid += lost;
uio->uio_iov->iov_len = count;
error = ufs_read(vp, uio, 0, cred);
uio->uio_resid += lost;
+ if ((VTOI(vp)->i_size - uio->uio_offset) <= 0)
+ *eofflagp = 1;
+ else
+ *eofflagp = 0;
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#)ufs_vnops.c 7.32 (Berkeley) %G%
+ * @(#)ufs_vnops.c 7.33 (Berkeley) %G%
/*
* Vnode op for read and write
*/
/*
* Vnode op for read and write
*/
-ufs_readdir(vp, uio, cred)
+ufs_readdir(vp, uio, cred, eofflagp)
struct vnode *vp;
register struct uio *uio;
struct ucred *cred;
struct vnode *vp;
register struct uio *uio;
struct ucred *cred;
{
int count, lost, error;
{
int count, lost, error;
uio->uio_iov->iov_len = count;
error = ufs_read(vp, uio, 0, cred);
uio->uio_resid += lost;
uio->uio_iov->iov_len = count;
error = ufs_read(vp, uio, 0, cred);
uio->uio_resid += lost;
+ if ((VTOI(vp)->i_size - uio->uio_offset) <= 0)
+ *eofflagp = 1;
+ else
+ *eofflagp = 0;