commit 6f88c9e
Michael Forney
·
2013-12-21 21:47:03 +0000 UTC
parent 9495eec
xkb: Use posix_fallocate instead of ftruncate
1 files changed,
+1,
-1
+1,
-1
1@@ -113,7 +113,7 @@ bool swc_xkb_update_keymap(struct swc_xkb * xkb)
2
3 unlink(keymap_path);
4
5- if (ftruncate(xkb->keymap.fd, xkb->keymap.size) == -1)
6+ if (posix_fallocate(xkb->keymap.fd, 0, xkb->keymap.size) != 0)
7 {
8 printf("could not resize XKB keymap file\n");
9 goto error_fd;