From: Lennart Poettering Date: Fri, 1 Jun 2018 17:04:37 +0000 (+0200) Subject: core: when we can't enqueue OnFailure= job show full error message X-Git-Tag: v239~146^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7f66b026bbdda6bd3ddf7f617bf2c3a475e4a665;p=thirdparty%2Fsystemd.git core: when we can't enqueue OnFailure= job show full error message Let's ask for the full error message and show it, there's really no reason to just show the crappy errno error. --- diff --git a/src/core/unit.c b/src/core/unit.c index 2567365937f..693d726922b 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -2126,6 +2126,7 @@ void unit_start_on_failure(Unit *u) { Unit *other; Iterator i; void *v; + int r; assert(u); @@ -2135,11 +2136,11 @@ void unit_start_on_failure(Unit *u) { log_unit_info(u, "Triggering OnFailure= dependencies."); HASHMAP_FOREACH_KEY(v, other, u->dependencies[UNIT_ON_FAILURE], i) { - int r; + _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL; - r = manager_add_job(u->manager, JOB_START, other, u->on_failure_job_mode, NULL, NULL); + r = manager_add_job(u->manager, JOB_START, other, u->on_failure_job_mode, &error, NULL); if (r < 0) - log_unit_error_errno(u, r, "Failed to enqueue OnFailure= job: %m"); + log_unit_warning_errno(u, r, "Failed to enqueue OnFailure= job, ignoring: %s", bus_error_message(&error, r)); } }