Skip to content

Commit

Permalink
Fix build for KLD dyn_sysctl example
Browse files Browse the repository at this point in the history
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 <[email protected]>
MFC after:	1 week
  • Loading branch information
gonzoua committed Mar 16, 2019
1 parent ab0a793 commit 0004c28
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions share/examples/kld/dyn_sysctl/dyn_sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 0004c28

Please sign in to comment.