From: Stacey Son <sson@FreeBSD.org>
Finally, connect do_bsd_ioctl to the build. Call bsd_ioctl_init() from
syscall_init()
Signed-off-by: Stacey Son <sson@FreeBSD.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Signed-off-by: Warner Losh <imp@bsdimp.com>
---
bsd-user/freebsd/os-syscall.c | 9 +++++++++
bsd-user/meson.build | 1 +
2 files changed, 10 insertions(+)
diff --git a/bsd-user/freebsd/os-syscall.c b/bsd-user/freebsd/os-syscall.c
index ca819fc530..90ef1bd916 100644
--- a/bsd-user/freebsd/os-syscall.c
+++ b/bsd-user/freebsd/os-syscall.c
@@ -34,6 +34,7 @@
/* BSD independent syscall shims */
#include "bsd-file.h"
+#include "bsd-ioctl.h"
#include "bsd-mem.h"
#include "bsd-proc.h"
#include "bsd-misc.h"
@@ -689,6 +690,13 @@ static abi_long freebsd_syscall(void *cpu_env, int num, abi_long arg1,
ret = do_bsd_undelete(arg1);
break;
+ /*
+ * ioctl(2)
+ */
+ case TARGET_FREEBSD_NR_ioctl: /* ioctl(2) */
+ ret = do_bsd_ioctl(arg1, arg2, arg3);
+ break;
+
/*
* stat system calls
*/
@@ -993,4 +1001,5 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1,
void syscall_init(void)
{
+ init_bsd_ioctl();
}
diff --git a/bsd-user/meson.build b/bsd-user/meson.build
index 9cc5c6c459..2abcae5122 100644
--- a/bsd-user/meson.build
+++ b/bsd-user/meson.build
@@ -7,6 +7,7 @@ bsd_user_ss = ss.source_set()
common_user_inc += include_directories('include')
bsd_user_ss.add(files(
+ 'bsd-ioctl.c',
'bsd-mem.c',
'bsd-misc.c',
'bsd-proc.c',
--
2.52.0