Date: Tue, 18 Feb 2025 22:04:56 GMT From: Brooks Davis <brooks@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: daca374bc48b - main - makesyscalls: reduce redundency in syscall.mk code Message-ID: <202502182204.51IM4uFM009413@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=daca374bc48b5f6975563ae9ecc227868039e807 commit daca374bc48b5f6975563ae9ecc227868039e807 Author: Brooks Davis <brooks@FreeBSD.org> AuthorDate: 2025-02-18 22:02:19 +0000 Commit: Brooks Davis <brooks@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202502182204.51IM4uFM009413>