summaryrefslogtreecommitdiff
path: root/src/login/logind-action.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-10-10 09:49:28 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-10-10 09:58:47 +0200
commitbf135d82585f9a6356fa818fe4c130d3e3524918 (patch)
tree61792133f6126cdcca01ca21074a167a5b5c7e26 /src/login/logind-action.c
parentd2ec13fa8ae25fa11340c6bba8832db082af2cc5 (diff)
downloadsystemd-bf135d82585f9a6356fa818fe4c130d3e3524918.tar.gz
logind: print what action is ignored
My logs have lines like this: Oct 10 09:38:38 krowka systemd-logind[1889]: External (2) displays connected. Oct 10 09:38:38 krowka systemd-logind[1889]: Refusing operation, as it is turned off. Without some hint *what* operation is ignored, this is not very informative. (I remember this came up before, but I don't remember why we didn't change this log line back then...)
Diffstat (limited to 'src/login/logind-action.c')
-rw-r--r--src/login/logind-action.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/login/logind-action.c b/src/login/logind-action.c
index 140953eec1..1aeacfaf2b 100644
--- a/src/login/logind-action.c
+++ b/src/login/logind-action.c
@@ -64,7 +64,9 @@ int manager_handle_action(
/* If the key handling is turned off, don't do anything */
if (handle == HANDLE_IGNORE) {
- log_debug("Refusing operation, as it is turned off.");
+ log_debug("Handling of %s (%s) is disabled, taking no action.",
+ inhibit_key == 0 ? "idle timeout" : inhibit_what_to_string(inhibit_key),
+ is_edge ? "edge" : "level");
return 0;
}