]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/unit: do not check for unreachable job type
authorMike Yuan <me@yhndnzj.com>
Thu, 18 Dec 2025 19:12:16 +0000 (20:12 +0100)
committerMike Yuan <me@yhndnzj.com>
Wed, 31 Dec 2025 18:33:19 +0000 (19:33 +0100)
Refer to 7cb0030f6cec6c0a83c7c11ecc4adfb55aaf0e0b for the rationale.

src/core/unit.c

index 4287179903e37b51a34d4b289b31c9872906e7f0..3fefa519fbd0e00a0156723e0c2512e2e2533546 100644 (file)
@@ -3927,8 +3927,7 @@ bool unit_active_or_pending(Unit *u) {
         if (UNIT_IS_ACTIVE_OR_ACTIVATING(unit_active_state(u)))
                 return true;
 
-        if (u->job &&
-            IN_SET(u->job->type, JOB_START, JOB_RELOAD_OR_START, JOB_RESTART))
+        if (u->job && IN_SET(u->job->type, JOB_START, JOB_RESTART))
                 return true;
 
         return false;