Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Mar 2019 23:44:40 +0000 (UTC)
From:      Oleksandr Tymoshenko <gonzo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r345463 - stable/12/share/examples/kld/dyn_sysctl
Message-ID:  <201903232344.x2NNie2t010569@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gonzo
Date: Sat Mar 23 23:44:40 2019
New Revision: 345463
URL: https://svnweb.freebsd.org/changeset/base/345463

Log:
  MFC r345220:
  
  Fix build for KLD dyn_sysctl example
  
  Looks like the example was broken by change of SYSCTL_STATIC_CHILDREN
  definition in r267992. Fix build by switching to using SYSCTL_ADD_ROOT_NODE
  
  PR:		236139
  Submitted by:	Andrew Reiter <arr@watson.org>

Modified:
  stable/12/share/examples/kld/dyn_sysctl/dyn_sysctl.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/share/examples/kld/dyn_sysctl/dyn_sysctl.c
==============================================================================
--- stable/12/share/examples/kld/dyn_sysctl/dyn_sysctl.c	Sat Mar 23 23:43:33 2019	(r345462)
+++ stable/12/share/examples/kld/dyn_sysctl/dyn_sysctl.c	Sat Mar 23 23:44:40 2019	(r345463)
@@ -72,12 +72,10 @@ load(module_t mod, int cmd, void *arg)
 		 * to different contexts.
 		 */
 		printf("TREE		ROOT		  NAME\n");
-		a_root = SYSCTL_ADD_NODE(&clist,
-			SYSCTL_STATIC_CHILDREN(/* top of sysctl tree */),
+		a_root = SYSCTL_ADD_ROOT_NODE(&clist,
 			OID_AUTO, "dyn_sysctl", CTLFLAG_RW, 0,
 			"dyn_sysctl root node");
-		a_root = SYSCTL_ADD_NODE(&clist1,
-			SYSCTL_STATIC_CHILDREN(/* top of sysctl tree */),
+		a_root = SYSCTL_ADD_ROOT_NODE(&clist1,
 			OID_AUTO, "dyn_sysctl", CTLFLAG_RW, 0,
 			"dyn_sysctl root node");
 		if (a_root == NULL) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903232344.x2NNie2t010569>