]> git.ipfire.org Git - thirdparty/systemd.git/commit
core: simplify unit_load() a bit
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 11 Oct 2019 09:10:50 +0000 (11:10 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 11 Oct 2019 09:25:04 +0000 (11:25 +0200)
commitc3784a7d78df9c8f50ce6d14642cf37d412edcc6
tree1312d4750f451ecd7302b4367a8037b754bbc758
parente0cfed4c59ebb1443c21d494ed028cf810c03488
core: simplify unit_load() a bit

Now all unit types define .load. But even if it wasn't defined, we'd need
to call unit_load_fragment_and_dropin() anyway, so this code would not have
worked correctly.

Also, unit_load_fragment_and_dropin() either returns -ENOENT or changes
UNIT_STUB to UNIT_LOADED, so we don't need to repeat this here.
src/core/unit.c