chiark / gitweb /
condition: record test state internally and beef it up to be a full enum
[elogind.git] / src / core / condition.c
index d8d11528eca33a90c59c9527c76cdf1a41960714..84752586796db20c2c20740a0705b7b47bc61873 100644 (file)
@@ -53,11 +53,9 @@ bool condition_test_list(const char *unit, Condition *first) {
                                        c->trigger ? "|" : "",
                                        c->negate ? "!" : "",
                                        c->parameter,
-                                       r > 0 ? "succeeded" : "failed",
+                                       condition_result_to_string(c->result),
                                        unit);
 
-                c->state = r > 0 ? CONDITION_STATE_SUCCEEDED : CONDITION_STATE_FAILED;
-
                 if (!c->trigger && r <= 0)
                         return false;