Open System Services Library Calls Reference Manual (G06.27+, H06.04+)
OSS Library Calls (e - f) ftw(3)
RETURN VALUES
The ftw() function continues processing until one of the following conditions occurs; it then
returns the appropriate value, as follows:
• If the traversal of the directory hierarchy is complete, the ftw( ) function returns the value
0 (zero).
• If the function specified by the function parameter returns a value other than 0 (zero),
ftw() terminates its search and returns the value that was returned by function.
• If ftw() detects an error other than that for FTW_DNR or FTW_NS (that is, other than
[EACCES]), the value -1 is returned and errno is set to indicate the error.
ERRORS
If any of the following conditions occurs, the ftw( ) function sets errno to the corresponding
value:
[EACCES] One of the following is true:
• Search permission is denied for any component of the path parameter.
• Read permission is denied for the path parameter.
• The function specified by the function parameter returns -1 and does not
reset the value of errno.
[EFSBAD] The program attempted an operation involving a fileset with a corrupted fileset
catalog.
[ELOOP] Too many symbolic links were encountered in translating path.
[ENAMETOOLONG]
One of the following is too long:
• The pathname pointed to by the path parameter
• A component of the pathname pointed to by the path parameter
• The intermediate result of pathname resolution when a symbolic link is
part of the path parameter
The pathconf( ) function can be called to obtain the applicable limits.
[ENOENT] One of the following conditions exists:
• The path parameter points to the name of a file that does not exist.
• The path parameter points to an empty string.
• The path parameter specifies a file on a remote HP NonStop server node
but communication with the remote node has been lost.
[ENOMEM] The system has insufficient resources.
[ENOROOT] One of the following conditions exists:
• The root fileset of the local node (fileset 0) is not in the STARTED state.
• The current root fileset for the specified file is unavailable. The OSS
name server for the fileset might have failed.
527187-004 Hewlett-Packard Company 2−113