From e4f27ab4268df696dee85eaab4b3983299f1f2ee Mon Sep 17 00:00:00 2001 From: deraadt Date: Sat, 1 Oct 2022 23:49:38 +0000 Subject: [PATCH] The syscall table generation awk script was also used by compat layers in the past, but those compat layers are gone. Remove support for the "config file" ok miod millert --- sys/kern/Makefile | 6 +++--- sys/kern/makesyscalls.sh | 32 +++++++++++++++++++------------- sys/kern/syscalls.conf | 17 ----------------- 3 files changed, 22 insertions(+), 33 deletions(-) delete mode 100644 sys/kern/syscalls.conf diff --git a/sys/kern/Makefile b/sys/kern/Makefile index 690cfbc34c9..a87ebddd664 100644 --- a/sys/kern/Makefile +++ b/sys/kern/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.51 2021/08/31 23:53:42 kn Exp $ +# $OpenBSD: Makefile,v 1.52 2022/10/01 23:49:38 deraadt Exp $ # Makefile for kernel tags files, init_sysent, etc. @@ -12,9 +12,9 @@ all: syscalls: init_sysent.c -SYSCALLSRC = makesyscalls.sh syscalls.conf syscalls.master +SYSCALLSRC = makesyscalls.sh syscalls.master init_sysent.c syscalls.c ../sys/syscall.h ../sys/syscallargs.h: ${SYSCALLSRC} - sh makesyscalls.sh syscalls.conf syscalls.master + sh makesyscalls.sh syscalls.master # Kernel tags: # tags files are built in the top-level directory for each architecture. diff --git a/sys/kern/makesyscalls.sh b/sys/kern/makesyscalls.sh index d2b9ebca7b2..9c761f3f712 100644 --- a/sys/kern/makesyscalls.sh +++ b/sys/kern/makesyscalls.sh @@ -1,5 +1,5 @@ #! /bin/sh - -# $OpenBSD: makesyscalls.sh,v 1.16 2022/05/01 22:59:49 tedu Exp $ +# $OpenBSD: makesyscalls.sh,v 1.17 2022/10/01 23:49:38 deraadt Exp $ # $NetBSD: makesyscalls.sh,v 1.26 1998/01/09 06:17:51 thorpej Exp $ # # Copyright (c) 1994,1996 Christopher G. Demetriou @@ -36,21 +36,27 @@ set -e case $# in - 2) ;; - *) echo "Usage: $0 config-file input-file" 1>&2 + 1) ;; + *) echo "Usage: $0 input-file" 1>&2 exit 1 ;; esac -# source the config file. -case $1 in - /*) . $1 - ;; - *) . ./$1 - ;; -esac +sysnames="syscalls.c" +sysnumhdr="../sys/syscall.h" +syssw="init_sysent.c" +sysarghdr="../sys/syscallargs.h" + +# Any additions to the next line for options that are required for the +# (new) kernel to boot an existing userland must be coordinated with +# the snapshot builders +compatopts="" + +switchname="sysent" +namesname="syscallnames" +constprefix="SYS_" -# the config file sets the following variables: +# this script sets the following variables: # sysnames the syscall names file # sysnumhdr the syscall numbers file # syssw the syscall switch file @@ -89,7 +95,7 @@ s/\$//g 2,${ /^#/!s/\([{}()*,]\)/ \1 /g } -' < $2 | awk " +' < $1 | awk " BEGIN { # to allow nested #if/#else/#endif sets savedepth = 0 @@ -105,7 +111,7 @@ BEGIN { sysdcl = \"$sysdcl\" syscompat_pref = \"$syscompat_pref\" sysent = \"$sysent\" - infile = \"$2\" + infile = \"$1\" compatopts = \"$compatopts\" "' diff --git a/sys/kern/syscalls.conf b/sys/kern/syscalls.conf deleted file mode 100644 index ed8e1713906..00000000000 --- a/sys/kern/syscalls.conf +++ /dev/null @@ -1,17 +0,0 @@ -# $OpenBSD: syscalls.conf,v 1.20 2013/09/14 01:35:01 guenther Exp $ -# $NetBSD: syscalls.conf,v 1.2 1994/10/26 06:45:57 cgd Exp $ - -sysnames="syscalls.c" -sysnumhdr="../sys/syscall.h" -syssw="init_sysent.c" -sysarghdr="../sys/syscallargs.h" - -# Any additions to the next line for options that are required for the -# (new) kernel to boot an existing userland must be coordinated with -# the snapshot builders -compatopts="" -libcompatopts="" - -switchname="sysent" -namesname="syscallnames" -constprefix="SYS_" -- 2.20.1