[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250701-jag-sysctldoc-v1-2-936912553f58@kernel.org>
Date: Tue, 01 Jul 2025 10:56:43 +0200
From: Joel Granados <joel.granados@...nel.org>
To: Kees Cook <kees@...nel.org>, Jonathan Corbet <corbet@....net>,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>, Albert Ou <aou@...s.berkeley.edu>,
Alexandre Ghiti <alex@...ti.fr>
Cc: linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-doc@...r.kernel.org, linux-riscv@...ts.infradead.org,
Joel Granados <joel.granados@...nel.org>
Subject: [PATCH 2/6] docs: Use skiplist when checking sysctl admin-guide
Use a skiplist to "skip" the titles in the guide documentation
(Documentation/admin-guide/sysctl/*) that are not sysctls. This will
give a more accurate account of what sysctl are miss-documented.
Signed-off-by: Joel Granados <joel.granados@...nel.org>
---
scripts/check-sysctl-docs | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/scripts/check-sysctl-docs b/scripts/check-sysctl-docs
index 178dcf2888ffd21845e8464fc2595052c02ff4a3..568197cb1c0a84147785f05aabbbc6ab9dd896bc 100755
--- a/scripts/check-sysctl-docs
+++ b/scripts/check-sysctl-docs
@@ -17,6 +17,18 @@ BEGIN {
print "Please specify the table to look for using the table variable" > "/dev/stderr"
exit 1
}
+
+ # Documentation title skiplist
+ skiplist[0] = "^Documentation for"
+ skiplist[1] = "Network core options$"
+ skiplist[2] = "POSIX message queues filesystem$"
+ skiplist[3] = "Configuration options"
+ skiplist[4] = ". /proc/sys/fs"
+ skiplist[5] = "^Introduction$"
+ skiplist[6] = "^seccomp$"
+ skiplist[7] = "^pty$"
+ skiplist[8] = "^firmware_config$"
+ skiplist[9] = "^random$"
}
# The following globals are used:
@@ -53,10 +65,11 @@ function printentry(entry) {
# Stage 1: build the list of documented entries
FNR == NR && /^=+$/ {
- if (prevline ~ /Documentation for/) {
- # This is the main title
- next
- }
+ for (i in skiplist) {
+ if (prevline ~ skiplist[i]) {
+ next
+ }
+ }
# The previous line is a section title, parse it
$0 = prevline
--
2.47.2
Powered by blists - more mailing lists