core/load-droping: avoid oom warning when the unit symlink is not a template
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 20 May 2017 23:34:50 +0000 (19:34 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 20 May 2017 23:34:50 +0000 (19:34 -0400)
commite450032f0990067c0076068774162265db99d22c
treec79b1211068f52cc9bb98fec660182647b6e70df
parent4417e1a33d49fecb176882f394520c278962c88c
core/load-droping: avoid oom warning when the unit symlink is not a template

unit_name_template returns -EINVAL if the unit name is not a template, but
the code assumed that OOM is the only failure mode. Fix that to emit the warning
if a non-template unit is encountered (because in this case we expect the name
to match exactly), and just skip the warning on other errors (presumably oom).

Fixes #5543.
src/core/load-dropin.c