]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
docs: Add awk section for ucount sysctl entries
authorJoel Granados <joel.granados@kernel.org>
Tue, 1 Jul 2025 08:07:04 +0000 (10:07 +0200)
committerJoel Granados <joel.granados@kernel.org>
Wed, 23 Jul 2025 09:57:05 +0000 (11:57 +0200)
Adjust the sysctl table detection to include the macro pattern used for
the ucount ctl_tables. This prevents falsly assigning them as
non-documented ctl_tables

Signed-off-by: Joel Granados <joel.granados@kernel.org>
scripts/check-sysctl-docs

index 568197cb1c0a84147785f05aabbbc6ab9dd896bc..3166012b9c6ea4435dc77afaadcff3a4944b1ca8 100755 (executable)
@@ -130,6 +130,14 @@ curtable && /\.procname[\t ]*=[\t ]*".+"/ {
     file[curentry] = FILENAME
 }
 
+curtable && /UCOUNT_ENTRY.*/ {
+    match($0, /UCOUNT_ENTRY\("([^"]+)"\)/, names)
+    curentry = names[1]
+    if (debug) print "Adding entry " curentry " to table " curtable
+    entries[curtable][curentry]++
+    file[curentry] = FILENAME
+}
+
 /register_sysctl.*/ {
     match($0, /register_sysctl(|_init|_sz)\("([^"]+)" *, *([^,)]+)/, tables)
     if (debug) print "Registering table " tables[3] " at " tables[2]