summaryrefslogtreecommitdiff
path: root/kernel/fs/shm.c
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-04-26 19:06:46 +0200
committerAnton Kling <anton@kling.gg>2024-04-26 19:06:46 +0200
commit7ab3153f92f38223157c4c1f4af1c30e33c94a76 (patch)
tree301f950cd6dc8fde244e9b5c1201ec01d964347b /kernel/fs/shm.c
parent2e2805c88789c148cce0118d3a4ff0212458bb86 (diff)
Kernel/VFS: Change polling from variables to functions
Instead of having to store state in variables functions are called to check the object directly.
Diffstat (limited to 'kernel/fs/shm.c')
-rw-r--r--kernel/fs/shm.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/kernel/fs/shm.c b/kernel/fs/shm.c
index 0735efc..caf356c 100644
--- a/kernel/fs/shm.c
+++ b/kernel/fs/shm.c
@@ -87,11 +87,10 @@ int shm_open(const char *name, int oflag, mode_t mode) {
}
vfs_inode_t *inode = vfs_create_inode(
- 0 /*inode_num*/, 0 /*type*/, 1 /*has_data*/, 1 /*can_write*/,
- 1 /*is_open*/, internal_object, 0 /*file_size*/, NULL /*open*/,
- NULL /*create_file*/, shm_read, shm_write, NULL /*close*/,
- NULL /*create_directory*/, shm_get_vm_object, shm_ftruncate,
- NULL /*stat*/, NULL /*send_signal*/);
+ 0 /*inode_num*/, 0 /*type*/, NULL, NULL, 1 /*is_open*/,
+ internal_object, 0 /*file_size*/, NULL /*open*/, NULL /*create_file*/,
+ shm_read, shm_write, NULL /*close*/, NULL /*create_directory*/,
+ shm_get_vm_object, shm_ftruncate, NULL /*stat*/, NULL /*send_signal*/);
vfs_fd_t *fd_ptr;
int fd = vfs_create_fd(oflag, mode, 0 /*is_tty*/, inode, &fd_ptr);