]> git.ipfire.org Git - thirdparty/systemd.git/commit
core: change emergency_action() to return void
authorLennart Poettering <lennart@poettering.net>
Mon, 18 Mar 2019 12:20:54 +0000 (13:20 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 18 Mar 2019 15:06:36 +0000 (16:06 +0100)
commit36c4dc089e21e731e7ff5519aa6c636dd55e30e5
tree13802d7e6c734f04fe3a2f3d8bccae9c6d9837c3
parent2de9b9793b91f492141f090dcc89445511e94bd4
core: change emergency_action() to return void

The function so far always returned -ECANCELLED, which is ignored in all
cases the function is invoked, except one: in unit_test_start_limit()
where -ECANCELLED is returned when the start limit is hit, which is part
of unit_start()'s protocol of return values.

Since the emergency_action() logic should be relatively generic and is
used in many places, let's drop the return value from it, since it's
constant anyway, and in alll cases useless. Instead, let's return it in
unit_test_start_limit(), where it's part of the protocol.

No change in behaviour.
src/core/emergency-action.c
src/core/emergency-action.h
src/core/unit.c