On 4/11/23 19:09, Warner Losh wrote:
+++ b/bsd-user/syscallhdr.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+in="$1"
+out="$2"
+bsd="$3"
+
+awk -v bsd="$3" '{sub("SYS_", "TARGET_" bsd "_NR_", $0); print;}' < $in > $out

If the host/guest syscall numbers always match, there's no point in using TARGET_freebsd_NR_foo at all -- just use the original SYS_foo symbol from <sys/syscall.h>.


r~

Reply via email to