Skip to content

Commit

Permalink
bsd-user: Add getdents and fcntl related system calls
Browse files Browse the repository at this point in the history
Add glue to call the following syscalls to the freebsd_syscall:

freebsd11_getdents
getdirentries
freebsd11_getdirentries
fcntl

Signed-off-by: Warner Losh <imp@bsdimp.com>
Signed-off-by: Karim Taha <kariem.taha2.7@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
  • Loading branch information
bsdimp committed Aug 28, 2023
1 parent d7e9a54 commit 97a3c57
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions bsd-user/freebsd/os-syscall.c
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,22 @@ static abi_long freebsd_syscall(void *cpu_env, int num, abi_long arg1,
ret = do_freebsd_getfsstat(arg1, arg2, arg3);
break;

case TARGET_FREEBSD_NR_freebsd11_getdents: /* getdents(2) */
ret = do_freebsd11_getdents(arg1, arg2, arg3);
break;

case TARGET_FREEBSD_NR_getdirentries: /* getdirentries(2) */
ret = do_freebsd_getdirentries(arg1, arg2, arg3, arg4);
break;

case TARGET_FREEBSD_NR_freebsd11_getdirentries: /* getdirentries(2) */
ret = do_freebsd11_getdirentries(arg1, arg2, arg3, arg4);
break;
case TARGET_FREEBSD_NR_fcntl: /* fcntl(2) */
ret = do_freebsd_fcntl(arg1, arg2, arg3);
break;


/*
* sys{ctl, arch, call}
*/
Expand Down

0 comments on commit 97a3c57

Please sign in to comment.