mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-02-09 09:57:26 +03:00
dropin: downgrade logging about paths we cannot canonicalize
After all, most units won't have drop-in dirs, hence there's no point in logging about that. Fixes: #5252
This commit is contained in:
parent
9c0f732c62
commit
09c624878a
@ -43,11 +43,10 @@
|
||||
int drop_in_file(const char *dir, const char *unit, unsigned level,
|
||||
const char *name, char **_p, char **_q) {
|
||||
|
||||
char prefix[DECIMAL_STR_MAX(unsigned)];
|
||||
_cleanup_free_ char *b = NULL;
|
||||
char *p, *q;
|
||||
|
||||
char prefix[DECIMAL_STR_MAX(unsigned)];
|
||||
|
||||
assert(unit);
|
||||
assert(name);
|
||||
assert(_p);
|
||||
@ -128,9 +127,10 @@ static int unit_file_find_dir(
|
||||
assert(path);
|
||||
|
||||
r = chase_symlinks(path, original_root, 0, &chased);
|
||||
if (r == -ENOENT) /* Ignore -ENOENT, after all most units won't have a drop-in dir */
|
||||
return 0;
|
||||
if (r < 0)
|
||||
return log_full_errno(r == -ENOENT ? LOG_DEBUG : LOG_WARNING,
|
||||
r, "Failed to canonicalize path %s: %m", path);
|
||||
return log_full_errno(LOG_WARNING, r, "Failed to canonicalize path %s: %m", path);
|
||||
|
||||
r = strv_push(dirs, chased);
|
||||
if (r < 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user