diff options
author | Ludwig Nussel <ludwig.nussel@suse.de> | 2021-12-15 18:21:09 +0100 |
---|---|---|
committer | Ludwig Nussel <ludwig.nussel@suse.de> | 2022-01-25 17:43:10 +0100 |
commit | 5ed73478e1b1560274038ef30ec6f89022b4d8f6 (patch) | |
tree | 2368956166e235beaf5652aeac7f3330a216e06f /src/login/logind.h | |
parent | ec14fba91c94f38f3d4703fc9b4d7f1316a3922f (diff) | |
download | systemd-5ed73478e1b1560274038ef30ec6f89022b4d8f6.tar.gz |
logind: refactor
Avoid hardcoded strings and string compares related to shutdown actions.
Instead put everything into a common structure. Reuse existing
HandleAction as index since it's already exposed as property for the
button handlers.
Diffstat (limited to 'src/login/logind.h')
-rw-r--r-- | src/login/logind.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/login/logind.h b/src/login/logind.h index 730c14a46a..5647e5069c 100644 --- a/src/login/logind.h +++ b/src/login/logind.h @@ -68,21 +68,17 @@ struct Manager { usec_t inhibit_delay_max; usec_t user_stop_delay; - /* If an action is currently being executed or is delayed, - * this is != 0 and encodes what is being done */ - InhibitWhat action_what; - /* If a shutdown/suspend was delayed due to an inhibitor this - contains the unit name we are supposed to start after the + contains the action we are supposed to start after the delay is over */ - const char *action_unit; + const ActionTableItem *delayed_action; /* If a shutdown/suspend is currently executed, then this is * the job of it */ char *action_job; sd_event_source *inhibit_timeout_source; - char *scheduled_shutdown_type; + const ActionTableItem *scheduled_shutdown_type; usec_t scheduled_shutdown_timeout; sd_event_source *scheduled_shutdown_timeout_source; uid_t scheduled_shutdown_uid; |