diff options
author | rwatson <rwatson@FreeBSD.org> | 2004-06-24 18:31:23 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2004-06-24 18:31:23 +0000 |
commit | 7a9902cd18f46701f7f6aa84cb48f0f3c9b8950b (patch) | |
tree | 837963d1f787228e3e344bec31644bdeb60989df /sys/ufs | |
parent | b76ce33197cc89597b3b5b40149871987bc6e2f4 (diff) | |
download | FreeBSD-src-7a9902cd18f46701f7f6aa84cb48f0f3c9b8950b.zip FreeBSD-src-7a9902cd18f46701f7f6aa84cb48f0f3c9b8950b.tar.gz |
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.
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ufs/ufs_extattr.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/ufs/ufs/ufs_extattr.c b/sys/ufs/ufs/ufs_extattr.c index e39ad17..f31d927 100644 --- a/sys/ufs/ufs/ufs_extattr.c +++ b/sys/ufs/ufs/ufs_extattr.c @@ -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) |