summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2009-06-24 13:36:37 +0000
committerjhb <jhb@FreeBSD.org>2009-06-24 13:36:37 +0000
commitcceae54c51a10e1742d7b182bb2136cb5c78cd38 (patch)
treed919660b06363c972c0e24b80b71b33bf608938d
parentd8d39adf3c7c0448b34e3fba24490d16359543e1 (diff)
downloadFreeBSD-src-cceae54c51a10e1742d7b182bb2136cb5c78cd38.zip
FreeBSD-src-cceae54c51a10e1742d7b182bb2136cb5c78cd38.tar.gz
Add a new COMPAT7 flag for FreeBSD 7.x compatibility system calls.
-rw-r--r--sys/compat/freebsd32/syscalls.master3
-rw-r--r--sys/kern/makesyscalls.sh38
-rw-r--r--sys/kern/syscalls.master3
3 files changed, 38 insertions, 6 deletions
diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master
index 32ce882..5b3fd9f 100644
--- a/sys/compat/freebsd32/syscalls.master
+++ b/sys/compat/freebsd32/syscalls.master
@@ -13,7 +13,7 @@
; case where the event exists, but we don't want auditing, the
; event should be #defined to AUE_NULL in audit_kevents.h.
; type one of STD, OBSOL, UNIMPL, COMPAT, COMPAT4, COMPAT6,
-; LIBCOMPAT, NODEF, NOARGS, NOPROTO, NOSTD
+; COMPAT7, LIBCOMPAT, NODEF, NOARGS, NOPROTO, NOSTD
; The COMPAT* options may be combined with one or more NO*
; options separated by '|' with no spaces (e.g. COMPAT|NOARGS)
; name psuedo-prototype of syscall routine
@@ -28,6 +28,7 @@
; COMPAT included on COMPAT #ifdef
; COMPAT4 included on COMPAT4 #ifdef (FreeBSD 4 compat)
; COMPAT6 included on COMPAT6 #ifdef (FreeBSD 6 compat)
+; COMPAT7 included on COMPAT7 #ifdef (FreeBSD 7 compat)
; LIBCOMPAT included on COMPAT #ifdef, and placed in syscall.h
; OBSOL obsolete, not included in system, only specifies name
; UNIMPL not implemented, placeholder only
diff --git a/sys/kern/makesyscalls.sh b/sys/kern/makesyscalls.sh
index a1ff8b1..41a89c6 100644
--- a/sys/kern/makesyscalls.sh
+++ b/sys/kern/makesyscalls.sh
@@ -8,6 +8,7 @@ set -e
compat=COMPAT_43
compat4=COMPAT_FREEBSD4
compat6=COMPAT_FREEBSD6
+compat7=COMPAT_FREEBSD7
# output files:
sysnames="syscalls.c"
@@ -30,15 +31,17 @@ syscompat4="sysent.compat4.$$"
syscompat4dcl="sysent.compat4dcl.$$"
syscompat6="sysent.compat6.$$"
syscompat6dcl="sysent.compat6dcl.$$"
+syscompat7="sysent.compat7.$$"
+syscompat7dcl="sysent.compat7dcl.$$"
sysent="sysent.switch.$$"
sysinc="sysinc.switch.$$"
sysarg="sysarg.switch.$$"
sysprotoend="sysprotoend.$$"
systracetmp="systrace.$$"
-trap "rm $sysaue $sysdcl $syscompat $syscompatdcl $syscompat4 $syscompat4dcl $syscompat6 $syscompat6dcl $sysent $sysinc $sysarg $sysprotoend $systracetmp" 0
+trap "rm $sysaue $sysdcl $syscompat $syscompatdcl $syscompat4 $syscompat4dcl $syscompat6 $syscompat6dcl $syscompat7 $syscompat7dcl $sysent $sysinc $sysarg $sysprotoend $systracetmp" 0
-touch $sysaue $sysdcl $syscompat $syscompatdcl $syscompat4 $syscompat4dcl $syscompat6 $syscompat6dcl $sysent $sysinc $sysarg $sysprotoend $systracetmp
+touch $sysaue $sysdcl $syscompat $syscompatdcl $syscompat4 $syscompat4dcl $syscompat6 $syscompat6dcl $syscompat7 $syscompat7dcl $sysent $sysinc $sysarg $sysprotoend $systracetmp
case $# in
0) echo "usage: $0 input-file <config-file>" 1>&2
@@ -75,6 +78,8 @@ s/\$//g
syscompat4dcl = \"$syscompat4dcl\"
syscompat6 = \"$syscompat6\"
syscompat6dcl = \"$syscompat6dcl\"
+ syscompat7 = \"$syscompat7\"
+ syscompat7dcl = \"$syscompat7dcl\"
sysent = \"$sysent\"
syssw = \"$syssw\"
sysinc = \"$sysinc\"
@@ -87,6 +92,7 @@ s/\$//g
compat = \"$compat\"
compat4 = \"$compat4\"
compat6 = \"$compat6\"
+ compat7 = \"$compat7\"
syscallprefix = \"$syscallprefix\"
switchname = \"$switchname\"
namesname = \"$namesname\"
@@ -104,6 +110,7 @@ s/\$//g
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 * System call names.\n *\n" > sysnames
printf " * DO NOT EDIT-- this file is automatically generated.\n" > sysnames
@@ -181,6 +188,7 @@ s/\$//g
print > syscompat
print > syscompat4
print > syscompat6
+ print > syscompat7
print > sysnames
savesyscall = syscall
next
@@ -192,6 +200,7 @@ s/\$//g
print > syscompat
print > syscompat4
print > syscompat6
+ print > syscompat7
print > sysnames
syscall = savesyscall
next
@@ -203,6 +212,7 @@ s/\$//g
print > syscompat
print > syscompat4
print > syscompat6
+ print > syscompat7
print > sysnames
next
}
@@ -286,6 +296,8 @@ s/\$//g
argalias = "freebsd4_" argalias
if (flag("COMPAT6"))
argalias = "freebsd6_" argalias
+ if (flag("COMPAT7"))
+ argalias = "freebsd7_" argalias
}
f++
@@ -407,7 +419,8 @@ s/\$//g
syscall++
next
}
- type("COMPAT") || type("COMPAT4") || type("COMPAT6") {
+ type("COMPAT") || type("COMPAT4") || type("COMPAT6") || \
+ type("COMPAT7") {
if (flag("COMPAT")) {
ncompat++
out = syscompat
@@ -429,6 +442,13 @@ s/\$//g
wrap = "compat6"
prefix = "freebsd6_"
descr = "freebsd6"
+ } else if (flag("COMPAT7")) {
+ ncompat7++
+ out = syscompat7
+ outdcl = syscompat7dcl
+ wrap = "compat7"
+ prefix = "freebsd7_"
+ descr = "freebsd7"
}
parseline()
if (argc != 0 && !flag("NOARGS") && !flag("NOPROTO") && \
@@ -520,7 +540,7 @@ s/\$//g
END {
printf "\n#define AS(name) (sizeof(struct name) / sizeof(register_t))\n" > sysinc
- if (ncompat != 0 || ncompat4 != 0 || ncompat6 != 0)
+ if (ncompat != 0 || ncompat4 != 0 || ncompat6 != 0 || ncompat7 != 0)
printf "#include \"opt_compat.h\"\n\n" > syssw
if (ncompat != 0) {
@@ -547,9 +567,18 @@ s/\$//g
printf "#endif\n" > sysinc
}
+ if (ncompat7 != 0) {
+ printf "\n#ifdef %s\n", compat7 > sysinc
+ printf "#define compat7(n, name) n, (sy_call_t *)__CONCAT(freebsd7_,name)\n" > sysinc
+ printf "#else\n" > sysinc
+ printf "#define compat7(n, name) 0, (sy_call_t *)nosys\n" > sysinc
+ printf "#endif\n" > sysinc
+ }
+
printf("\n#endif /* %s */\n\n", compat) > syscompatdcl
printf("\n#endif /* %s */\n\n", compat4) > syscompat4dcl
printf("\n#endif /* %s */\n\n", compat6) > syscompat6dcl
+ printf("\n#endif /* %s */\n\n", compat7) > syscompat7dcl
printf("\n#undef PAD_\n") > sysprotoend
printf("#undef PADL_\n") > sysprotoend
@@ -570,6 +599,7 @@ cat $sysarg $sysdcl \
$syscompat $syscompatdcl \
$syscompat4 $syscompat4dcl \
$syscompat6 $syscompat6dcl \
+ $syscompat7 $syscompat7dcl \
$sysaue $sysprotoend > $sysproto
cat $systracetmp >> $systrace
diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master
index db30812..796e72a 100644
--- a/sys/kern/syscalls.master
+++ b/sys/kern/syscalls.master
@@ -12,7 +12,7 @@
; case where the event exists, but we don't want auditing, the
; event should be #defined to AUE_NULL in audit_kevents.h.
; type one of STD, OBSOL, UNIMPL, COMPAT, COMPAT4, COMPAT6,
-; LIBCOMPAT, NODEF, NOARGS, NOPROTO, NOSTD
+; COMPAT7, LIBCOMPAT, NODEF, NOARGS, NOPROTO, NOSTD
; The COMPAT* options may be combined with one or more NO*
; options separated by '|' with no spaces (e.g. COMPAT|NOARGS)
; name psuedo-prototype of syscall routine
@@ -27,6 +27,7 @@
; COMPAT included on COMPAT #ifdef
; COMPAT4 included on COMPAT4 #ifdef (FreeBSD 4 compat)
; COMPAT6 included on COMPAT6 #ifdef (FreeBSD 6 compat)
+; COMPAT7 included on COMPAT7 #ifdef (FreeBSD 7 compat)
; LIBCOMPAT included on COMPAT #ifdef, and placed in syscall.h
; OBSOL obsolete, not included in system, only specifies name
; UNIMPL not implemented, placeholder only
OpenPOWER on IntegriCloud