core: use bus_unit_validate_load_state() for generating LoadError unit bus property
authorLennart Poettering <lennart@poettering.net>
Fri, 1 Jun 2018 15:32:54 +0000 (17:32 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 11 Jun 2018 10:53:12 +0000 (12:53 +0200)
commitfd1e3fd8defc280595b98d9f60047d8953251ec8
tree61a6d0a4fc2412c14cbf85280399f34e735e5e0a
parente49da001c466d0d70ec5fb727bb6b886ba595c0f
core: use bus_unit_validate_load_state() for generating LoadError unit bus property

The load_error is only valid in some load_state cases, lets generate
prettier messages for other cases too, by reusing the
bus_unit_validate_load_state() call which does jus that.

Clients (such as systemctl) ignored LoadError unles LoadState was
"error" before. With this change they could even show LoadError in other
cases and it would show a useful name.
src/core/dbus-unit.c