aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2019-03-03 10:30:32 +0100
committerGerd Hoffmann <kraxel@redhat.com>2019-03-03 10:30:32 +0100
commitcd60909b16347c08e5829cbba8cc7535261df03c (patch)
treef2ff695ad5944fdb5aabdf5b93f809250f253d0c
parent6629a1b23f31018caecf2d56d9f8bb1052e1c140 (diff)
downloadfbida-cd60909b16347c08e5829cbba8cc7535261df03c.tar.gz
fbcon: sd_bus_message_read fix #2
-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;
}