summaryrefslogtreecommitdiff
path: root/socket.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 /socket.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 'socket.c')
-rw-r--r--socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/socket.c b/socket.c
index 8328b38..59f86bf 100644
--- a/socket.c
+++ b/socket.c
@@ -128,7 +128,7 @@ int socket(int domain, int type, int protocol) {
0 /*inode_num*/, FS_TYPE_UNIX_SOCKET, 0 /*has_data*/, 1 /*can_write*/,
1 /*is_open*/, new_socket /*internal_object*/, 0 /*file_size*/,
NULL /*open*/, NULL /*create_file*/, socket_read, socket_write,
- socket_close, NULL/*create_directory*/, NULL /*get_vm_object*/);
+ socket_close, NULL/*create_directory*/, NULL /*get_vm_object*/, NULL/*truncate*/);
vfs_fd_t *fd;
int n = vfs_create_fd(O_RDWR | O_NONBLOCK, 0, inode, &fd);