summaryrefslogtreecommitdiff
path: root/kernel/cpu/syscall.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/cpu/syscall.c')
-rw-r--r--kernel/cpu/syscall.c8
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) {