From 2292b11e82a3d6d70e7bb932c512155dc13c5025 Mon Sep 17 00:00:00 2001 From: Anton Kling Date: Tue, 24 Oct 2023 14:10:07 +0200 Subject: VFS/LibC: Create ftruncate function and corresponding syscall and libc implementation Previously this function was only used for shared memory region created by shm_open because I was lazy. Now exists for all files. --- userland/libc/libc.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'userland/libc/libc.c') diff --git a/userland/libc/libc.c b/userland/libc/libc.c index 90c0323..e2f064d 100644 --- a/userland/libc/libc.c +++ b/userland/libc/libc.c @@ -315,8 +315,3 @@ int shm_open(const char *name, int oflag, mode_t mode) { }; RC_ERRNO(syscall(SYS_SHM_OPEN, &args, 0, 0, 0, 0)); } - -int ftruncate(int fildes, uint64_t length) { - SYS_FTRUNCATE_PARAMS args = {.fildes = fildes, .length = length}; - RC_ERRNO(syscall(SYS_FTRUNCATE, &args, 0, 0, 0, 0)); -} -- cgit v1.2.3