diff options
author | jlemon <jlemon@FreeBSD.org> | 2001-05-04 05:19:22 +0000 |
---|---|---|
committer | jlemon <jlemon@FreeBSD.org> | 2001-05-04 05:19:22 +0000 |
commit | 7a74be42b668e798ac3e24e9936a9052711cf7cd (patch) | |
tree | 8d7a28d3addfae66dafdf3d768b3e1801aba5f0c /sys/compat | |
parent | 1ac8002a8a79064018e6b36facd8f19c300a59b5 (diff) | |
download | FreeBSD-src-7a74be42b668e798ac3e24e9936a9052711cf7cd.zip FreeBSD-src-7a74be42b668e798ac3e24e9936a9052711cf7cd.tar.gz |
Fix the problem of some directory entries going missing when
read by the linux version of 'ls'.
Spotted by: rwatson
Diffstat (limited to 'sys/compat')
-rw-r--r-- | sys/compat/linprocfs/linprocfs_vnops.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/compat/linprocfs/linprocfs_vnops.c b/sys/compat/linprocfs/linprocfs_vnops.c index 499e5d4..da133f3 100644 --- a/sys/compat/linprocfs/linprocfs_vnops.c +++ b/sys/compat/linprocfs/linprocfs_vnops.c @@ -749,7 +749,7 @@ linprocfs_readdir(ap) if (pfs->pfs_nd == root_dir) { sx_slock(&allproc_lock); p = LIST_FIRST(&allproc); - i = (nd - pfs->pfs_nd) / sizeof(*nd); + i = nd - pfs->pfs_nd; while (p && i < start) { if (p_can(curproc, p, P_CAN_SEE, NULL) == 0) @@ -773,7 +773,6 @@ linprocfs_readdir(ap) sx_sunlock(&allproc_lock); } done: - uio->uio_offset += copied * delen; return (error); } |