The following are the values for Linux, Solaris, or AIX errno in case of failure:
EINVAL – The tag name syntax is invalid or too long.
ENODATA – The tag name does not exist for this file or directory.
ERANGE - The value buffer is too small to hold the returned value.
EACCES – Search permission denied for a directory in the path prefix of path; or the user does not have permission on the file to read tag names.
ENAMETOOLONG – The file name is too long.
ENOENT – A component of path does not exist.
The following are the values that Windows GetLastError() returns in case of failure:
ERROR_INVALID_PARAMETER - The tag name does not exist for this file or directory or the tag name is syntactically incorrect.
ERROR_INSUFFICIENT_BUFFER - The value buffer is too small to hold the returned value.
ERROR_ACCESS_DENIED - Search permission denied for a directory in the path prefix of path; or the user does not have permission on the file to read tag names.
ERROR_INVALID_NAME - The file name or path name is too long or is malformed.
ERROR_FILE_NOT_FOUND - The system cannot find the file specified.