git: 2f68ae6150aa - main - makesyscall: Simplify a bit emitting syscall declarations
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 21 Nov 2023 18:35:48 UTC
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2f68ae6150aa51d724e22c7e6748adfe2bc932d7 commit 2f68ae6150aa51d724e22c7e6748adfe2bc932d7 Author: Olivier Certner <olce.freebsd@certner.fr> AuthorDate: 2023-10-12 13:47:03 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2023-11-21 18:25:34 +0000 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 --- sys/tools/makesyscalls.lua | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/sys/tools/makesyscalls.lua b/sys/tools/makesyscalls.lua index bf631ac2ffdd..8a56310f0068 100644 --- a/sys/tools/makesyscalls.lua +++ b/sys/tools/makesyscalls.lua @@ -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