1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-28 20:25:38 +03:00

Revert "logind: remove unused check"

This reverts commit f2330acda4.

Fixes #13255.
This commit is contained in:
Yu Watanabe 2019-08-04 05:43:34 +09:00
parent b518e02661
commit 18f689b1fa

View File

@ -61,8 +61,12 @@ int manager_handle_action(
int r;
assert(m);
/* We should be called only with valid actions different than HANDLE_IGNORE. */
assert(handle > HANDLE_IGNORE && handle < _HANDLE_ACTION_MAX);
/* If the key handling is turned off, don't do anything */
if (handle == HANDLE_IGNORE) {
log_debug("Refusing operation, as it is turned off.");
return 0;
}
if (inhibit_key == INHIBIT_HANDLE_LID_SWITCH) {
/* If the last system suspend or startup is too close,