mirror of
https://gitlab.freedesktop.org/libevdev/libevdev.git
synced 2025-12-20 08:00:09 +01:00
Match the kernel define for SYN_MAX
Will be defined as 0xf in 3.12, see http://git.kernel.org/cgit/linux/kernel/git/dtor/input.git/commit/?h=next&id=52764fed5049655926bcecaefd52f0a415ceb105 And add the required ifdef guards for kernels before that. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
0b712e6f86
commit
75b66c1fb5
2 changed files with 3 additions and 11 deletions
|
|
@ -103,7 +103,9 @@ def print_mapping_table(bits):
|
|||
print("#ifndef EVENT_NAMES_H")
|
||||
print("#define EVENT_NAMES_H")
|
||||
print("")
|
||||
print("#define SYN_MAX 3 /* linux/input.h doesn't define that */")
|
||||
print("#ifndef SYN_MAX /* added in 3.12 */")
|
||||
print("#define SYN_MAX 0xf")
|
||||
print("#endif")
|
||||
print("")
|
||||
|
||||
for prefix in prefixes:
|
||||
|
|
|
|||
|
|
@ -39,15 +39,6 @@ START_TEST(test_limits)
|
|||
}
|
||||
END_TEST
|
||||
|
||||
START_TEST(test_syn_max)
|
||||
{
|
||||
ck_assert_msg(libevdev_get_event_code_name(EV_SYN, 4) == NULL,
|
||||
"If this test fails, update SYN_MAX and implement new functionality");
|
||||
}
|
||||
END_TEST
|
||||
|
||||
|
||||
|
||||
START_TEST(test_type_name)
|
||||
{
|
||||
ck_assert_str_eq(libevdev_get_event_type_name(EV_SYN), "EV_SYN");
|
||||
|
|
@ -281,7 +272,6 @@ event_name_suite(void)
|
|||
|
||||
TCase *tc = tcase_create("type limits");
|
||||
tcase_add_test(tc, test_limits);
|
||||
tcase_add_test(tc, test_syn_max);
|
||||
tcase_add_test(tc, test_event_type_max);
|
||||
suite_add_tcase(s, tc);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue