mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
makesyscall: Simplify a bit emitting syscall declarations
Reviewed by: kevans, imp MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42168 (cherry picked from commit 2f68ae6150aa51d724e22c7e6748adfe2bc932d7)
This commit is contained in:
parent
f035d56e71
commit
e64d827d3a
1 changed files with 5 additions and 8 deletions
|
|
@ -865,18 +865,15 @@ local function handle_noncompat(sysnum, thr_flag, flags, sysflags, rettype,
|
|||
|
||||
local protoflags = get_mask({"NOPROTO", "NODEF"})
|
||||
if flags & protoflags == 0 then
|
||||
local sys_prefix = "sys_"
|
||||
if funcname == "nosys" or funcname == "lkmnosys" or
|
||||
funcname == "sysarch" or funcname:find("^freebsd") or
|
||||
funcname:find("^linux") then
|
||||
write_line("sysdcl", string.format(
|
||||
"%s\t%s(struct thread *, struct %s *)",
|
||||
rettype, funcname, argalias))
|
||||
else
|
||||
write_line("sysdcl", string.format(
|
||||
"%s\tsys_%s(struct thread *, struct %s *)",
|
||||
rettype, funcname, argalias))
|
||||
sys_prefix = ""
|
||||
end
|
||||
write_line("sysdcl", ";\n")
|
||||
write_line("sysdcl", string.format(
|
||||
"%s\t%s%s(struct thread *, struct %s *);\n",
|
||||
rettype, sys_prefix, funcname, argalias))
|
||||
write_line("sysaue", string.format("#define\t%sAUE_%s\t%s\n",
|
||||
config.syscallprefix, funcalias, auditev))
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue