Subject: Re: problems with getdents() ??? vs opendir()
To: John Refling <johnr@imageworks.com>
From: Frank van der Linden <frank@wins.uva.nl>
List: netbsd-help
Date: 07/10/2000 10:14:35
getdents() may return deleted entries (d_ino == 0). It can return EINVAL
in the described NFS case, but also when you pass a bad number of bytes
to it (less than 32 in the kernfs case). This number varies per
filesystem.

You shouldn't really be using getdents(), it's non-portable and not
meant to be used directly by applications. Use opendir() & friends
instead. For what you are doing, fts(3) might also be a good choice.

- Frank