The branch main has been updated by brooks:

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

commit daca374bc48b5f6975563ae9ecc227868039e807
Author:     Brooks Davis <bro...@freebsd.org>
AuthorDate: 2025-02-18 22:02:19 +0000
Commit:     Brooks Davis <bro...@freebsd.org>
CommitDate: 2025-02-18 22:03:06 +0000

    makesyscalls: reduce redundency in syscall.mk code
    
    The two outer blocks had identical contents and the two inner blocks
    differed in a single location.
    
    Reviewed by:    kevans
    Sponsored by:   DARPA, AFRL
    Pull Request:   https://github.com/freebsd/freebsd-src/pull/1575
---
 sys/tools/syscalls/scripts/syscall_mk.lua | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)

diff --git a/sys/tools/syscalls/scripts/syscall_mk.lua 
b/sys/tools/syscalls/scripts/syscall_mk.lua
index 49d3f6f86c20..8f8755af31c0 100755
--- a/sys/tools/syscalls/scripts/syscall_mk.lua
+++ b/sys/tools/syscalls/scripts/syscall_mk.lua
@@ -43,24 +43,14 @@ function syscall_mk.generate(tbl, config, fh)
        gen:write("MIASM =  \\\n") -- preamble
        for _, v in pairs(s) do
                local c = v:compatLevel()
+               local bs = " \\"
                idx = idx + 1
-               if v:native() and not v.type.NODEF and not v.type.NOLIB then
+               if (v:native() or c >= 7) and not v.type.NODEF and not 
v.type.NOLIB then
                        if idx >= size then
                                -- At last system call, no backslash.
-                               gen:write(string.format("\t%s.o\n", v:symbol()))
-                       else
-                               -- Normal behavior.
-                               gen:write(string.format("\t%s.o \\\n", 
v:symbol()))
-                       end
-               -- Handle compat (everything >= FREEBSD3):
-               elseif c >= 7 and not v.type.NODEF and not v.type.NOLIB then
-                       if idx >= size then
-                               -- At last system call, no backslash.
-                               gen:write(string.format("\t%s.o\n", v:symbol()))
-                       else
-                               -- Normal behavior.
-                               gen:write(string.format("\t%s.o \\\n", 
v:symbol()))
+                               bs = ""
                        end
+                       gen:write(string.format("\t%s.o%s\n", v:symbol(), bs))
                end
        end
 end

Reply via email to