]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/sleep/sleep.c
sleep: use SleepOperation enum everywhere and drop sleep_settings()
authorLennart Poettering <lennart@poettering.net>
Fri, 21 May 2021 16:23:42 +0000 (18:23 +0200)
committerLennart Poettering <lennart@poettering.net>
Sat, 22 May 2021 09:00:00 +0000 (11:00 +0200)
commitc8cd8ca398608aabe510f24ab5187ceb643600bd
tree0b80c50fefe42bb61ce7f43ac9001474f27a9d81
parentbe2a4b0d7e49d766742b1c7f991563d6dcb95c85
sleep: use SleepOperation enum everywhere and drop sleep_settings()

Instead of comparing strings everywhere, let's use the new enum. This
allows us to drop sleep_settings(), since the operation enum can be
directly used as index into the config settings.

Some minor other refactoring is done, but mostly just shifting thing
around a bit, no actual change in behaviour.
src/login/logind-action.c
src/login/logind-dbus.c
src/shared/sleep-config.c
src/shared/sleep-config.h
src/sleep/sleep.c
src/test/test-sleep.c