LibC: Implement truncate
This commit is contained in:
@@ -150,7 +150,7 @@ namespace Kernel
|
||||
BAN::ErrorOr<long> sys_seek(int fd, off_t offset, int whence);
|
||||
BAN::ErrorOr<long> sys_tell(int fd);
|
||||
|
||||
BAN::ErrorOr<long> sys_truncate(int fd, off_t length);
|
||||
BAN::ErrorOr<long> sys_ftruncate(int fd, off_t length);
|
||||
|
||||
BAN::ErrorOr<long> sys_fsync(int fd);
|
||||
|
||||
|
||||
@@ -1856,7 +1856,7 @@ namespace Kernel
|
||||
return TRY(m_open_file_descriptors.tell(fd));
|
||||
}
|
||||
|
||||
BAN::ErrorOr<long> Process::sys_truncate(int fd, off_t length)
|
||||
BAN::ErrorOr<long> Process::sys_ftruncate(int fd, off_t length)
|
||||
{
|
||||
TRY(m_open_file_descriptors.truncate(fd, length));
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user