diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2019-03-03 10:30:32 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2019-03-03 10:30:32 +0100 |
commit | cd60909b16347c08e5829cbba8cc7535261df03c (patch) | |
tree | f2ff695ad5944fdb5aabdf5b93f809250f253d0c /kbd.c | |
parent | 6629a1b23f31018caecf2d56d9f8bb1052e1c140 (diff) | |
download | fbida-cd60909b16347c08e5829cbba8cc7535261df03c.tar.gz |
fbcon: sd_bus_message_read fix #2
Diffstat (limited to 'kbd.c')
-rw-r--r-- | kbd.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; } |