summaryrefslogtreecommitdiffstats
path: root/stat.c
AgeCommit message (Collapse)Author
2021-12-10stat: Work around GNU Hurd bugTavian Barnes
fstatat(fd, "", buf, AT_EMPTY_PATH) fails with a nonsense errno on Hurd. Since fstat() itself works fine, just use that. Link: https://lists.gnu.org/archive/html/bug-hurd/2021-12/msg00001.html
2021-03-28fsade: Fix msan false positive in bfs_check_acl_type()Tavian Barnes
2021-03-06Implement -flags, from FreeBSD findTavian Barnes
This is the last BSD-specific primary I'm aware of. Fixes #14.
2020-12-02Give messages to unconditional assertion failuresTavian Barnes
2020-11-18stat: #include <unistd.h> for syscall() when neededTavian Barnes
2020-11-12Include what I useTavian Barnes
Thanks to https://github.com/include-what-you-use/include-what-you-use
2020-09-18stat: Rename bfs_stat_flag to _flagsTavian Barnes
Flags enums should be plural.
2019-08-30stat: Check that AT_STATX_DONT_SYNC exists before using itTavian Barnes
2019-08-29stat: New BFS_STAT_NOSYNC flagTavian Barnes
2019-07-05stat: Treat EPERM like ENOSYS for statx()Tavian Barnes
On some configurations (e.g. old Docker with the default seccomp() profile), statx() fails with EPERM. Consider this to mean statx() is unsupported, as EPERM is not a documented error code in normal operation. Possible fix for https://github.com/alpinelinux/aports/pull/9277
2019-05-04stat: Get rid of bfs_fstat()Tavian Barnes
We can just use bfs_stat() with a NULL at_path.
2019-05-04stat: Unify the flags argumentsTavian Barnes
2019-04-15Release 1.41.4Tavian Barnes
2019-03-06parse: Use a trie to hold currently open filesTavian Barnes
2019-01-31stat: Work around msan not knowing about statx()Tavian Barnes
2019-01-03stat: s/ENODATA/ENOTSUP, since ENODATA is POSIX-optionalTavian Barnes
Fixes half of #40.
2018-12-25stat: Provide a helper for getting human-readable field namesTavian Barnes
And fix -newerXY if the Y time doesn't exist.
2018-12-20stat: Unify bfs_stat_time() implementationsTavian Barnes
2018-12-19stat: Handle statx() not returning some timesTavian Barnes
/sys/fs/cgroup, for example, doesn't return access times from statx(). That shouldn't matter unless we actually need them, so make it not an error.
2018-11-01Print device major/minor numbers for -lsTavian Barnes
2018-07-11stat: Support the glibc statx() wrapperTavian Barnes
glibc 2.28 will ship with a wrapper for the statx() system call. Currently the build is broken against it, because sys/stat.h suddenly declares all the same types that linux/stat.h does. Fix it by taking the sys/stat.h ones if they exist. Fixes #35
2018-07-02stat: Handle platforms that don't support AT_EMPTY_PATH for fstatat()Tavian Barnes
In particular, this caused -fprint to break on Hurd since AT_EMPTY_PATH is defined and works for some syscalls but not fstatat(). Should fix: https://buildd.debian.org/status/fetch.php?pkg=bfs&arch=hurd-i386&ver=1.2.2-1&stamp=1529920401&raw=0
2018-07-02stat: Don't try to statx() on architectures without the syscallTavian Barnes
Turns out that ia64 and sh4 define all the structures and constants, but don't actually support the statx() system call itself. So instead of testing for the constants, just test for the syscall number directly. Should fix: https://buildd.debian.org/status/fetch.php?pkg=bfs&arch=ia64&ver=1.2.2-1&stamp=1529917943&raw=0 https://buildd.debian.org/status/fetch.php?pkg=bfs&arch=sh4&ver=1.2.2-1&stamp=1529917893&raw=0
2018-01-08stat: New wrapper around the stat() familyTavian Barnes
This lets bfs transparently support the new statx() system call on Linux, giving it access to file birth times.