Merge pull request #13258 from yuwata/login-revert-handle-ignore-assertion
Revert "logind: remove unused check"
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -339,7 +339,7 @@ int button_open(Button *b) {
|
||||
return log_error_errno(errno, "Failed to get input name for %s: %m", p);
|
||||
|
||||
(void) button_set_mask(b->name, fd);
|
||||
|
||||
|
||||
b->io_event_source = sd_event_source_unref(b->io_event_source);
|
||||
r = sd_event_add_io(b->manager->event, &b->io_event_source, fd, EPOLLIN, button_dispatch, b);
|
||||
if (r < 0)
|
||||
|
||||
Reference in New Issue
Block a user