mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-07 13:29:49 -05:00
Merge remote-tracking branch 'upstream/master' into output-damage
This commit is contained in:
commit
1ee61dbd0f
11 changed files with 87 additions and 26 deletions
|
|
@ -215,13 +215,13 @@ void wlr_keyboard_set_keymap(struct wlr_keyboard *kb,
|
|||
}
|
||||
kb->keymap_fd = os_create_anonymous_file(kb->keymap_size);
|
||||
if (kb->keymap_fd < 0) {
|
||||
wlr_log(L_ERROR, "creating a keymap file for %lu bytes failed", kb->keymap_size);
|
||||
wlr_log(L_ERROR, "creating a keymap file for %zu bytes failed", kb->keymap_size);
|
||||
goto err;
|
||||
}
|
||||
void *ptr = mmap(NULL, kb->keymap_size,
|
||||
PROT_READ | PROT_WRITE, MAP_SHARED, kb->keymap_fd, 0);
|
||||
if (ptr == (void*)-1) {
|
||||
wlr_log(L_ERROR, "failed to mmap() %lu bytes", kb->keymap_size);
|
||||
wlr_log(L_ERROR, "failed to mmap() %zu bytes", kb->keymap_size);
|
||||
goto err;
|
||||
}
|
||||
strcpy(ptr, keymap_str);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue