keytable: add a way to add all protocols on raw decoders
authorMauro Carvalho Chehab <m.chehab@samsung.com>
Sat, 26 Jul 2014 01:21:00 +0000 (22:21 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Sat, 26 Jul 2014 01:49:04 +0000 (22:49 -0300)
With raw decoders, sometimes it is interesting to be able to
select all decoders, as it helps to use a raw driver to test if
a given IR is producing scancodes.

Add "all" to the list of accepted protocols.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
utils/keytable/keytable.c

index 065ac3b..ceca761 100644 (file)
@@ -471,6 +471,8 @@ static error_t parse_opt(int k, char *arg, struct argp_state *state)
                                ch_proto |= LIRC;
                        else if (!strcasecmp(p,"rc-5-sz"))
                                ch_proto |= RC_5_SZ;
+                       else if (!strcasecmp(p,"all"))
+                               ch_proto |= ~0;
                        else
                                goto err_inval;
                        p = strtok(NULL, ",;");