chiark / gitweb /
systemd,systemctl: export condition status and show failing condition
[elogind.git] / src / core / unit.c
index f4f92f0fcaf7ff6853030f80b9e5e3e0bb2f6aaf..0e9329f8c9b1e993ef67b3f6d103ac00a7dc35a7 100644 (file)
@@ -996,7 +996,7 @@ bool unit_condition_test(Unit *u) {
         assert(u);
 
         dual_timestamp_get(&u->condition_timestamp);
-        u->condition_result = condition_test_list(u->conditions);
+        u->condition_result = condition_test_list(u->id, u->conditions);
 
         return u->condition_result;
 }
@@ -1125,7 +1125,8 @@ int unit_start(Unit *u) {
         }
 
         /* Forward to the main object, if we aren't it. */
-        if ((following = unit_following(u))) {
+        following = unit_following(u);
+        if (following) {
                 log_debug_unit(u->id, "Redirecting start request from %s to %s.",
                                u->id, following->id);
                 return unit_start(following);