summaryrefslogtreecommitdiff
path: root/fs/ext2.c
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 /fs/ext2.c
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 'fs/ext2.c')
-rw-r--r--fs/ext2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext2.c b/fs/ext2.c
index 98ef2c7..14bcfcb 100644
--- a/fs/ext2.c
+++ b/fs/ext2.c
@@ -505,7 +505,7 @@ vfs_inode_t *ext2_open(const char *path) {
1 /*is_open*/, NULL /*internal_object*/, file_size,
ext2_open, ext2_create_file, ext2_read, ext2_write,
ext2_close, ext2_create_directory,
- NULL /*get_vm_object*/);
+ NULL /*get_vm_object*/, NULL/*truncate*/);
}
uint64_t end_of_last_entry_position(int dir_inode, uint64_t *entry_offset,
@@ -697,7 +697,7 @@ vfs_inode_t *ext2_mount(void) {
0 /*can_write*/, 0 /*is_open*/,
NULL /*internal_object*/, 0 /*file_size*/, ext2_open,
ext2_create_file, ext2_read, ext2_write, ext2_close,
- ext2_create_directory, NULL /*get_vm_object*/);
+ ext2_create_directory, NULL /*get_vm_object*/, NULL/*truncate*/);
}
void parse_superblock(void) {