]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/udev/generate-keyboard-keys-gperf.sh
coccinelle: fix IN_SET/!IN_SET scripts, and apply some changes it found
[thirdparty/systemd.git] / src / udev / generate-keyboard-keys-gperf.sh
CommitLineData
1b833237
MS
1#!/bin/sh -eu
2awk ' BEGIN {
4831981d
SL
3 print "%{\n\
4#if __GNUC__ >= 7\n\
5_Pragma(\"GCC diagnostic ignored \\\"-Wimplicit-fallthrough\\\"\")\n\
6#endif\n\
7%}"
1b833237
MS
8 print "struct key_name { const char* name; unsigned short id; };"
9 print "%null-strings"
10 print "%%"
11 }
12
13 /^KEY_/ { print tolower(substr($1 ,5)) ", " $1 }
c6dce245 14 { print tolower($1) ", " $1 }
1b833237 15' < "$1"