mirror of
https://github.com/systemd/systemd
synced 2024-09-30 05:15:19 +00:00
tmpfiles: improve debug logging around O_NOATIME fallback
This commit is contained in:
parent
6f77039e97
commit
4f25330d87
|
@ -547,14 +547,13 @@ static DIR* xopendirat_nomod(int dirfd, const char *path) {
|
||||||
return dir;
|
return dir;
|
||||||
|
|
||||||
if (!IN_SET(errno, ENOENT, ELOOP))
|
if (!IN_SET(errno, ENOENT, ELOOP))
|
||||||
log_debug_errno(errno, "Cannot open %sdirectory \"%s\": %m", dirfd == AT_FDCWD ? "" : "sub", path);
|
log_debug_errno(errno, "Cannot open %sdirectory \"%s\" with O_NOATIME: %m", dirfd == AT_FDCWD ? "" : "sub", path);
|
||||||
|
if (!ERRNO_IS_PRIVILEGE(errno))
|
||||||
if (errno != EPERM)
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
dir = xopendirat(dirfd, path, O_NOFOLLOW);
|
dir = xopendirat(dirfd, path, O_NOFOLLOW);
|
||||||
if (!dir)
|
if (!dir)
|
||||||
log_debug_errno(errno, "Cannot open %sdirectory \"%s\": %m", dirfd == AT_FDCWD ? "" : "sub", path);
|
log_debug_errno(errno, "Cannot open %sdirectory \"%s\" with or without O_NOATIME: %m", dirfd == AT_FDCWD ? "" : "sub", path);
|
||||||
|
|
||||||
return dir;
|
return dir;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue