From cd60909b16347c08e5829cbba8cc7535261df03c Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Sun, 3 Mar 2019 10:30:32 +0100 Subject: fbcon: sd_bus_message_read fix #2 --- kbd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'kbd.c') 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; } -- cgit