@@ -382,14 +382,16 @@ static int add_keymap(struct keymap *map, const char *fname)
protocol = parse_sysfs_protocol(map->protocol, false);
if (protocol == SYSFS_INVALID) {
- struct bpf_protocol *b;
-
- b = malloc(sizeof(*b));
- b->name = strdup(map->protocol);
- b->param = map->param;
- /* steal param */
- map->param = NULL;
- add_bpf_protocol(b);
+ if (strcmp(map->protocol, "none")) {
+ struct bpf_protocol *b;
+
+ b = malloc(sizeof(*b));
+ b->name = strdup(map->protocol);
+ b->param = map->param;
+ /* steal param */
+ map->param = NULL;
+ add_bpf_protocol(b);
+ }
} else {
ch_proto |= protocol;
}
@@ -2105,11 +2107,6 @@ int main(int argc, char *argv[])
}
add_keymap(map, fname);
free_keymap(map);
- if (!keytable) {
- fprintf(stderr, _("Empty keymap %s\n"), fname);
- free(fname);
- return -1;
- }
free(fname);
clear = 1;
matches++;
new file mode 100644
@@ -0,0 +1,2 @@
+[[protocols]]
+protocol = "none"
The lirc documentation contains some drastic measures for disabling in-kernel decoding. Provide a simpler method of disabling kernel decoding: simply set /etc/rc_maps.cfg to: * * empty.toml Signed-off-by: Sean Young <sean@mess.org> --- utils/keytable/keytable.c | 23 ++++++++----------- .../keytable/rc_keymaps_userspace/empty.toml | 2 ++ 2 files changed, 12 insertions(+), 13 deletions(-) create mode 100644 utils/keytable/rc_keymaps_userspace/empty.toml