mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-11 05:17:44 +03:00
systemctl: properly handle job results
This commit is contained in:
parent
c0daa706d3
commit
8e20e31a65
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user