diff options
-rw-r--r-- | sys/kern/vfs_default.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c index 2d9a908..bf037fe 100644 --- a/sys/kern/vfs_default.c +++ b/sys/kern/vfs_default.c @@ -281,10 +281,9 @@ get_next_dirent(struct vnode *vp, struct dirent **dpp, char *dirbuf, if (error) return (error); - *off = uio.uio_offset; - *cpos = dirbuf; - *len = (dirbuflen - uio.uio_resid); + *len = uio.uio_offset - *off; + *off = uio.uio_offset; } dp = (struct dirent *)(*cpos); |