Fix vfs_emptydir().Simplify the old interface (one less argument, It would consider directories containing directories withsimpler termination test) and
name of the form 'X.' (X being any authorized byte) as empty. Also,add documentation about it. it wouldAdd more sanity checks (mostly under INVARIANTS,
cause VOP_READDIR()but also in the general case to return an error on directories containing enoughprevent infinite loops). Drop the explicit test
whiteouts. While here, use a more decentlon minimum directory entry sized buffer as done elsewhere (without INVARIANTS).
Remove ad-hoc iteration on the Deal with the impacts in callers (directory's contentnt_exists() and instead use the newlyvop_stdvptocnp()).
exported vfs_next_dirent() function (this is what fixdirent_exists() has been simplified a bit but preserves the second problemexact same
mentioned above)semantics, even if the return code has been reversed (0 now means the entry
exists, ENOENT that it doesn't and other values are genuine errors).
Export new _GENERIC_MINDIRSIZ and _GENERIC_MAXDIRSIZ on __BSD_VISIBLE, and
GENERIC_MINDIRSIZ and GENERIC_MAXDIRSIZ on _KERNEL.