V1 always use u_int32_t. V2 can use different lengths, but,
currently, the tool is not ready for bigger code sizes.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
#endif
struct keytable {
- int codes[2];
+ u_int32_t codes[2];
struct input_keymap_entry_v2 keymap;
struct keytable *next;
};
static void clear_table(int fd)
{
int i, j;
- int codes[2];
+ u_int32_t codes[2];
struct input_keymap_entry_v2 entry;
/* Clears old table */
do {
entry.flags = KEYMAP_BY_INDEX;
entry.index = i;
+ entry.len = sizeof(u_int32_t);
if (ioctl(fd, EVIOCGKEYCODE_V2, &entry) == -1)
break;