sysctlbyname(2): Remove temporary compatibility layer
Remove temporary compatibility layer introduced in r351729. More that 3 months should be enough for everybody who runs HEAD to upgrade to the new kernel already. Reviewed by: imp, mjg (mentor) Approved by: mjg (mentor) Differential Revision: https://reviews.freebsd.org/D22958
This commit is contained in:
parent
d2d5fee931
commit
150b9e85b6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=356179
@ -33,10 +33,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/sysctl.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "libc_private.h"
|
||||
|
||||
#define SYSCTLBYNAME_OSREL 1300045
|
||||
|
||||
extern int __sysctlbyname(const char *name, size_t namelen, void *oldp,
|
||||
size_t *oldlenp, const void *newp, size_t newlen);
|
||||
|
||||
@ -44,16 +40,9 @@ int
|
||||
sysctlbyname(const char *name, void *oldp, size_t *oldlenp,
|
||||
const void *newp, size_t newlen)
|
||||
{
|
||||
int oid[CTL_MAXNAME];
|
||||
size_t len;
|
||||
|
||||
if (__getosreldate() >= SYSCTLBYNAME_OSREL) {
|
||||
len = strlen(name);
|
||||
return (__sysctlbyname(name, len, oldp, oldlenp, newp,
|
||||
newlen));
|
||||
}
|
||||
len = nitems(oid);
|
||||
if (sysctlnametomib(name, oid, &len) == -1)
|
||||
return (-1);
|
||||
return (sysctl(oid, len, oldp, oldlenp, newp, newlen));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user