summaryrefslogtreecommitdiffstats
path: root/sys/kern/makesyscalls.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/makesyscalls.sh')
-rw-r--r--sys/kern/makesyscalls.sh56
1 files changed, 26 insertions, 30 deletions
diff --git a/sys/kern/makesyscalls.sh b/sys/kern/makesyscalls.sh
index fac830a..a386d6e 100644
--- a/sys/kern/makesyscalls.sh
+++ b/sys/kern/makesyscalls.sh
@@ -116,6 +116,9 @@ sed -e '
split(capenabled_string, capenabled, ",");
+ printf "\n/* The casts are bogus but will do for now. */\n" > sysent
+ printf "struct sysent %s[] = {\n",switchname > sysent
+
printf "/*\n * System call switch table.\n *\n" > syssw
printf " * DO NOT EDIT-- this file is automatically generated.\n" > syssw
printf " * $%s$\n", "FreeBSD" > syssw
@@ -125,35 +128,6 @@ sed -e '
printf " * DO NOT EDIT-- this file is automatically generated.\n" > sysarg
printf " * $%s$\n", "FreeBSD" > sysarg
printf " */\n\n" > sysarg
-
- printf "\n#ifdef %s\n\n", compat > syscompat
- printf "\n#ifdef %s\n\n", compat4 > syscompat4
- printf "\n#ifdef %s\n\n", compat6 > syscompat6
- printf "\n#ifdef %s\n\n", compat7 > syscompat7
- printf "\n#ifdef %s\n\n", compat10 > syscompat10
-
- printf "/*\n * System call names.\n *\n" > sysnames
- printf " * DO NOT EDIT-- this file is automatically generated.\n" > sysnames
- printf " * $%s$\n", "FreeBSD" > sysnames
- printf " */\n\n" > sysnames
-
- printf "/*\n * System call numbers.\n *\n" > syshdr
- printf " * DO NOT EDIT-- this file is automatically generated.\n" > syshdr
- printf " * $%s$\n", "FreeBSD" > syshdr
- printf " */\n\n" > syshdr
-
- printf "# FreeBSD system call object files.\n" > sysmk
- printf "# DO NOT EDIT-- this file is automatically generated.\n" > sysmk
- printf "# $%s$\n", "FreeBSD" > sysmk
-
- printf "/*\n * System call argument to DTrace register array converstion.\n *\n" > systrace
- printf " * DO NOT EDIT-- this file is automatically generated.\n" > systrace
- printf " * $%s$\n", "FreeBSD" > systrace
- }
- NR == 1 {
- printf "\n/* The casts are bogus but will do for now. */\n" > sysent
- printf "struct sysent %s[] = {\n",switchname > sysent
-
printf "#ifndef %s\n", sysproto_h > sysarg
printf "#define\t%s\n\n", sysproto_h > sysarg
printf "#include <sys/signal.h>\n" > sysarg
@@ -176,10 +150,31 @@ sed -e '
printf "#define\tPADR_(t)\t0\n" > sysarg
printf "#endif\n\n" > sysarg
+ printf "\n#ifdef %s\n\n", compat > syscompat
+ printf "\n#ifdef %s\n\n", compat4 > syscompat4
+ printf "\n#ifdef %s\n\n", compat6 > syscompat6
+ printf "\n#ifdef %s\n\n", compat7 > syscompat7
+ printf "\n#ifdef %s\n\n", compat10 > syscompat10
+
+ printf "/*\n * System call names.\n *\n" > sysnames
+ printf " * DO NOT EDIT-- this file is automatically generated.\n" > sysnames
+ printf " * $%s$\n", "FreeBSD" > sysnames
+ printf " */\n\n" > sysnames
printf "const char *%s[] = {\n", namesname > sysnames
+ printf "/*\n * System call numbers.\n *\n" > syshdr
+ printf " * DO NOT EDIT-- this file is automatically generated.\n" > syshdr
+ printf " * $%s$\n", "FreeBSD" > syshdr
+ printf " */\n\n" > syshdr
+
+ printf "# FreeBSD system call object files.\n" > sysmk
+ printf "# DO NOT EDIT-- this file is automatically generated.\n" > sysmk
+ printf "# $%s$\n", "FreeBSD" > sysmk
printf "MIASM = " > sysmk
+ printf "/*\n * System call argument to DTrace register array converstion.\n *\n" > systrace
+ printf " * DO NOT EDIT-- this file is automatically generated.\n" > systrace
+ printf " * $%s$\n", "FreeBSD" > systrace
printf " * This file is part of the DTrace syscall provider.\n */\n\n" > systrace
printf "static void\nsystrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)\n{\n" > systrace
printf "\tint64_t *iarg = (int64_t *) uarg;\n" > systrace
@@ -190,7 +185,8 @@ sed -e '
printf "static void\nsystrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)\n{\n\tconst char *p = NULL;\n" > systraceret
printf "\tswitch (sysnum) {\n" > systraceret
-
+ }
+ NR == 1 {
next
}
NF == 0 || $1 ~ /^;/ {
OpenPOWER on IntegriCloud