core: make use of unit_active_or_pending() where we can
authorLennart Poettering <lennart@poettering.net>
Tue, 21 Nov 2017 09:10:28 +0000 (10:10 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 21 Nov 2017 10:01:34 +0000 (11:01 +0100)
commite68537f0ba1a4433ecdf58e609b1701ed7091abc
tree5ad8004795648626cb31a2923e88e846a57f6fa9
parent49d5666cc500d0efa2fd800403ac735707f976ed
core: make use of unit_active_or_pending() where we can

Let's make use of unit_active_or_pending() where we can. Note that this
change changes beaviour in one specific case: when shutdown.target is
active we'll now also return that the system is in "stopping" state, not
only when we try to get into it. That makes sense as shutdown.target is
ordered before the actually shutdown units such as
"systemd-poweroff.service", and if the state is queried between reaching
those we should also report "stopping".
src/core/manager.c