diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/systemctl.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/systemctl.c b/src/systemctl.c index 82741bc6e7..b33a89f63d 100644 --- a/src/systemctl.c +++ b/src/systemctl.c @@ -1248,11 +1248,19 @@ static int wait_for_jobs(DBusConnection *bus, Set *s) { log_error("Job canceled."); else if (streq(d.result, "dependency")) log_error("A dependency job failed. See system logs for details."); - else + else if (!streq(d.result, "done")) log_error("Job failed. See system logs and 'systemctl status' for details."); } - r = d.result ? -EIO : 0; + if (streq_ptr(d.result, "timeout")) + r = -ETIME; + else if (streq_ptr(d.result, "canceled")) + r = -ECANCELED; + else if (!streq_ptr(d.result, "done")) + r = -EIO; + else + r = 0; + free(d.result); finish: |