aboutsummaryrefslogtreecommitdiffstats
path: root/kbd.c
diff options
context:
space:
mode:
Diffstat (limited to 'kbd.c')
-rw-r--r--kbd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kbd.c b/kbd.c
index ddbce01..e97c91c 100644
--- a/kbd.c
+++ b/kbd.c
@@ -277,15 +277,15 @@ int logind_open(const char *path)
inactive = -1;
r = sd_bus_message_read(m, "hb", &handle, &inactive);
if (r < 0) {
- fprintf(stderr, "Parsing TakeDevice reply failed: %s\n", strerror(-r));
fd = -1;
+ fprintf(stderr, "Parsing TakeDevice reply failed: %s\n", strerror(-r));
} else {
fd = fcntl(handle, F_DUPFD_CLOEXEC, 0);
+ fprintf(stderr, "open %s: got fd %d via logind.\n",
+ path, fd, handle, inactive);
}
sd_bus_message_unref(m);
- fprintf(stderr, "open %s: got fd %d via logind.\n",
- path, fd, handle, inactive);
return fd;
}