Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142885213
D51319.id158516.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
792 B
Referenced Files
None
Subscribers
None
D51319.id158516.diff
View Options
diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c
--- a/sys/fs/fdescfs/fdesc_vnops.c
+++ b/sys/fs/fdescfs/fdesc_vnops.c
@@ -547,6 +547,8 @@
fmp = VFSTOFDESC(ap->a_vp->v_mount);
if (ap->a_ncookies != NULL)
*ap->a_ncookies = 0;
+ if (ap->a_eofflag != NULL)
+ *ap->a_eofflag = 0;
off = (int)uio->uio_offset;
if (off != uio->uio_offset || off < 0 || (u_int)off % UIO_MX != 0 ||
@@ -559,7 +561,12 @@
fcnt = i - 2; /* The first two nodes are `.' and `..' */
FILEDESC_SLOCK(fdp);
- while (i < fdp->fd_nfiles + 2 && uio->uio_resid >= UIO_MX) {
+ while (uio->uio_resid >= UIO_MX) {
+ if (i >= fdp->fd_nfiles + 2) {
+ if (ap->a_eofflag != NULL)
+ *ap->a_eofflag = 1;
+ break;
+ }
bzero((caddr_t)dp, UIO_MX);
switch (i) {
case 0: /* `.' */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 25, 11:38 AM (11 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27938288
Default Alt Text
D51319.id158516.diff (792 B)
Attached To
Mode
D51319: fdescfs: Set *eofflag in fdesc_readdir()
Attached
Detach File
Event Timeline
Log In to Comment