summary refs log tree commit diff stats
path: root/bsd-user/freebsd/os-sys.c
diff options
context:
space:
mode:
authorWarner Losh <imp@bsdimp.com>2021-09-20 13:41:38 -0600
committerWarner Losh <imp@bsdimp.com>2021-10-18 12:51:39 -0600
commitda07e6944fb0f1fe162246cbf31271f31ec9a5c0 (patch)
tree53b0056222b108823a1896f767a4913496a0fee5 /bsd-user/freebsd/os-sys.c
parent653ccec26dd3f9942ac258c43be0edb93e16dfba (diff)
downloadfocaccia-qemu-da07e6944fb0f1fe162246cbf31271f31ec9a5c0.tar.gz
focaccia-qemu-da07e6944fb0f1fe162246cbf31271f31ec9a5c0.zip
bsd-user/sysarch: Move to using do_freebsd_arch_sysarch interface
do_freebsd_arch_sysarch() exists in $ARCH/target_arch_sysarch.h for x86.
Call it from do_freebsd_sysarch() and remove the mostly duplicate
version in syscall.c. Future changes will move it to os-sys.c and
support other architectures.

Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Kyle Evans <kevans@FreeBSD.org>
Diffstat (limited to 'bsd-user/freebsd/os-sys.c')
-rw-r--r--bsd-user/freebsd/os-sys.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/bsd-user/freebsd/os-sys.c b/bsd-user/freebsd/os-sys.c
new file mode 100644
index 0000000000..309e27b9d6
--- /dev/null
+++ b/bsd-user/freebsd/os-sys.c
@@ -0,0 +1,27 @@
+/*
+ *  FreeBSD sysctl() and sysarch() system call emulation
+ *
+ *  Copyright (c) 2013-15 Stacey D. Son
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "qemu.h"
+#include "target_arch_sysarch.h"
+
+/* sysarch() is architecture dependent. */
+abi_long do_freebsd_sysarch(void *cpu_env, abi_long arg1, abi_long arg2)
+{
+    return do_freebsd_arch_sysarch(cpu_env, arg1, arg2);
+}