Author: kaktus
Date: Mon Jan  6 19:47:59 2020
New Revision: 356425
URL: https://svnweb.freebsd.org/changeset/base/356425

Log:
  kern_sysctl: make sysctl.debug work as intended
  
  r136999 introduced SYSTCL_DEBUG but apparently "opt_sysctl.h" was never
  included making the option ignored.
  
  r322954 introduced sysctl.reuse_test with OID number equal to 0, effectively
  shadowing the very special sysctl.debug one. Use OID_AUTO as it doesn't need
  any special treatment.
  
  Reviewed by:  kib (mentor)
  Approved by:  kib (mentor)
  Differential Revision:        https://reviews.freebsd.org/D23056

Modified:
  head/sys/kern/kern_sysctl.c

Modified: head/sys/kern/kern_sysctl.c
==============================================================================
--- head/sys/kern/kern_sysctl.c Mon Jan  6 19:35:22 2020        (r356424)
+++ head/sys/kern/kern_sysctl.c Mon Jan  6 19:47:59 2020        (r356425)
@@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$");
 #include "opt_capsicum.h"
 #include "opt_ddb.h"
 #include "opt_ktrace.h"
+#include "opt_sysctl.h"
 
 #include <sys/param.h>
 #include <sys/fail.h>
@@ -404,8 +405,9 @@ sysctl_reuse_test(SYSCTL_HANDLER_ARGS)
        SYSCTL_RUNLOCK(&tracker);
        return (0);
 }
-SYSCTL_PROC(_sysctl, 0, reuse_test, CTLTYPE_STRING|CTLFLAG_RD|CTLFLAG_MPSAFE,
-       0, 0, sysctl_reuse_test, "-", "");
+SYSCTL_PROC(_sysctl, OID_AUTO, reuse_test,
+    CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, 0, 0, sysctl_reuse_test, "-",
+    "");
 #endif
 
 void
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to