fs-util: make CHASE_WARN effective with CHASE_NO_AUTOFS

This has the side effect to upgrade the log level at which the log is emitted
from debug to warning.

This might be better since after all we didn't apply a tmpfiles.d/ rule and
that actually might end up being problematic eventually.
This commit is contained in:
Franck Bui
2018-12-10 09:22:28 +01:00
parent b85ee2ec95
commit 145b8d0f68
2 changed files with 22 additions and 4 deletions
+4 -3
View File
@@ -2261,11 +2261,12 @@ static int process_item(Item *i, OperationMask operation) {
i->done |= operation;
r = chase_symlinks(i->path, NULL, CHASE_NO_AUTOFS, NULL);
r = chase_symlinks(i->path, NULL, CHASE_NO_AUTOFS|CHASE_WARN, NULL);
if (r == -EREMOTE) {
log_debug_errno(r, "Item '%s' is below autofs, skipping.", i->path);
log_notice_errno(r, "Skipping %s", i->path);
return 0;
} else if (r < 0)
}
if (r < 0)
log_debug_errno(r, "Failed to determine whether '%s' is below autofs, ignoring: %m", i->path);
r = FLAGS_SET(operation, OPERATION_CREATE) ? create_item(i) : 0;