summaryrefslogtreecommitdiff
path: root/src/linux/statx.c
AgeCommit message (Collapse)AuthorLines
2024-09-13statx: fix uninitialized attributes/mask in fallback pathRich Felker-1/+1
commit b817541f1cfd38e4b81257b3215e276ea9d0fc61 introduced statx with a fallback using fstatat, but failed to fill in stx_rdev_major/minor and stx_attributes[_mask]. the rdev omission has been addressed separately. rather than explicitly zeroing the attributes and their mask, pre-fill the entire structure with zeros. this will also cover the padding adjacent to stx_mode, in case it's ever used in the future. explicit zeroing of stx_btime is removed since, with this change, it will already be pre-zeroed. as an aside, zeroing it was not strictly necessary, since STATX_BASIC_STATS does not include STATX_BTIME and thus does not indicate any validity for it.
2024-09-13statx: fix ENOSYS emulation not setting stx_rdev_*Gabriel Ravier-0/+2
The current implementation of the statx function fails to set the values of stx->stx_rdev_major and stx->stx_rdev_minor if the statx syscall fails with ENOSYS and thus the statx function has to fall back on fstatat-based emulation.
2024-02-24add statx interface using syscall, fallback to fstatatDuncan Bellamy-0/+42