summaryrefslogtreecommitdiff
path: root/src/job.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-03-08 01:44:19 +0100
committerLennart Poettering <lennart@poettering.net>2011-03-08 01:53:47 +0100
commitd68201e9aa5e9ebd6085b1bb8892c42e9d20be75 (patch)
treef6d4a0193e7d9fcf78f7df35a022ada939f1ca60 /src/job.c
parent81253930180bac6b6fb372a9c7bea724bd795c86 (diff)
job: introduce new job result code 'skipped' to use when pre conditions of job did not apply
https://bugzilla.redhat.com/show_bug.cgi?id=682245 https://bugzilla.redhat.com/show_bug.cgi?id=635780
Diffstat (limited to 'src/job.c')
-rw-r--r--src/job.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/job.c b/src/job.c
index 206490ffbb..f5d3ff8a3a 100644
--- a/src/job.c
+++ b/src/job.c
@@ -465,6 +465,8 @@ int job_run_and_invalidate(Job *j) {
if ((j = manager_get_job(m, id))) {
if (r == -EALREADY)
r = job_finish_and_invalidate(j, JOB_DONE);
+ else if (r == -ENOEXEC)
+ r = job_finish_and_invalidate(j, JOB_SKIPPED);
else if (r == -EAGAIN)
j->state = JOB_WAITING;
else if (r < 0)
@@ -702,7 +704,8 @@ static const char* const job_result_table[_JOB_RESULT_MAX] = {
[JOB_CANCELED] = "canceled",
[JOB_TIMEOUT] = "timeout",
[JOB_FAILED] = "failed",
- [JOB_DEPENDENCY] = "dependency"
+ [JOB_DEPENDENCY] = "dependency",
+ [JOB_SKIPPED] = "skipped"
};
DEFINE_STRING_TABLE_LOOKUP(job_result, JobResult);