diff options
| author | Anton Kling <anton@kling.gg> | 2024-11-30 17:43:25 +0100 | 
|---|---|---|
| committer | Anton Kling <anton@kling.gg> | 2024-11-30 17:43:25 +0100 | 
| commit | 5dd05779ce0a6544f4653eee87d278973386d0ab (patch) | |
| tree | 57658272b9047d5ac4768197529e27d51c3c45be /kernel/cpu/syscall.c | |
| parent | 1b49c460ec983eb23cace256d459b664d8a0841f (diff) | |
vfs: Move read() to vfs.c
Diffstat (limited to 'kernel/cpu/syscall.c')
| -rw-r--r-- | kernel/cpu/syscall.c | 8 | 
1 files changed, 1 insertions, 7 deletions
| diff --git a/kernel/cpu/syscall.c b/kernel/cpu/syscall.c index 1c10641..284a80d 100644 --- a/kernel/cpu/syscall.c +++ b/kernel/cpu/syscall.c @@ -399,13 +399,7 @@ int syscall_pread(SYS_PREAD_PARAMS *args) {  }  int syscall_read(int fd, void *buf, size_t count) { -  vfs_fd_t *fd_ptr = get_vfs_fd(fd, NULL); -  if (!fd_ptr) { -    return -EBADF; -  } -  int rc = vfs_pread(fd, buf, count, fd_ptr->offset); -  fd_ptr->offset += rc; -  return rc; +  return vfs_read(fd, buf, count);  }  int syscall_dup(int fd) { |