ir-keytable: Prints error if get key fails
authorMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 23 Jan 2011 15:12:55 +0000 (13:12 -0200)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 23 Jan 2011 15:12:55 +0000 (13:12 -0200)
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
utils/keytable/keytable.c

index ae8922076df80ac032af30077e1c65cafd5c6065..354de0689663aa49621df265f229e60c03f8b859 100644 (file)
@@ -1210,6 +1210,8 @@ static void display_table(struct rc_device *rc_dev, int fd)
                        codes[0] = (j << 8) | i;
                        if (!ioctl(fd, EVIOCGKEYCODE, codes) && codes[1] != KEY_RESERVED)
                                prtcode(codes);
+                       else
+                               perror("EVIOCGKEYCODE");
                }
        }
        display_proto(rc_dev);