HomeFreeBSD

kern_sysctl: Make name2oid() non-destructive to the name

Description

kern_sysctl: Make name2oid() non-destructive to the name

It is not the first time I see it panicking while trying to modify
const memory. Lets make it safer and easier to use. While there,
mark few functions using it also const.

MFC after: 10 days

(cherry picked from commit f80babf906b7be51b2a031ef26525893c7bf4e31)
(cherry picked from commit 1a1a1728e0bec6e5b978e6c5c7433ca91596b389)

Details

Provenance
mavAuthored on Sep 23 2023, 4:13 PM
zleiCommitted on Thu, Jan 23, 11:09 AM
Parents
rGc44335b1a313: name2oid: use find_oidname
Branches
Unknown
Tags
Unknown