[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 29/32] Add glue to call the following syscalls to the freebsd_
From: |
Karim Taha |
Subject: |
[PATCH v3 29/32] Add glue to call the following syscalls to the freebsd_syscall function: |
Date: |
Sun, 13 Aug 2023 10:41:50 +0200 |
From: Warner Losh <imp@bsdimp.com>
freebsd11_stat
freebsd11_lstat
freebsd11_fstat
freebsd11_fstatat
freebsd11_nstat, freebsd11_nfstat, freebsd11_nlstat
fstatat
fstat
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>
---
bsd-user/freebsd/os-syscall.c | 42 +++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/bsd-user/freebsd/os-syscall.c b/bsd-user/freebsd/os-syscall.c
index 2224a280ea..ade47a0d2f 100644
--- a/bsd-user/freebsd/os-syscall.c
+++ b/bsd-user/freebsd/os-syscall.c
@@ -36,6 +36,9 @@
#include "bsd-file.h"
#include "bsd-proc.h"
+/* *BSD dependent syscall shims */
+#include "os-stat.h"
+
/* I/O */
safe_syscall3(int, open, const char *, path, int, flags, mode_t, mode);
safe_syscall4(int, openat, int, fd, const char *, path, int, flags, mode_t,
@@ -482,6 +485,45 @@ static abi_long freebsd_syscall(void *cpu_env, int num,
abi_long arg1,
ret = do_bsd_undelete(arg1);
break;
+ /*
+ * stat system calls
+ */
+ case TARGET_FREEBSD_NR_freebsd11_stat: /* stat(2) */
+ ret = do_freebsd11_stat(arg1, arg2);
+ break;
+
+ case TARGET_FREEBSD_NR_freebsd11_lstat: /* lstat(2) */
+ ret = do_freebsd11_lstat(arg1, arg2);
+ break;
+
+ case TARGET_FREEBSD_NR_freebsd11_fstat: /* fstat(2) */
+ ret = do_freebsd11_fstat(arg1, arg2);
+ break;
+
+ case TARGET_FREEBSD_NR_fstat: /* fstat(2) */
+ ret = do_freebsd_fstat(arg1, arg2);
+ break;
+
+ case TARGET_FREEBSD_NR_freebsd11_fstatat: /* fstatat(2) */
+ ret = do_freebsd11_fstatat(arg1, arg2, arg3, arg4);
+ break;
+
+ case TARGET_FREEBSD_NR_fstatat: /* fstatat(2) */
+ ret = do_freebsd_fstatat(arg1, arg2, arg3, arg4);
+ break;
+
+ case TARGET_FREEBSD_NR_freebsd11_nstat: /* undocumented */
+ ret = do_freebsd11_nstat(arg1, arg2);
+ break;
+
+ case TARGET_FREEBSD_NR_freebsd11_nfstat: /* undocumented */
+ ret = do_freebsd11_nfstat(arg1, arg2);
+ break;
+
+ case TARGET_FREEBSD_NR_freebsd11_nlstat: /* undocumented */
+ ret = do_freebsd11_nlstat(arg1, arg2);
+ break;
+
/*
* sys{ctl, arch, call}
*/
--
2.40.0
- [PATCH v3 19/32] Implement stat related syscalls, (continued)
- [PATCH v3 19/32] Implement stat related syscalls, Karim Taha, 2023/08/13
- [PATCH v3 20/32] Implement stat related syscalls, Karim Taha, 2023/08/13
- [PATCH v3 21/32] Implement stat related syscalls, Karim Taha, 2023/08/13
- [PATCH v3 22/32] Implement freebsd11 stat related syscalls, Karim Taha, 2023/08/13
- [PATCH v3 25/32] Implement freebsd11 stat related syscalls, Karim Taha, 2023/08/13
- [PATCH v3 26/32] Implement freebsd11 stat related syscalls, Karim Taha, 2023/08/13
- [PATCH v3 23/32] Implement freebsd11 stat related syscalls, Karim Taha, 2023/08/13
- [PATCH v3 24/32] Implement freebsd11 stat related syscalls, Karim Taha, 2023/08/13
- [PATCH v3 27/32] Implement do_freebsd_realpathat syscall, Karim Taha, 2023/08/13
- [PATCH v3 28/32] Add os-stat.c to the build, Karim Taha, 2023/08/13
- [PATCH v3 29/32] Add glue to call the following syscalls to the freebsd_syscall function:,
Karim Taha <=
- [PATCH v3 30/32] Add glue to call the following syscalls to the freebsd_syscall function:, Karim Taha, 2023/08/13
- [PATCH v3 31/32] Add glue to call the following syscalls to the freebsd_syscall function:, Karim Taha, 2023/08/13
- [PATCH v3 32/32] Add glue to call the following syscalls to the freebsd_syscall function:, Karim Taha, 2023/08/13
- Re: [PATCH v3 00/32] Implement the stat system calls for FreeBSD., Warner Losh, 2023/08/20
- Re: [PATCH v3 00/32] Implement the stat system calls for FreeBSD., Markus Armbruster, 2023/08/21