]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/job.c
core: make unit_start() return a distinguishable error code in case conditions didn...
authorLennart Poettering <lennart@poettering.net>
Wed, 14 Nov 2018 10:38:51 +0000 (11:38 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 16 Nov 2018 14:22:48 +0000 (15:22 +0100)
commit6e64994d690ccc0359a4a9d20fbead2dbfe23836
tree7503a116dce07482d793e89f12cd5e1451021c61
parent0e2b4a822e53be021899fb1def11bf9fd6cb6d67
core: make unit_start() return a distinguishable error code in case conditions didn't hold

Ideally we'd even propagate this all the way to the client, by having a
separate JobType enum value for this. But it's hard to add this without
breaking compat, hence for now let's at least internally propagate this
case differently from the case "already on it".

This is then used to call job_finish_and_invalidate() slightly
differently, with the already= parameter false, as in the failed
condition case no message was likely produced so far.
src/core/job.c
src/core/manager.c
src/core/unit.c