summaryrefslogtreecommitdiff
path: root/scalls
diff options
context:
space:
mode:
Diffstat (limited to 'scalls')
-rw-r--r--scalls/ftruncate.c6
-rw-r--r--scalls/ftruncate.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/scalls/ftruncate.c b/scalls/ftruncate.c
new file mode 100644
index 0000000..6bc1170
--- /dev/null
+++ b/scalls/ftruncate.c
@@ -0,0 +1,6 @@
+#include <fs/vfs.h>
+#include <scalls/ftruncate.h>
+
+int syscall_ftruncate(int fd, size_t length) {
+ return vfs_ftruncate(fd, length);
+}
diff --git a/scalls/ftruncate.h b/scalls/ftruncate.h
new file mode 100644
index 0000000..9213e85
--- /dev/null
+++ b/scalls/ftruncate.h
@@ -0,0 +1,2 @@
+#include <stddef.h>
+int syscall_ftruncate(int fd, size_t length);