summaryrefslogtreecommitdiff
path: root/src/core/job.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-12-12 21:05:32 +0100
committerLennart Poettering <lennart@poettering.net>2014-12-15 19:02:17 +0100
commit0faacd470dfbd24f4c6504da6f04213aa05f9d19 (patch)
tree9b13b654d993efc475f9209f8b1cf602850ee27b /src/core/job.h
parent17d1f37d0dbd2d78b8866e1350c83a9755105144 (diff)
unit: handle nicely of certain unit types are not supported on specific systems
Containers do not really support .device, .automount or .swap units; Systems compiled without support for swap do not support .swap units; Systems without kdbus do not support .busname units. With this change attempts to start a unsupported unit types will result in an immediate "unsupported" job result, which is a lot more descriptive then before. Also, attempts to start device units in containers will now immediately fail instead of causing jobs to be enqueued that never go away.
Diffstat (limited to 'src/core/job.h')
-rw-r--r--src/core/job.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/job.h b/src/core/job.h
index 223ff9cba7..d967b68a3f 100644
--- a/src/core/job.h
+++ b/src/core/job.h
@@ -96,12 +96,13 @@ enum JobMode {
enum JobResult {
JOB_DONE, /* Job completed successfully */
JOB_CANCELED, /* Job canceled by a conflicting job installation or by explicit cancel request */
- JOB_TIMEOUT, /* JobTimeout elapsed */
+ JOB_TIMEOUT, /* Job timeout elapsed */
JOB_FAILED, /* Job failed */
JOB_DEPENDENCY, /* A required dependency job did not result in JOB_DONE */
JOB_SKIPPED, /* Negative result of JOB_VERIFY_ACTIVE */
JOB_INVALID, /* JOB_RELOAD of inactive unit */
JOB_ASSERT, /* Couldn't start a unit, because an assert didn't hold */
+ JOB_UNSUPPORTED, /* Couldn't start a unit, because the unit type is not supported on the system */
_JOB_RESULT_MAX,
_JOB_RESULT_INVALID = -1
};