projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b518e02
)
Revert "logind: remove unused check"
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Sat, 3 Aug 2019 20:43:34 +0000
(
05:43
+0900)
committer
Yu Watanabe
<watanabe.yu+github@gmail.com>
Sat, 3 Aug 2019 20:44:36 +0000
(
05:44
+0900)
This reverts commit
f2330acda408a34451d5e15380fcdd225a672473
.
Fixes #13255.
src/login/logind-action.c
patch
|
blob
|
history
diff --git
a/src/login/logind-action.c
b/src/login/logind-action.c
index fa92f4870a29090d400ed3f68d29ee5ef694de64..140953eec104afe107b581f6be3e961634d16bef 100644
(file)
--- a/
src/login/logind-action.c
+++ b/
src/login/logind-action.c
@@
-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,