summaryrefslogtreecommitdiffstats
path: root/stat.c
Commit message (Collapse)AuthorAgeFilesLines
* stat: Work around GNU Hurd bugTavian Barnes2021-12-101-1/+2
| | | | | | | 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
* fsade: Fix msan false positive in bfs_check_acl_type()Tavian Barnes2021-03-281-1/+1
|
* Implement -flags, from FreeBSD findTavian Barnes2021-03-061-0/+14
| | | | This is the last BSD-specific primary I'm aware of. Fixes #14.
* Give messages to unconditional assertion failuresTavian Barnes2020-12-021-2/+2
|
* stat: #include <unistd.h> for syscall() when neededTavian Barnes2020-11-181-0/+1
|
* Include what I useTavian Barnes2020-11-121-1/+0
| | | | Thanks to https://github.com/include-what-you-use/include-what-you-use
* stat: Rename bfs_stat_flag to _flagsTavian Barnes2020-09-181-5/+5
| | | | Flags enums should be plural.
* stat: Check that AT_STATX_DONT_SYNC exists before using itTavian Barnes2019-08-301-0/+3
|
* stat: New BFS_STAT_NOSYNC flagTavian Barnes2019-08-291-0/+3
|
* stat: Treat EPERM like ENOSYS for statx()Tavian Barnes2019-07-051-1/+3
| | | | | | | | | 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
* stat: Get rid of bfs_fstat()Tavian Barnes2019-05-041-8/+10
| | | | We can just use bfs_stat() with a NULL at_path.
* stat: Unify the flags argumentsTavian Barnes2019-05-041-7/+17
|
* Release 1.41.4Tavian Barnes2019-04-151-1/+1
|
* parse: Use a trie to hold currently open filesTavian Barnes2019-03-061-0/+5
|
* stat: Work around msan not knowing about statx()Tavian Barnes2019-01-311-0/+7
|
* stat: s/ENODATA/ENOTSUP, since ENODATA is POSIX-optionalTavian Barnes2019-01-031-3/+3
| | | | Fixes half of #40.
* stat: Provide a helper for getting human-readable field namesTavian Barnes2018-12-251-0/+36
| | | | And fix -newerXY if the Y time doesn't exist.
* stat: Unify bfs_stat_time() implementationsTavian Barnes2018-12-201-1/+24
|
* stat: Handle statx() not returning some timesTavian Barnes2018-12-191-2/+3
| | | | | | /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.
* Print device major/minor numbers for -lsTavian Barnes2018-11-011-2/+7
|
* stat: Support the glibc statx() wrapperTavian Barnes2018-07-111-6/+18
| | | | | | | | | 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
* stat: Handle platforms that don't support AT_EMPTY_PATH for fstatat()Tavian Barnes2018-07-021-3/+12
| | | | | | | | 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
* stat: Don't try to statx() on architectures without the syscallTavian Barnes2018-07-021-2/+2
| | | | | | | | | | 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
* stat: New wrapper around the stat() familyTavian Barnes2018-01-081-0/+243
This lets bfs transparently support the new statx() system call on Linux, giving it access to file birth times.