mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-11 09:50:12 +00:00
fs/udf: fix incorrect error return (-1) when reading a large dir
Not enough space in user-land buffer is not an error, userland will read further until eof is reached. So instead of propagating -1 to caller we convert it to zero/success. cd9660 code works exactly the same way. PR: kern/78987 Reviewed by: jhb (mentor) Approved by: jhb (mentor)
This commit is contained in:
parent
f1e1ddc3d9
commit
84206c741f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=188815
@ -831,17 +831,16 @@ udf_readdir(struct vop_readdir_args *a)
|
||||
error = udf_uiodir(&uiodir, dir.d_reclen, uio,
|
||||
ds->this_off);
|
||||
}
|
||||
if (error) {
|
||||
printf("uiomove returned %d\n", error);
|
||||
if (error)
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* tell the calling layer whether we need to be called again */
|
||||
*a->a_eofflag = uiodir.eofflag;
|
||||
uio->uio_offset = ds->offset + ds->off;
|
||||
|
||||
if(error < 0)
|
||||
error = 0;
|
||||
if (!error)
|
||||
error = ds->error;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user