summaryrefslogtreecommitdiff
path: root/scalls
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2023-10-24 14:10:07 +0200
committerAnton Kling <anton@kling.gg>2023-10-24 14:10:07 +0200
commit2292b11e82a3d6d70e7bb932c512155dc13c5025 (patch)
treeda7d90e778495bc9a67ee0e09b32813c11dc6fe5 /scalls
parente93a49d1eadf4a4b36369e67f112f8c45a0d567e (diff)
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.
Diffstat (limited to 'scalls')
-rw-r--r--scalls/shm.c4
-rw-r--r--scalls/shm.h6
2 files changed, 0 insertions, 10 deletions
diff --git a/scalls/shm.c b/scalls/shm.c
index 2e8924f..979084a 100644
--- a/scalls/shm.c
+++ b/scalls/shm.c
@@ -4,7 +4,3 @@
int syscall_shm_open(SYS_SHM_OPEN_PARAMS *args) {
return shm_open(args->name, args->oflag, args->mode);
}
-
-int syscall_ftruncate(SYS_FTRUNCATE_PARAMS *args) {
- return ftruncate(args->fildes, args->length);
-}
diff --git a/scalls/shm.h b/scalls/shm.h
index 6d4e13e..80e4366 100644
--- a/scalls/shm.h
+++ b/scalls/shm.h
@@ -10,11 +10,5 @@ typedef struct SYS_SHM_OPEN_PARAMS {
mode_t mode;
} __attribute__((packed)) SYS_SHM_OPEN_PARAMS;
-typedef struct SYS_FTRUNCATE_PARAMS {
- int fildes;
- uint64_t length;
-} __attribute__((packed)) SYS_FTRUNCATE_PARAMS;
-
int syscall_shm_open(SYS_SHM_OPEN_PARAMS *args);
-int syscall_ftruncate(SYS_FTRUNCATE_PARAMS *args);
#endif