summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2009-09-09 11:09:17 +0200
committerMartin Pitt <martin.pitt@ubuntu.com>2009-09-09 11:09:17 +0200
commit6983c0d0f2e396102118016eb7d9dafb3e193d57 (patch)
tree48270a3b038cb8be1666e05d3bce2c9c633851f7 /Makefile.am
parent78715f65c92a8892960e2a5fce945496939f8599 (diff)
extras/keymap: fix hash table collisions
More than one key name was mapped to the same key, due to linux/input.h defining some aliases (in particular, KEY_HANGUEL, KEY_SCREENLOCK, KEY_MIN_INTERESTING). These caused hash table collisions. Changed the generation of the tables to ignore these aliases, and updated all keymaps to use the canonical name. This was detected by llvm-clang-analyzer. Thanks to Lennart Poettering for doing these checks and pointing this out! https://launchpad.net/bugs/426647
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 61fbf222cb..9f8ca8c3ae 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -528,7 +528,7 @@ dist_udevkeymap_DATA = \
extras/keymap/keymaps/zepto-znote
extras/keymap/keys.txt: /usr/include/linux/input.h
- $(AM_V_GEN)$(AWK) '/^#define.*KEY_/ { if ($$2 != "KEY_MAX" && $$2 != "KEY_CNT") { print $$2 } }' < $< > $@
+ $(AM_V_GEN)$(AWK) '/^#define.*KEY_[^ ]+[[:space:]]+[0-9]/ { if ($$2 != "KEY_MAX") { print $$2 } }' < $< > $@
extras/keymap/keys-from-name.gperf: extras/keymap/keys.txt
$(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print $$1 ", " $$1 }' < $< > $@