From be28e9bd97d1e838983eacacce4e6b4f6f52bc3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Wed, 10 Jul 2002 21:49:37 +0000 Subject: [PATCH] Added the syscalls for sys_read_dir(), and sys_rewind_dir(), and moved the use of the IOCPARM_LEN() macro to the ioctl() function in libc. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@61 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/core/syscalls.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/kernel/core/syscalls.c b/src/kernel/core/syscalls.c index 987b350ad8..c71e173411 100644 --- a/src/kernel/core/syscalls.c +++ b/src/kernel/core/syscalls.c @@ -78,12 +78,14 @@ int syscall_dispatcher(unsigned long call_num, void *arg_buffer, uint64 *call_re case SYSCALL_SEEK: *call_ret = user_seek((int)arg0, (off_t)INT32TOINT64(arg1, arg2), (int)arg3); break; + case SYSCALL_READ_DIR: + *call_ret = user_read_dir((int)arg0, (struct dirent *)arg1, (size_t)arg2, (uint32)arg3); + break; + case SYSCALL_REWIND_DIR: + *call_ret = user_rewind_dir((int)arg0); + break; case SYSCALL_IOCTL: - // ToDo: this is not correct; IOCPARM is only valid for calls to the networking stack - // The socket/fd_ioctl should do this, but I think we have to pass 0 here -- axeld. - // currently ignoring arg3 (which is supposed to be the length, but currently - // always 0 - in libc/system/wrappers.c - *call_ret = user_ioctl((int)arg0, (ulong)arg1, (void *)arg2, (size_t)IOCPARM_LEN((ulong)arg1)); + *call_ret = user_ioctl((int)arg0, (ulong)arg1, (void *)arg2, (size_t)arg3); break; case SYSCALL_CREATE: *call_ret = user_create((const char *)arg0, (stream_type)arg1);