diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-11-06 13:43:45 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-11-06 14:21:11 +0100 |
commit | 59fccdc587bc179c1638916ee16a24099f94f81f (patch) | |
tree | 65e65016e68023b5ff9d5d4327e1abc06ffd3756 /src/core/condition.c | |
parent | cc50ef134b4104cae8783a4ca40b1a70247e3ef9 (diff) |
core: introduce the concept of AssertXYZ= similar to ConditionXYZ=, but fatal for a start job if not met
Diffstat (limited to 'src/core/condition.c')
-rw-r--r-- | src/core/condition.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/condition.c b/src/core/condition.c index 8475258679..c20c0f01e1 100644 --- a/src/core/condition.c +++ b/src/core/condition.c @@ -22,7 +22,7 @@ #include "condition.h" #include "unit.h" -bool condition_test_list(const char *unit, Condition *first) { +bool condition_test_list(const char *unit, Condition *first, const char *(*to_string)(ConditionType t)) { Condition *c; int triggered = -1; @@ -40,7 +40,7 @@ bool condition_test_list(const char *unit, Condition *first) { if (r < 0) log_warning_unit(unit, "Couldn't determine result for %s=%s%s%s for %s, assuming failed: %s", - condition_type_to_string(c->type), + to_string(c->type), c->trigger ? "|" : "", c->negate ? "!" : "", c->parameter, @@ -49,7 +49,7 @@ bool condition_test_list(const char *unit, Condition *first) { else log_debug_unit(unit, "%s=%s%s%s %s for %s.", - condition_type_to_string(c->type), + to_string(c->type), c->trigger ? "|" : "", c->negate ? "!" : "", c->parameter, |