diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2024-02-28 13:00:54 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2024-02-28 22:11:55 -0500 |
commit | c8ab9926132085f2daf6b949cafda43378d50fb5 (patch) | |
tree | 01cb8365fcc731a4cbe0e9a210dd467e228d62e8 /src/stat.c | |
parent | f0418655db6a344afd5c26efd04a4e4d87128233 (diff) | |
download | bfs-c8ab9926132085f2daf6b949cafda43378d50fb5.tar.xz |
stat: Use errno_is_like(ENOSYS) for EPERM kludge
Diffstat (limited to 'src/stat.c')
-rw-r--r-- | src/stat.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -253,9 +253,7 @@ static int bfs_stat_explicit(int at_fd, const char *at_path, int at_flags, struc if (load(&has_statx, relaxed)) { int ret = bfs_statx_impl(at_fd, at_path, at_flags, buf); - // EPERM is commonly returned in a seccomp() sandbox that does - // not allow statx() - if (ret != 0 && (errno == ENOSYS || errno == EPERM)) { + if (ret != 0 && errno_is_like(ENOSYS)) { store(&has_statx, false, relaxed); } else { return ret; |