mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-17 13:53:39 +00:00
Add a new COMPAT7 flag for FreeBSD 7.x compatibility system calls.
This commit is contained in:
parent
71361470b1
commit
3c366f1f14
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=194833
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue