Page MenuHomeFreeBSD

Change sysctl_add_oid use to SYSCTL_ADD_OID
ClosedPublic

Authored by ngie on Feb 21 2017, 5:43 AM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 7 2024, 5:08 PM
Unknown Object (File)
Dec 20 2023, 2:49 AM
Unknown Object (File)
Dec 9 2023, 5:36 AM
Unknown Object (File)
Dec 8 2023, 6:22 AM
Unknown Object (File)
Nov 5 2023, 6:11 AM
Unknown Object (File)
Nov 5 2023, 6:11 AM
Unknown Object (File)
Nov 5 2023, 6:11 AM
Unknown Object (File)
Nov 5 2023, 6:11 AM

Details

Summary

sysctl_add_oid was changed in base/head@r310051 to take a label
parameter. SYSCTL_ADD_OID doesn't require the label parameter since its
inception, thus it's a backwards compatible solution for adding sysctl
oids.

PR: 215353
Reported by: dim
Submitted by: ed
Sponsored by: Dell EMC Isilon

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ngie retitled this revision from to Change sysctl_add_oid use to SYSCTL_ADD_OID.
ngie updated this object.
ngie edited the test plan for this revision. (Show Details)
ngie set the repository for this revision to rP FreeBSD ports repository.
ngie added a subscriber: swills.
ngie updated this object.
ngie updated this object.
ngie added subscribers: ed, dim.
ed added a reviewer: ed.
This revision is now accepted and ready to land.Feb 21 2017, 6:12 AM

I'll bump the port version at commit time.

ngie edited edge metadata.

Bump PORT_EPOCH for the change

This revision now requires review to proceed.Feb 21 2017, 7:53 AM
lwhsu added inline comments.
emulators/open-vm-tools/Makefile
7 ↗(On Diff #25457)

Bump PORTREVISION is enough, no need to touch PORTEPOCH

ngie edited edge metadata.

Bump PORTREVISION instead of PORTEPOCH as recommended by lwhsu

ngie marked an inline comment as done.Feb 21 2017, 6:51 PM
ngie added inline comments.
emulators/open-vm-tools/Makefile
7 ↗(On Diff #25457)

Thank you for pointing this out <3! This was what I was curious about because the Porter's Guide didn't note this nuance explicitly.

ngie marked 2 inline comments as done.Feb 21 2017, 6:51 PM
lwhsu added a reviewer: lwhsu.

Since 215353 is maintainer timeout'd. If you have confirmed this works on supported versions other than -CURRENT, I approve this change.

This revision is now accepted and ready to land.Feb 21 2017, 7:01 PM
In D9698#200713, @lwhsu wrote:

Since 215353 is maintainer timeout'd. If you have confirmed this works on supported versions other than -CURRENT, I approve this change.

This change works on ^/stable/10 as well:

$ kldstat 
Id Refs Address            Size     Name
 1   16 0xffffffff80200000 18240f8  kernel
 2    1 0xffffffff81c11000 60ac     fdescfs.ko
 3    1 0xffffffff81c18000 efa8     aio.ko
 4    1 0xffffffff81c27000 c558     mqueuefs.ko
 5    1 0xffffffff81c34000 7a5c     nullfs.ko
 6    1 0xffffffff81c3c000 231a     vmmemctl.ko
 7    1 0xffffffff81c3f000 2382     vmxnet.ko
 8    1 0xffffffff81c42000 2d7c     vmblock.ko
$ uname -a
FreeBSD fbsd10 10.3-STABLE FreeBSD 10.3-STABLE #17 r313791: Wed Feb 15 22:11:30 PST 2017     ngie@fbsd10:/usr/obj/usr/src/sys/GENERIC  amd64
$ pkg info | grep open-vm-
open-vm-tools-1280544_17,1     Open VMware tools for FreeBSD VMware guests

This change should work with all supported versions since SYSCTL_ADD_OID has been formalized for many years:

$ svn log -c 63212
------------------------------------------------------------------------
r63212 | abial | 2000-07-15 03:26:04 -0700 (Sat, 15 Jul 2000) | 21 lines

These patches implement dynamic sysctls. It's possible now to add
and remove sysctl oids at will during runtime - they don't rely on
linker sets. Also, the node oids can be referenced by more than
one kernel user, which means that it's possible to create partially
overlapping trees.

Add sysctl contexts to help programmers manage multiple dynamic
oids in convenient way.

Please see the manpages for detailed discussion, and example module
for typical use.

This work is based on ideas and code snippets coming from many
people, among them:  Arun Sharma, Jonathan Lemon, Doug Rabson,
Brian Feldman, Kelly Yancey, Poul-Henning Kamp and others. I'd like
to specially thank Brian Feldman for detailed review and style
fixes.

PR:             kern/16928
Reviewed by:    dfr, green, phk

------------------------------------------------------------------------
This revision was automatically updated to reflect the committed changes.