summaryrefslogtreecommitdiffstats
path: root/src/stat.c
Commit message (Collapse)AuthorAgeFilesLines
* stat: Remove __GNU__ guardTavian Barnes2024-05-071-1/+1
| | | | | The number of people running bfs on Hurd with an outdated glibc version is vanishingly small (I hope).
* stat: Prefer fstat(fd) to fstatat(fd, "", AT_EMPTY_PATH)Tavian Barnes2024-05-071-19/+13
| | | | | | | | | This lets us get rid of the runtime probe for AT_EMPTY_PATH support, and should be more efficient anyway. We still use statx(fd, "", AT_EMPTY_PATH) if available. Link: https://lore.kernel.org/linux-fsdevel/CAHk-=wiYnnv7Kw7v+Cp2xU6_Fd-qxQMZuuxZ61LgA2=Gtftw-A@mail.gmail.com/
* config: Check for struct stat::st_flagsTavian Barnes2024-04-191-1/+1
|
* config: Check for struct stat::st_{a,c,m,birth}{tim,timespec}Tavian Barnes2024-04-191-4/+7
|
* config: Check for statx()Tavian Barnes2024-04-191-2/+2
|
* Rename config.h to prelude.hTavian Barnes2024-04-191-1/+1
|
* stat: Use errno_is_like(ENOSYS) for EPERM kludgeTavian Barnes2024-02-281-3/+1
|
* stat: Pack struct bfs_stat a bitTavian Barnes2024-02-141-11/+8
|
* stat: Expose bfs_{fstatat,statx}_flags()Tavian Barnes2024-01-181-21/+37
|
* stat: Expose bfs_stat{,x}_convert()Tavian Barnes2024-01-181-95/+88
|
* bfstd: New {error,errno}_is_like() functionsTavian Barnes2024-01-131-1/+1
| | | | | | | We used to have is_nonexistence_error() to consistently treat ENOENT and ENOTDIR the same. Recently, we started considering EFAULT the same as ENAMETOOLONG on DragonFly BSD to work around a kernel bug. Unify both of these behind a more generic interface.
* Formatting fixesTavian Barnes2023-09-271-1/+1
|
* stat: Don't check for statx() mask bits we already checked forTavian Barnes2023-08-071-31/+15
|
* Unify macro naming conventionsTavian Barnes2023-06-241-7/+9
| | | | | In particular, macros that decide whether to use a particular API/ dependency should be spelled BFS_USE_*, and should be configurable.
* stat: Make syscall support checks thread-safeTavian Barnes2023-06-121-6/+7
|
* sanity: Add wrappers for sanitizer interfacesTavian Barnes2023-05-251-8/+10
|
* Use bfs_bug("...") over assert(!"...")Tavian Barnes2023-05-181-3/+3
|
* Use SYS_* instead of __NR_*Tavian Barnes2023-05-161-2/+2
|
* config: Provide <stdalign.h> and <stdbool.h>Tavian Barnes2023-05-111-1/+0
| | | | In anticipation of C23, since those headers won't be necessary any more.
* style: Don't use tabs to indent preprocessor directivesTavian Barnes2023-05-031-5/+5
|
* Replace license boilerplate with SPDX tagsTavian Barnes2023-01-251-15/+2
| | | | | | | And while I'm at it, remove years from copyright declarations. Link: https://spdx.dev/about/ Link: https://daniel.haxx.se/blog/2023/01/08/copyright-without-years/
* tests/xtouch: Add some missing POSIX touch featuresTavian Barnes2022-11-081-7/+0
|
* bfstd: Rename from util and reorganize itTavian Barnes2022-11-061-3/+3
|
* config: Split out some of util.h into a new headerTavian Barnes2022-11-061-4/+1
|
* util: Get rid of BFS_HAS_INCLUDE() wrapper for __has_include()Tavian Barnes2022-11-061-1/+1
| | | | | | | | | Since __has_include() needs special preprocessing rules (e.g. not expanding `linux` in `__has_include(<linux/stat.h>)`, macros that expand to __has_include() do not necessarily behave correctly. Instead, we have to directly test `#if __has_include(...)`. See https://bugs.llvm.org/show_bug.cgi?id=37990 for more details.
* util: Use fewer BFS_*() wrappers for feature testingTavian Barnes2022-11-061-2/+2
|
* stat: Check Android API level for statx() supportTavian Barnes2022-10-181-1/+1
| | | | | | Bionic's <sys/stat.h> can define STATX_BASIC_STATS without declaring statx() on lower API levels, so explicitly check for the version it was added in.
* stat: Don't pass AT_NO_AUTOMOUNT on GNU Hurd before glibc 2.35Tavian Barnes2022-05-291-1/+1
| | | | | Link: https://buildd.debian.org/status/fetch.php?pkg=bfs&arch=hurd-i386&ver=2.6-1&stamp=1653764526 Link: https://sourceware.org/git/?p=glibc.git;a=commit;h=13710e7e6af6c8965cc9a63a0660cb4ce1966557
* stat: Pass AT_NO_AUTOMOUNT if possibleTavian Barnes2022-05-121-0/+4
| | | | | Previously bfs would trigger automounts even when it didn't descend into the mount directory, while GNU find does not.
* stat: Keep statx()-specific flags separateTavian Barnes2022-05-121-8/+9
| | | | | Previously, if statx() was unsupported at runtime, we could end up passing AT_STATX_DONT_SYNC to fstatat() which doesn't expect it.
* stat: Factor the BFS_STAT_TRYFOLLOW retry logic outTavian Barnes2022-05-121-30/+25
|
* stat: Rename some feature detection macrosTavian Barnes2022-05-121-8/+8
|
* Source / Include Folder (#88)トトも2022-04-161-0/+376
Moved Source Files Into `src` Folder