Kernel/LibC: Add SYS_TRUNCATE
This commit is contained in:
@@ -73,6 +73,7 @@ __BEGIN_DECLS
|
||||
O(SYS_CONNECT, connect) \
|
||||
O(SYS_LISTEN, listen) \
|
||||
O(SYS_PSELECT, pselect) \
|
||||
O(SYS_TRUNCATE, truncate) \
|
||||
|
||||
enum Syscall
|
||||
{
|
||||
|
||||
@@ -99,6 +99,11 @@ off_t lseek(int fildes, off_t offset, int whence)
|
||||
return syscall(SYS_SEEK, fildes, offset, whence);
|
||||
}
|
||||
|
||||
int ftruncate(int fildes, off_t length)
|
||||
{
|
||||
return syscall(SYS_TRUNCATE, fildes, length);
|
||||
}
|
||||
|
||||
int dup(int fildes)
|
||||
{
|
||||
return syscall(SYS_DUP, fildes);
|
||||
|
||||
Reference in New Issue
Block a user