From nobody Tue Oct 01 16:11:56 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XJ2y46VF4z5Y2jD; Tue, 01 Oct 2024 16:11:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XJ2y461H1z4JFd; Tue, 1 Oct 2024 16:11:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727799116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PaTZtMXtdAHBuotKu/s8JT/e+Pu094GCrgBt+mEIYfE=; b=W33xaLbLyembGvT6V5xuUza5m6WmwfjuWUlcRqGWSW1ACwJP+5f5iblz5VNXwR7sI3mQpK nNHCpoL0CyVl3Cewtf49nEPgZWCoDzhXYxhqYpm0VWhFzmC8aFSY28ILcEB3CeVoM7B/yy ztL6Ih/O4KCB6Ni/JEb+V3a8l29Xiz/Lqk8m23BSyxibrtJanDNJzohPyfCdn/MsJWnRw8 GRUAPhgQW6o3MW5QaZo9riFK1ydxQDqVspV0vYoh+oBAqcMtU6Xbsbe+Fb7cb5p8fl3hhI PyshWbRIr1ro+Ay/SLZzUQjR5CNbVMetGbh6i8kRVkF22X6cQF9oPB3EFRhOPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727799116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PaTZtMXtdAHBuotKu/s8JT/e+Pu094GCrgBt+mEIYfE=; b=oqzvxivlGzsw1Vaj0VGgeu1lo7tCUXhGQe1jXnDmNs5BJzRgMQr3BLcY06+kXSYJiTimCF kDx/VAtHb4ZhlyM/7+3IcnoKDXqr9wwlYirVPgrbnNFK3rsSm3/SsRL55m1dbEYvCDvCYX 0wTtWI2lmesD9E89QCMno/XNfS9PPsmr0bG58r5RrTSiil1CpqnB1XdFhxMzZjZKmc2oCY 25WGIbHMWo6Akdm/29GZyCZ+1sa3sj54bNPOj3yajo80uFr/N5PBATLfJBWL+skEm6FqAD 64n2jRYmjHvI645yl78yqc0UkN4Xfk2U/GMCB+gkTf6pzkg5QmDb/43CiK2ifw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727799116; a=rsa-sha256; cv=none; b=gKKplz+wGjiRXWjD84Jo9NUsjw0mEwMwf/NMTMjBZaf4pWZkxVm9BuUTxUiis53AV4w1Xx KGZQfwm+2nNUZGCjlRB8dliYtOueBSWG6FKzIiz3E7O/b9T7KS/59BBK5gFfP5Iuz8Jxcx kUDQVCm5tDbfdRPs4JR24JOQ2z4oaDDQyLi+A98LAd4tluB7alKTMhgnaOscd5mt6tehoO WSnaKLF9gTQ10F4aEk9PC+eYrWOVcF3HhJnhFEr8w14DYoMkeZs7OfvV4JSY62oDtcM79d paHv9GUpAGKkfoTyYAtSkZZSSVs2TIVqcFL42kPYKCdYwiFfqzaNs8MveZzCsA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XJ2y45dMNzkYd; Tue, 1 Oct 2024 16:11:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 491GBuNQ037539; Tue, 1 Oct 2024 16:11:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 491GBuXs037536; Tue, 1 Oct 2024 16:11:56 GMT (envelope-from git) Date: Tue, 1 Oct 2024 16:11:56 GMT Message-Id: <202410011611.491GBuXs037536@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: e668866c82f4 - main - sysent: Remove comment aligning List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e668866c82f487fe36c4e732e3ce18ae9c44260f Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=e668866c82f487fe36c4e732e3ce18ae9c44260f commit e668866c82f487fe36c4e732e3ce18ae9c44260f Author: agge3 AuthorDate: 2024-09-25 10:49:04 +0000 Commit: Brooks Davis CommitDate: 2024-10-01 16:08:41 +0000 sysent: Remove comment aligning Comment aligning was inconsistent and required a ton of book-keeping. Replaced comment aligning with a simple, single tab out. Pull Request: https://github.com/freebsd/freebsd-src/pull/1441 Signed-off-by: agge3 --- sys/tools/makesyscalls.lua | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/sys/tools/makesyscalls.lua b/sys/tools/makesyscalls.lua index a87c8c421313..fcabe8e5e284 100644 --- a/sys/tools/makesyscalls.lua +++ b/sys/tools/makesyscalls.lua @@ -637,15 +637,6 @@ local function get_mask_pat(pflags) return mask end -local function align_sysent_comment(col) - write_line("sysent", "\t") - col = col + 8 - col % 8 - while col < 56 do - write_line("sysent", "\t") - col = col + 8 - end -end - local function strip_arg_annotations(arg) arg = arg:gsub("_Contains_[^ ]*[_)] ?", "") arg = arg:gsub("_In[^ ]*[_)] ?", "") @@ -888,20 +879,17 @@ local function handle_noncompat(sysnum, thr_flag, flags, sysflags, rettype, write_line("sysent", string.format("\t{ .sy_narg = %s, .sy_call = (sy_call_t *)", argssize)) - local column = 8 + 2 + #argssize + 15 if flags & known_flags.SYSMUX ~= 0 then write_line("sysent", string.format( "nosys, .sy_auevent = AUE_NULL, " .. ".sy_flags = %s, .sy_thrcnt = SY_THR_STATIC },", sysflags)) - column = column + #"nosys" + #"AUE_NULL" + 3 elseif flags & known_flags.NOSTD ~= 0 then write_line("sysent", string.format( "lkmressys, .sy_auevent = AUE_NULL, " .. ".sy_flags = %s, .sy_thrcnt = SY_THR_ABSENT },", sysflags)) - column = column + #"lkmressys" + #"AUE_NULL" + 3 else if funcname == "nosys" or funcname == "lkmnosys" or funcname == "sysarch" or funcname:find("^freebsd") or @@ -909,17 +897,14 @@ local function handle_noncompat(sysnum, thr_flag, flags, sysflags, rettype, write_line("sysent", string.format( "%s, .sy_auevent = %s, .sy_flags = %s, .sy_thrcnt = %s },", funcname, auditev, sysflags, thr_flag)) - column = column + #funcname + #auditev + #sysflags + 3 else write_line("sysent", string.format( "sys_%s, .sy_auevent = %s, .sy_flags = %s, .sy_thrcnt = %s },", funcname, auditev, sysflags, thr_flag)) - column = column + #funcname + #auditev + #sysflags + 7 end end - align_sysent_comment(column) - write_line("sysent", string.format("/* %d = %s */\n", + write_line("sysent", string.format("\t/* %d = %s */\n", sysnum, funcalias)) write_line("sysnames", string.format("\t\"%s\",\t\t\t/* %d = %s */\n", funcalias, sysnum, funcalias)) @@ -987,9 +972,8 @@ local function handle_obsol(sysnum, funcname, comment) write_line("sysent", "\t{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, " .. ".sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT },") - align_sysent_comment(34) - write_line("sysent", string.format("/* %d = obsolete %s */\n", + write_line("sysent", string.format("\t/* %d = obsolete %s */\n", sysnum, comment)) write_line("sysnames", string.format( "\t\"obs_%s\",\t\t\t/* %d = obsolete %s */\n", @@ -1058,17 +1042,13 @@ local function handle_compat(sysnum, thr_flag, flags, sysflags, rettype, ".sy_auevent = %s, .sy_flags = 0, " .. ".sy_thrcnt = SY_THR_ABSENT },", "0", "lkmressys", "AUE_NULL")) - align_sysent_comment(8 + 2 + #"0" + 15 + #"lkmressys" + - #"AUE_NULL" + 3) else write_line("sysent", string.format( "\t{ %s(%s,%s), .sy_auevent = %s, .sy_flags = %s, .sy_thrcnt = %s },", wrap, argssize, funcname, auditev, sysflags, thr_flag)) - align_sysent_comment(8 + 9 + #argssize + 1 + #funcname + - #auditev + #sysflags + 4) end - write_line("sysent", string.format("/* %d = %s %s */\n", + write_line("sysent", string.format("\t/* %d = %s %s */\n", sysnum, descr, funcalias)) write_line("sysnames", string.format( "\t\"%s.%s\",\t\t/* %d = %s %s */\n", @@ -1098,7 +1078,7 @@ local function handle_unimpl(sysnum, sysstart, sysend, comment) write_line("sysent", string.format( "\t{ .sy_narg = 0, .sy_call = (sy_call_t *)nosys, " .. ".sy_auevent = AUE_NULL, .sy_flags = 0, " .. - ".sy_thrcnt = SY_THR_ABSENT },\t\t\t/* %d = %s */\n", + ".sy_thrcnt = SY_THR_ABSENT },\t/* %d = %s */\n", sysnum, comment)) write_line("sysnames", string.format( "\t\"#%d\",\t\t\t/* %d = %s */\n",