[systemd-devel] [PATCH] clarify message when unit action fails

Andrey Borzenkov arvidjaar at mail.ru
Sat Sep 25 23:27:37 PDT 2010


I was rather surprised to see "Starting of tmp.mount failed"
during shutdown and spent some time searching for wrong dependencies
until I realized that systemd always says "Starting" in this case.

Clarify error message by actually naming action that failed.

Signed-off-by: Andrey Borzenkov <arvidjaar at mail.ru>

---

I tried to rephrase message in the least intrusive way. Not being
native English speaker, I appreciate corrections.

 src/job.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/job.c b/src/job.c
index c219b0d..5d67c3b 100644
--- a/src/job.c
+++ b/src/job.c
@@ -490,7 +490,7 @@ int job_finish_and_invalidate(Job *j, bool success) {
         job_free(j);
 
         if (!success)
-                unit_status_printf(u, "Starting %s " ANSI_HIGHLIGHT_ON "failed" ANSI_HIGHLIGHT_OFF ".\n", unit_description(u));
+                unit_status_printf(u, "Performing %s for %s " ANSI_HIGHLIGHT_ON "failed" ANSI_HIGHLIGHT_OFF ".\n", job_type_to_string(t), unit_description(u));
 
         /* Fail depending jobs on failure */
         if (!success) {
-- 
tg: (4030d7a..) upstream/fix-stop-msg (depends on: master)


More information about the systemd-devel mailing list