]> git.ipfire.org Git - thirdparty/systemd.git/commit
dirent-util: use statx() in readdir_ensure_type()
authorLennart Poettering <lennart@poettering.net>
Thu, 7 Oct 2021 20:55:20 +0000 (22:55 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 7 Oct 2021 21:13:40 +0000 (23:13 +0200)
commit3214129369a0daa6558565a93aa17eb8ada69bc3
tree98c1133fc49b698f452407e11bc8f3bbf1da9ed2
parentba24ef86e7e3a8b9b3b03108c097142e503e1fd6
dirent-util: use statx() in readdir_ensure_type()

Let's ask exactly for the one field we actually want to know, i.e.
STATX_TYPE.

(While we are at it, also copy over the inode number, if we have it,
simply to report the most recent info we have)

(Also, see AT_NO_AUTOMOUNT, so that we don't trigger automounts here.
After all, if we want to know the inode type of a dirent here, then
there's not need to trigger the automount, the inode type is not going
to change by that.)
src/basic/dirent-util.c