diff options
author | das <das@FreeBSD.org> | 2008-03-16 19:08:53 +0000 |
---|---|---|
committer | das <das@FreeBSD.org> | 2008-03-16 19:08:53 +0000 |
commit | 6f407f2920aabd83849ef82bbae7a7aded2d68e3 (patch) | |
tree | ad83a5de29b27154002e898c9720dd5248f47544 /sys/net/if_lagg.c | |
parent | e7b290ea3d25b7552b89e1f0f99985a9e6e3654d (diff) | |
download | FreeBSD-src-6f407f2920aabd83849ef82bbae7a7aded2d68e3.zip FreeBSD-src-6f407f2920aabd83849ef82bbae7a7aded2d68e3.tar.gz |
scandir(3) previously used st_size to obtain an initial estimate
of the array length needed to store all the directory entries.
Although BSD has historically guaranteed that st_size is the size
of the directory file, POSIX does not, and more to the point, some
recent filesystems such as ZFS use st_size to mean something else.
The fix is to not stat the directory at all, set the initial
array size to 32 entries, and realloc it in powers of 2 if that
proves insufficient.
PR: 113668
Diffstat (limited to 'sys/net/if_lagg.c')
0 files changed, 0 insertions, 0 deletions