diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2019-02-01 21:28:57 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2019-02-01 21:28:57 +0100 |
commit | 83a73a82f5c91c0ab223649a0e9af5430cfa3b9a (patch) | |
tree | 77ad3c41f702e9f4e5411b65585c6abce5d1bc59 | |
parent | 60fa59dcfba595feba1f17bb12fb4f44f96f7c16 (diff) | |
download | fbida-83a73a82f5c91c0ab223649a0e9af5430cfa3b9a.tar.gz |
libinput check fix
-rw-r--r-- | fbcon.c | 2 | ||||
-rw-r--r-- | fbi.c | 3 | ||||
-rw-r--r-- | fbpdf.c | 3 |
3 files changed, 5 insertions, 3 deletions
@@ -314,7 +314,7 @@ static void child_exec_shell(struct winsize *win) fprintf(stderr, "\x1b[0m"); /* check for errors */ - if (libinput_deverror != 0) { + if (libinput_deverror != 0 || libinput_devcount == 0) { fprintf(stderr, "ERROR: failed to open input devices (%d ok, %d failed)\n", libinput_devcount, libinput_deverror); return; @@ -1358,7 +1358,8 @@ int main(int argc, char *argv[]) extents = shadow_font_init(fontname); kbd_init(use_libinput, gfx->devnum); - if (use_libinput && libinput_deverror != 0) { + if (use_libinput && (libinput_deverror != 0 || + libinput_devcount == 0)) { fprintf(stderr, "ERROR: failed to open input devices (%d ok, %d failed)\n", libinput_devcount, libinput_deverror); cleanup_and_exit(0); @@ -350,7 +350,8 @@ int main(int argc, char *argv[]) } kbd_init(use_libinput, gfx->devnum); - if (use_libinput && libinput_deverror != 0) { + if (use_libinput && (libinput_deverror != 0 || + libinput_devcount == 0)) { fprintf(stderr, "ERROR: failed to open input devices (%d ok, %d failed)\n", libinput_devcount, libinput_deverror); cleanup_and_exit(0); |