Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Dec 2023 16:04:23 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: e64d827d3a58 - stable/14 - makesyscall: Simplify a bit emitting syscall declarations
Message-ID:  <202312061604.3B6G4Nrt086141@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=e64d827d3a582af994288fcdbc5a701828fc66d6

commit e64d827d3a582af994288fcdbc5a701828fc66d6
Author:     Olivier Certner <olce.freebsd@certner.fr>
AuthorDate: 2023-10-12 13:47:03 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2023-12-06 16:04:05 +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
    
    (cherry picked from commit 2f68ae6150aa51d724e22c7e6748adfe2bc932d7)
---
 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 f2d8f1a609b6..a800de26a282 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202312061604.3B6G4Nrt086141>