[PATCH 0/1] MR5693: ntdll: Don't warn on macOS and FreeBSD when xattr doesn't exist.
Linux getxattr returns ENODATA when the attribute doesn't exist, but macOS and FreeBSD both return ENOATTR in that case. Avoids warnings like `0050:warn:file:get_file_info Failed to get extended attribute user.DOSATTRIB from "<..>/dosdevices/c:/windows/system32/rpcss.exe". errno 93 (Attribute not found)` -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5693
From: Brendan Shanks <bshanks(a)codeweavers.com> --- dlls/ntdll/unix/file.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c index d292d934efa..d1a6573ed69 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c @@ -1595,6 +1595,9 @@ static int fd_get_file_info( int fd, unsigned int options, struct stat *st, ULON if (errno == ENOTSUP) return ret; #ifdef ENODATA if (errno == ENODATA) return ret; +#endif +#ifdef ENOATTR + if (errno == ENOATTR) return ret; #endif WARN( "Failed to get extended attribute " SAMBA_XATTR_DOS_ATTRIB ". errno %d (%s)\n", errno, strerror( errno ) ); @@ -1694,6 +1697,9 @@ static int get_file_info( const char *path, struct stat *st, ULONG *attr ) if (errno == ENOTSUP) return ret; #ifdef ENODATA if (errno == ENODATA) return ret; +#endif +#ifdef ENOATTR + if (errno == ENOATTR) return ret; #endif WARN( "Failed to get extended attribute " SAMBA_XATTR_DOS_ATTRIB " from \"%s\". errno %d (%s)\n", path, errno, strerror( errno ) ); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/5693
participants (2)
-
Brendan Shanks -
Brendan Shanks (@bshanks)