mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 15:07:44 +00:00
Kernel+LibC: Add posix_fallocate syscall
This commit is contained in:
parent
ad904cdcab
commit
d783389877
6 changed files with 70 additions and 0 deletions
|
@ -104,6 +104,13 @@ int posix_fadvise(int fd, off_t offset, off_t len, int advice)
|
|||
return 0;
|
||||
}
|
||||
|
||||
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/posix_fallocate.html
|
||||
int posix_fallocate(int fd, off_t offset, off_t len)
|
||||
{
|
||||
// posix_fallocate does not set errno.
|
||||
return static_cast<int>(syscall(SC_posix_fallocate, fd, &offset, &len));
|
||||
}
|
||||
|
||||
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/utimensat.html
|
||||
int utimensat(int dirfd, char const* path, struct timespec const times[2], int flag)
|
||||
{
|
||||
|
|
|
@ -29,6 +29,7 @@ int inode_watcher_add_watch(int fd, char const* path, size_t path_length, unsign
|
|||
int inode_watcher_remove_watch(int fd, int wd);
|
||||
|
||||
int posix_fadvise(int fd, off_t offset, off_t len, int advice);
|
||||
int posix_fallocate(int fd, off_t offset, off_t len);
|
||||
|
||||
int utimensat(int dirfd, char const* path, struct timespec const times[2], int flag);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue