.Ft int
.Fo ftw
.Fa "const char *path"
-.Fa "int (*fn)(const char *, const struct stat *, int)"
-.Fa "int maxfds"
+.Fa "int (*fn)(const\ char\ *, const\ struct\ stat\ *ptr, int\ flag)"
+.Fa "int depth"
.Fc
.Ft int
.Fo nftw
.Fa "const char *path"
-.Fa "int (*fn)(const\ char\ *, const\ struct\ stat\ *, int, struct\ FTW\ *)"
-.Fa "int maxfds"
+.Fa "int (*fn)(const\ char\ *, const\ struct\ stat\ *ptr, \
+ int\ flag, struct\ FTW\ *)"
+.Fa "int depth"
.Fa "int flags"
.Fc
.Sh DESCRIPTION
That is, it processes the directory before the directory's contents.
.Pp
The
-.Fa maxfds
+.Fa depth
argument specifies the maximum number of file descriptors
to keep open while traversing the tree.
It has no effect in this implementation.
.Bl -tag -width Er
.It Bq Er EINVAL
The
-.Fa maxfds
+.Fa depth
argument is less than 1 or greater than
.Dv OPEN_MAX .
.El
errors while accessing the initial path. When
.Fn nftw
is passed
-.Dv FTW_MOUNT
-it will pass the callback the mount point.
+.Dv FTW_MOUNT ,
+it will pass the mount point to the callback function.
.Sh SEE ALSO
.Xr chdir 2 ,
.Xr close 2 ,
.Xr open 2 ,
.Xr stat 2 ,
-.Xr compat 5 ,
.Xr fts 3 ,
.Xr malloc 3 ,
.Xr opendir 3 ,
-.Xr readdir 3
+.Xr readdir 3 ,
+.Xr compat 5
.Sh STANDARDS
The
.Fn ftw
did not follow symlinks.
.Sh BUGS
The
-.Fa maxfds
+.Fa depth
argument is currently ignored.