projects
/
platform
/
upstream
/
v4l-utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
73c0e1c
)
ir-keytable: Change protocol support if required by a keytable
author
Mauro Carvalho Chehab
<mchehab@redhat.com>
Sun, 11 Apr 2010 00:38:41 +0000
(21:38 -0300)
committer
Mauro Carvalho Chehab
<mchehab@redhat.com>
Sun, 11 Apr 2010 00:38:41 +0000
(21:38 -0300)
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
utils/keytable/keytable.c
patch
|
blob
|
history
diff --git
a/utils/keytable/keytable.c
b/utils/keytable/keytable.c
index
f1d7fe2
..
f9eb500
100644
(file)
--- a/
utils/keytable/keytable.c
+++ b/
utils/keytable/keytable.c
@@
-154,8
+154,14
@@
static error_t parse_keyfile(char *fname, char **table, char **type)
strcpy(*table, p);
} else if (!strcmp(p, "type")) {
p = strtok(NULL,"\n, ");
- *type = malloc(strlen(p) + 1);
- strcpy(*type, p);
+ if (!strcasecmp(p,"rc5") || !strcasecmp(p,"rc-5"))
+ ch_proto |= RC_5;
+ else if (!strcasecmp(p,"rc6") || !strcasecmp(p,"rc-6"))
+ ch_proto |= RC_6;
+ else if (!strcasecmp(p,"nec"))
+ ch_proto |= NEC;
+ else
+ goto err_einval;
} else {
goto err_einval;
}