git: 2406867f5b17 - main - tslog: Add CTLFLAG_SKIP to sysctls

From: Colin Percival <cperciva_at_FreeBSD.org>
Date: Sun, 20 Mar 2022 18:32:06 UTC
The branch main has been updated by cperciva:

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

commit 2406867f5b178a81c653b14524c0d5bad8189d2c
Author:     Colin Percival <cperciva@FreeBSD.org>
AuthorDate: 2022-03-20 17:41:58 +0000
Commit:     Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2022-03-20 18:31:16 +0000

    tslog: Add CTLFLAG_SKIP to sysctls
    
    The timestamp logs are quite large (often much larger than all the
    other sysctls combined) so it's unlikely anyone will want to have
    them displayed by `sysctl -a`.
    
    MFC after:      2 weeks
    Differential Revision:  https://reviews.freebsd.org/D34616
---
 sys/kern/kern_tslog.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sys/kern/kern_tslog.c b/sys/kern/kern_tslog.c
index 0e7ad3c9ff23..5eba7719880d 100644
--- a/sys/kern/kern_tslog.c
+++ b/sys/kern/kern_tslog.c
@@ -131,7 +131,8 @@ sysctl_debug_tslog(SYSCTL_HANDLER_ARGS)
 	return (error);
 }
 
-SYSCTL_PROC(_debug, OID_AUTO, tslog, CTLTYPE_STRING|CTLFLAG_RD|CTLFLAG_MPSAFE,
+SYSCTL_PROC(_debug, OID_AUTO, tslog,
+    CTLTYPE_STRING|CTLFLAG_RD|CTLFLAG_MPSAFE|CTLFLAG_SKIP,
     0, 0, sysctl_debug_tslog, "", "Dump recorded event timestamps");
 
 MALLOC_DEFINE(M_TSLOGUSER, "tsloguser", "Strings used by userland tslog");
@@ -215,5 +216,6 @@ sysctl_debug_tslog_user(SYSCTL_HANDLER_ARGS)
 }
 
 SYSCTL_PROC(_debug, OID_AUTO, tslog_user,
-    CTLTYPE_STRING|CTLFLAG_RD|CTLFLAG_MPSAFE, 0, 0, sysctl_debug_tslog_user,
+    CTLTYPE_STRING|CTLFLAG_RD|CTLFLAG_MPSAFE|CTLFLAG_SKIP,
+    0, 0, sysctl_debug_tslog_user,
     "", "Dump recorded userland event timestamps");