From: Lennart Poettering Date: Tue, 9 Feb 2016 19:47:45 +0000 (+0100) Subject: core: clarify which unit file is masked in error message X-Git-Tag: v229~20^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2565%2Fhead;p=thirdparty%2Fsystemd.git core: clarify which unit file is masked in error message After all, the masked unit file error might be returned when enqueuing a unit that is not masked but requires a masked unit. In this case it should really be clear which unit is meant here. --- diff --git a/src/core/dbus-unit.c b/src/core/dbus-unit.c index d7929e55668..7b0ae03228f 100644 --- a/src/core/dbus-unit.c +++ b/src/core/dbus-unit.c @@ -1266,10 +1266,10 @@ int bus_unit_check_load_state(Unit *u, sd_bus_error *error) { * possible. Note that in the case of UNIT_MASKED, load_error * is not set. */ if (u->load_state == UNIT_MASKED) - return sd_bus_error_setf(error, BUS_ERROR_UNIT_MASKED, "Unit is masked."); + return sd_bus_error_setf(error, BUS_ERROR_UNIT_MASKED, "Unit %s is masked.", u->id); if (u->load_state == UNIT_NOT_FOUND) - return sd_bus_error_setf(error, BUS_ERROR_NO_SUCH_UNIT, "Unit not found."); + return sd_bus_error_setf(error, BUS_ERROR_NO_SUCH_UNIT, "Unit %s not found.", u->id); - return sd_bus_error_set_errnof(error, u->load_error, "Unit is not loaded properly: %m."); + return sd_bus_error_set_errnof(error, u->load_error, "Unit %s is not loaded properly: %m.", u->id); }