diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-02-24 21:36:09 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-04-12 13:43:30 +0200 |
commit | 2c289ea8332a2c0777d8940058ff7a6293f59b6c (patch) | |
tree | ff77eb03f3e9a5f4e39c73b85d122f5abaa0ac45 /src/core/manager.c | |
parent | 463d0d15690c7abe2172a23ae23c5547693dd71f (diff) |
core: introduce MANAGER_IS_RELOADING() macro
This replaces the old function call manager_is_reloading_or_reexecuting() which
was used only at very few places. Use the new macro wherever we check whether
we are reloading. This should hopefully make things a bit more readable, given
the nature of Manager:n_reloading being a counter.
Diffstat (limited to 'src/core/manager.c')
-rw-r--r-- | src/core/manager.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/core/manager.c b/src/core/manager.c index 1412d6718a..b3c3445f2c 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -2115,7 +2115,7 @@ void manager_send_unit_audit(Manager *m, Unit *u, int type, bool success) { /* Don't generate audit events if the service was already * started and we're just deserializing */ - if (m->n_reloading > 0) + if (MANAGER_IS_RELOADING(m)) return; if (u->type != UNIT_SERVICE) @@ -2149,7 +2149,7 @@ void manager_send_unit_plymouth(Manager *m, Unit *u) { /* Don't generate plymouth events if the service was already * started and we're just deserializing */ - if (m->n_reloading > 0) + if (MANAGER_IS_RELOADING(m)) return; if (!MANAGER_IS_SYSTEM(m)) @@ -2572,12 +2572,6 @@ int manager_reload(Manager *m) { return r; } -bool manager_is_reloading_or_reexecuting(Manager *m) { - assert(m); - - return m->n_reloading != 0; -} - void manager_reset_failed(Manager *m) { Unit *u; Iterator i; @@ -2674,7 +2668,7 @@ static void manager_notify_finished(Manager *m) { void manager_check_finished(Manager *m) { assert(m); - if (m->n_reloading > 0) + if (MANAGER_IS_RELOADING(m)) return; /* Verify that we are actually running currently. Initially |