diff options
Diffstat (limited to 'src/core/job.c')
-rw-r--r-- | src/core/job.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/core/job.c b/src/core/job.c index bd63eb16ba..0230f9316b 100644 --- a/src/core/job.c +++ b/src/core/job.c @@ -674,15 +674,13 @@ static void job_print_status_message(Unit *u, JobType t, JobResult result) { break; case JOB_FAILED: { - bool quotes; + _cleanup_free_ char *quoted = NULL; - quotes = chars_intersect(u->id, SHELL_NEED_QUOTES); + quoted = shell_maybe_quote(u->id); manager_flip_auto_status(u->manager, true); unit_status_printf(u, ANSI_HIGHLIGHT_RED_ON "FAILED" ANSI_HIGHLIGHT_OFF, format); - manager_status_printf(u->manager, STATUS_TYPE_NORMAL, NULL, - "See \"systemctl status %s%s%s\" for details.", - quotes ? "'" : "", u->id, quotes ? "'" : ""); + manager_status_printf(u->manager, STATUS_TYPE_NORMAL, NULL, "See 'systemctl status %s' for details.", strna(quoted)); break; } |