]> git.ipfire.org Git - thirdparty/systemd.git/commit
stat-util: fix error handling of statx()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 21 Jul 2023 16:07:36 +0000 (01:07 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 21 Jul 2023 17:14:54 +0000 (02:14 +0900)
commitd35ff4b60e4b5ca166aca48afb5bb7fde3275cac
treef1e3a7912da90cdcf33b61e90a07397b3540ee73
parentb80fc61e8971283606f9cd0a48e31d0f701c82f1
stat-util: fix error handling of statx()

When newer glibc is used, but kernel does not support statx(), then
glibc try to fallback with fstatat(). That's quite similar to our
implementation, but the supported flags are different, and if
unsupported flags are specified, it returns EINVAL.

Let's handle the case more gracefully.
src/basic/stat-util.c