]> xenbits.xensource.com Git - people/royger/freebsd.git/commitdiff
Remove the only user of sysctl_add_oid().
authored <ed@FreeBSD.org>
Tue, 13 Dec 2016 07:58:30 +0000 (07:58 +0000)
committered <ed@FreeBSD.org>
Tue, 13 Dec 2016 07:58:30 +0000 (07:58 +0000)
My plan is to change this function's prototype at some point in the
future to add a new label argument, which can be used to export all of
sysctl as metrics that can be scraped by Prometheus. Switch over this
caller to use the macro wrapper counterpart.

sys/compat/linuxkpi/common/include/linux/sysfs.h

index 68c6e9224d9f8d412be9e10a27cd135718f003bb..f16c38b90efca2fe7860d967f4706683e2e81617 100644 (file)
@@ -126,7 +126,7 @@ static inline int
 sysfs_create_file(struct kobject *kobj, const struct attribute *attr)
 {
 
-       sysctl_add_oid(NULL, SYSCTL_CHILDREN(kobj->oidp), OID_AUTO,
+       SYSCTL_ADD_OID(NULL, SYSCTL_CHILDREN(kobj->oidp), OID_AUTO,
            attr->name, CTLTYPE_STRING|CTLFLAG_RW|CTLFLAG_MPSAFE, kobj,
            (uintptr_t)attr, sysctl_handle_attr, "A", "");
 
@@ -158,7 +158,7 @@ sysfs_create_group(struct kobject *kobj, const struct attribute_group *grp)
        oidp = SYSCTL_ADD_NODE(NULL, SYSCTL_CHILDREN(kobj->oidp),
            OID_AUTO, grp->name, CTLFLAG_RD|CTLFLAG_MPSAFE, NULL, grp->name);
        for (attr = grp->attrs; *attr != NULL; attr++) {
-               sysctl_add_oid(NULL, SYSCTL_CHILDREN(oidp), OID_AUTO,
+               SYSCTL_ADD_OID(NULL, SYSCTL_CHILDREN(oidp), OID_AUTO,
                    (*attr)->name, CTLTYPE_STRING|CTLFLAG_RW|CTLFLAG_MPSAFE,
                    kobj, (uintptr_t)*attr, sysctl_handle_attr, "A", "");
        }