Annotate that we don't check the returned data length from ufs_readdir()

because UFS uses fixed-size directory blocks.  When using this code with
other file systems, such as HFS+, the value of auio.uio_resid will need
to be taken into account.
This commit is contained in:
Robert Watson 2004-06-24 18:31:23 +00:00
parent c63d83f7c2
commit 12ec7658a4

View file

@ -410,6 +410,12 @@ ufs_extattr_iterate_directory(struct ufsmount *ump, struct vnode *dvp,
return (error);
}
/*
* XXXRW: While in UFS, we always get DIRBLKSIZ returns from
* the directory code on success, on other file systems this
* may not be the case. For portability, we should check the
* read length on return from ufs_readdir().
*/
edp = (struct dirent *)&dirbuf[DIRBLKSIZ];
for (dp = (struct dirent *)dirbuf; dp < edp; ) {
#if (BYTE_ORDER == LITTLE_ENDIAN)