Page MenuHomeFreeBSD

kern_sysctl: Fix sysctl leaf re-use warnings
ClosedPublic

Authored by zlei on Thu, Jan 23, 7:02 PM.

Details

Summary

The original PR 221853 actually requested to distinguish which function (the caller) emits the re-use warning, while the implementation sysctl_warn_reuse() has the parameter func (function name ) passed in but not used. That renders the warning message less useful.

Fix: 4ae2ade11426 Enhance debugibility of sysctl leaf re-use warnings
MFC after: 1 week

Test Plan

Before this change:

# sysctl sysctl.reuse_test
sysctl_warn_reuse: can't re-use a leaf (sysctl.reuse_test)!

After the change:

# sysctl sysctl.reuse_test
sysctl_reuse_test: can't re-use a leaf (sysctl.reuse_test)!

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

zlei requested review of this revision.Thu, Jan 23, 7:02 PM
This revision was not accepted when it landed; it landed in state Needs Review.Sat, Jan 25, 6:00 PM
This revision was automatically updated to reflect the committed changes.