chase: port to statx()

In one of the next commits we want to acquire .stx_mnt_id from statx()
for each inode we traverse (plain fstat() doesn't provide that field).
Hence let's port chase() over to statx() as preparation for that.

No change in behaviour.
This commit is contained in:
Lennart Poettering
2026-03-03 08:48:01 +01:00
parent 004e60e0fc
commit c8031ff37e
3 changed files with 86 additions and 44 deletions
+1 -1
View File
@@ -2633,7 +2633,7 @@ static int rm_if_wrong_type_safe(
}
/* Fail before removing anything if this is an unsafe transition. */
if (follow_links && unsafe_transition(parent_st, &st)) {
if (follow_links && stat_unsafe_transition(parent_st, &st)) {
(void) fd_get_path(parent_fd, &parent_name);
return log_error_errno(SYNTHETIC_ERRNO(ENOLINK),
"Unsafe transition from \"%s\" to \"%s\".", parent_name ?: "...", name);