acpi/pstate: Rename sysctl node available_bin to avail
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 28 Jun 2015 11:51:19 +0000 (19:51 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Mon, 29 Jun 2015 01:31:29 +0000 (09:31 +0800)
And hide sysctl node available from sysctl list.

sys/dev/acpica/acpi_cpu_pstate.c
usr.sbin/powerd/powerd.c

index 380c926..45b1a11 100644 (file)
@@ -1095,16 +1095,16 @@ acpi_pst_postattach(void *arg __unused)
                SYSCTL_ADD_PROC(&dom->pd_sysctl_ctx,
                                SYSCTL_CHILDREN(dom->pd_sysctl_tree),
                                OID_AUTO, "available",
-                               CTLTYPE_STRING | CTLFLAG_RD,
+                               CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_SKIP,
                                dom, 0, acpi_pst_sysctl_freqs, "A",
                                "available frequencies");
 
                SYSCTL_ADD_PROC(&dom->pd_sysctl_ctx,
                                SYSCTL_CHILDREN(dom->pd_sysctl_tree),
-                               OID_AUTO, "available_bin",
+                               OID_AUTO, "avail",
                                CTLTYPE_OPAQUE | CTLFLAG_RD,
                                dom, 0, acpi_pst_sysctl_freqs_bin, "IU",
-                               "available frequencies (binary format)");
+                               "available frequencies");
 
                SYSCTL_ADD_PROC(&dom->pd_sysctl_ctx,
                                SYSCTL_CHILDREN(dom->pd_sysctl_tree),
index 59f3d19..ba6b6bc 100644 (file)
@@ -489,8 +489,7 @@ acpi_getcpufreq_bin(int dom_id, int *highest0, int *lowest0)
        /*
         * Retrieve availability list
         */
-       snprintf(sysid, sizeof(sysid), "hw.acpi.cpu.px_dom%d.available_bin",
-           dom_id);
+       snprintf(sysid, sizeof(sysid), "hw.acpi.cpu.px_dom%d.avail", dom_id);
        freqlen = sizeof(freq);
        if (sysctlbyname(sysid, freq, &freqlen, NULL, 0) < 0)
                return 0;