|Summary:||dyn_sysctl KLD example no longer compiles, patch included|
|Product:||Base System||Reporter:||Andrew Reiter <arr>|
|Component:||misc||Assignee:||Oleksandr Tymoshenko <gonzo>|
|Severity:||Affects Only Me||CC:||emaste, gonzo|
Description Andrew Reiter 2019-03-01 20:21:14 UTC
Created attachment 202489 [details] patch to fix build of dyn_sysctl kld example The dyn_sysctl example KLD for showing use of sysctls via a kernel module seems to have been broken since 11.0 release. I have not been tracking, so I am not sure, exactly. It seems that the quick fix is to adjust the API use for adding a root node, I believe. I am attaching a patch for this. It seems a similar bug is affecting the compilation of a port, but I cannot for the life remember which one it is right now.
Comment 1 Conrad Meyer 2019-03-01 20:39:48 UTC
LGTM. We ran into a similar issue migrating an out of tree 10ish module that added a sysctl root to 11ish, so I believe you are also correct about the timeframe.
Comment 2 Andrew Reiter 2019-03-15 14:47:36 UTC
Anything I can do to move this forward? I know it is a minor change, so mostly just curious how I can help.
Comment 3 Oleksandr Tymoshenko 2019-03-16 04:24:40 UTC
Committed, thanks for submitting it. I'll take care of MFC to stable branches in a week.
Comment 4 commit-hook 2019-03-16 04:24:53 UTC
A commit references this bug: Author: gonzo Date: Sat Mar 16 04:24:02 UTC 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 <firstname.lastname@example.org> MFC after: 1 week Changes: head/share/examples/kld/dyn_sysctl/dyn_sysctl.c
Comment 5 Andrew Reiter 2019-03-22 15:28:38 UTC
Comment 6 commit-hook 2019-03-23 23:44:56 UTC
A commit references this bug: Author: gonzo Date: Sat Mar 23 23:44:40 UTC 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 <email@example.com> Changes: _U stable/12/ stable/12/share/examples/kld/dyn_sysctl/dyn_sysctl.c