Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Mar 2019 04:24:02 +0000 (UTC)
From:      Oleksandr Tymoshenko <gonzo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r345220 - head/share/examples/kld/dyn_sysctl
Message-ID:  <201903160424.x2G4O2AD009308@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gonzo
Date: Sat Mar 16 04:24:02 2019
New Revision: 345220
URL: https://svnweb.freebsd.org/changeset/base/345220

Log:
  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>
  MFC after:	1 week

Modified:
  head/share/examples/kld/dyn_sysctl/dyn_sysctl.c

Modified: head/share/examples/kld/dyn_sysctl/dyn_sysctl.c
==============================================================================
--- head/share/examples/kld/dyn_sysctl/dyn_sysctl.c	Sat Mar 16 04:02:19 2019	(r345219)
+++ head/share/examples/kld/dyn_sysctl/dyn_sysctl.c	Sat Mar 16 04:24:02 2019	(r345220)
@@ -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?201903160424.x2G4O2AD009308>