Page MenuHomeFreeBSD

Change sysctl_add_oid use to SYSCTL_ADD_OID
ClosedPublic

Authored by ngie on Feb 21 2017, 5:43 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
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

ngie updated this revision to Diff 25456.Feb 21 2017, 5:43 AM
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.Feb 21 2017, 5:57 AM
ngie updated this object.
ngie updated this object.
ngie added subscribers: ed, dim.
ed accepted this revision.Feb 21 2017, 6:12 AM
ed added a reviewer: ed.
This revision is now accepted and ready to land.Feb 21 2017, 6:12 AM
ngie added a comment.Feb 21 2017, 7:27 AM

I'll bump the port version at commit time.

ngie updated this revision to Diff 25457.Feb 21 2017, 7:53 AM
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 a subscriber: lwhsu.Feb 21 2017, 6:48 PM
lwhsu added inline comments.
emulators/open-vm-tools/Makefile
7 ↗(On Diff #25457)

Bump PORTREVISION is enough, no need to touch PORTEPOCH

ngie updated this revision to Diff 25489.Feb 21 2017, 6:50 PM
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 accepted this revision.Feb 21 2017, 7:01 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
ngie added a comment.Feb 21 2017, 7:16 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.