From: Lennart Poettering Date: Wed, 21 Mar 2018 18:08:46 +0000 (+0100) Subject: dropin: don't fully suppress logging about ENAMETOOLONG. Just downgrade to LOG_DEBUG X-Git-Tag: v239~415^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=952713b07a85fe1b1f645659b872abeaf71e2f11;p=thirdparty%2Fsystemd.git dropin: don't fully suppress logging about ENAMETOOLONG. Just downgrade to LOG_DEBUG --- diff --git a/src/shared/dropin.c b/src/shared/dropin.c index 9544cab0b07..7719059624c 100644 --- a/src/shared/dropin.c +++ b/src/shared/dropin.c @@ -115,14 +115,16 @@ static int unit_file_find_dir( assert(path); r = chase_symlinks(path, original_root, 0, &chased); - /* Ignore -ENOENT, after all most units won't have a drop-in dir. - * Also ignore -ENAMETOOLONG, users are not even able to create - * the drop-in dir in such case. This mostly happens for device units with long /sys path. - * */ - if (IN_SET(r, -ENOENT, -ENAMETOOLONG)) + if (r == -ENOENT) /* Ignore -ENOENT, after all most units won't have a drop-in dir. */ return 0; + if (r == -ENAMETOOLONG) { + /* Also, ignore -ENAMETOOLONG but log about it. After all, users are not even able to create the + * drop-in dir in such case. This mostly happens for device units with an overly long /sys path. */ + log_debug_errno(r, "Path '%s' too long, couldn't canonicalize, ignoring.", path); + return 0; + } if (r < 0) - return log_full_errno(LOG_WARNING, r, "Failed to canonicalize path %s: %m", path); + return log_warning_errno(r, "Failed to canonicalize path '%s': %m", path); r = strv_push(dirs, chased); if (r < 0)