Commit Graph

3 Commits

Author SHA1 Message Date
Josh Megnauth 02f766b8df Add more 'open' tests 2026-01-24 15:34:24 -07:00
Josh Megnauth 8e5937ca25 Implement posix_fallocate
`posix_fallocate` ensures that a byte range in a file is allocated so
that subsequent writes don't fail. Unlike ftruncate, posix_fallocate
does not shrink files.

The Linux syscall fallocate is similar to posix_fallocate except with
far more control over how byte ranges are allocated (e.g. it supports
file holes and other features). This MR doesn't implement fallocate as
it requires syscall and redoxfs support.

Finally, I changed the flags for flock from usize to c_int. That matches
what we have in libc and also avoids some silly, needless type casting.
2025-11-28 19:49:21 -05:00
Jeremy Soller 393489b38b Add wcswidth and test 2022-12-16 17:39:06 -07:00