Commit graph

4 commits

Author SHA1 Message Date
Andreas Kling
4277e2d58f Kernel: Add some spec links and comments to sys$posix_fallocate() 2022-11-29 11:09:19 +01:00
Andreas Kling
961e1e590b Kernel: Make sys$posix_fallocate() fail with ENODEV on non-regular files
Previously we tried to determine if `fd` refers to a non-regular file by
doing a stat() operation on the file.

This didn't work out very well since many File subclasses don't
actually implement stat() but instead fall back to failing with EBADF.

This patch fixes the issue by checking for regular files with
File::is_regular_file() instead.
2022-11-29 11:09:19 +01:00
Andreas Kling
9249bcb5aa Kernel: Remove unnecessary FIXME in sys$posix_fallocate()
This syscall doesn't need to do anything for ENOSPC, as that is already
handled by its callees.
2022-11-29 11:09:19 +01:00
Hendiadyoin1
d783389877 Kernel+LibC: Add posix_fallocate syscall 2022-07-15 12:42:43 +02:00