]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r253651, r253652, r253657;
authorpfg <pfg@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 24 Aug 2013 17:45:42 +0000 (17:45 +0000)
committerpfg <pfg@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 24 Aug 2013 17:45:42 +0000 (17:45 +0000)
commitb7cf0ba76cfee89db3fb1b6dc8f3dfa63c3df235
tree343b4d78fb0fb0829e0ca97e0ba6297d8a7f6754
parente60724aaca3278c0518155277f81ae2dc8b5841a
MFC r253651, r253652, r253657;

ext2fs: Don't assume that on-disk format of a directory is the same
as in <sys/dirent.h>

ext2_readdir() has always been very fs specific and different
with respect to its ufs_ counterpart. Recent changes from UFS
have made it possible to share more closely the implementation.

Always start parsing at DIRBLKSIZ aligned offset, skip first entries if
uio_offset is not DIRBLKSIZ aligned. Return EINVAL if buffer is too
small for single entry.

Preallocate buffer for cookies.

Skip entries with zero inode number.

Reviewed by: gleb, Zheng Liu

git-svn-id: svn://svn.freebsd.org/base/stable/9@254801 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/fs/ext2fs/ext2_lookup.c