From 7f66b026bbdda6bd3ddf7f617bf2c3a475e4a665 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 1 Jun 2018 19:04:37 +0200 Subject: [PATCH] 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. --- src/core/unit.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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)); } } -- 2.47.3