Summary: | sysctl_(add|register)_oid(): Prefix log messages with the function name | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Fabian Keil <fk> | ||||
Component: | kern | Assignee: | Conrad Meyer <cem> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Some People | Keywords: | patch | ||||
Priority: | --- | Flags: | cem:
mfc-stable11-
|
||||
Version: | CURRENT | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
A commit references this bug: Author: cem Date: Sun Aug 27 17:12:31 UTC 2017 New revision: 322954 URL: https://svnweb.freebsd.org/changeset/base/322954 Log: Enhance debugibility of sysctl leaf re-use warnings Print the full conflicting oid path, and include the function name in the warning so it is clear that the warnings are sysctl-related. PR: 221853 Submitted by: Fabian Keil <fk AT fabiankeil.de> (earlier version) Sponsored by: Dell EMC Isilon Changes: head/sys/kern/kern_sysctl.c Thanks for adding the whole oid path. No problem! It's always something I've wanted to have when I see those error messages. |
Created attachment 185809 [details] sysctl_(add|register)_oid(): Prefix log message with the function name The attached patch prefixes the "can't re-use a leaf ..." messages emitted by sysctl_add_oid() and sysctl_register_oid() with the name of the function. This makes it more obvious that the messages are sysctl related and which of the two functions emitted them. Without the patch the messages look like: kernel: can't re-use a leaf (delete_max)! kernel: can't re-use a leaf (minimum_cmd_size)! kernel: can't re-use a leaf (zone_mode)! kernel: can't re-use a leaf (zone_support)! kernel: can't re-use a leaf (optimal_seq_zones)! Obtained from: ElectroBSD