Merge pull request #13258 from yuwata/login-revert-handle-ignore-assertion

Revert "logind: remove unused check"
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2019-08-05 15:43:23 +02:00
committed by GitHub
2 changed files with 7 additions and 3 deletions
+6 -2
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,
+1 -1
View File
@@ -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)