readdir() -> d_type always zero on NFS v3 mounted filesystems

N.J. Mann njm at
Sun May 2 09:50:22 UTC 2021

Hi Ronald,

On Thursday, April 29, 2021 13:14:53 +0200 Ronald Klop <ronald-lists at> wrote:
> On 4/29/21 10:24 AM, N.J. Mann wrote:
> Nice analysis. The manual page dirent(5) says:
>       The usage of the member d_type of struct dirent is unportable as it is
>       FreeBSD-specific.  It also may fail on certain file systems, for example
>       the cd9660 file system.
> "

I missed that somehow!  Thanks for pointing it out.

I have now got a working patch which uses stat() instead of d_type.  I
will send it to the author of gitup and see what he says.


More information about the freebsd-fs mailing list