chattr-util: fix error code

Follow-up for cf91b9155c.
This commit is contained in:
Yu Watanabe
2024-02-16 00:25:37 +09:00
parent bec1383623
commit 59a4e17249
+1 -1
View File
@@ -31,7 +31,7 @@ int chattr_full(
fd = xopenat(dir_fd, path, O_RDONLY|O_CLOEXEC|O_NOCTTY|O_NOFOLLOW, /* xopen_flags = */ 0, /* mode = */ 0);
if (fd < 0)
return -errno;
return fd;
if (fstat(fd, &st) < 0)
return -errno;