From owner-svn-src-all@freebsd.org Wed Dec 14 13:00:29 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03362C769C0; Wed, 14 Dec 2016 13:00:29 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C72C4177A; Wed, 14 Dec 2016 13:00:28 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBED0RIO013053; Wed, 14 Dec 2016 13:00:27 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBED0RPk013052; Wed, 14 Dec 2016 13:00:27 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201612141300.uBED0RPk013052@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Wed, 14 Dec 2016 13:00:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r310054 - head/sys/dev/acpica X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Dec 2016 13:00:29 -0000 Author: ed Date: Wed Dec 14 13:00:27 2016 New Revision: 310054 URL: https://svnweb.freebsd.org/changeset/base/310054 Log: Attach a "thermal_zone" label to the ACPI thermal zone sysctls. In order to make Prometheus do graphing/alerting on thermal sensors in a generic fashion, we should attach the name of the thermal zone device as a label. That way there is only a single metric for the temperature of a thermal zone, with its name attached as a label. Reviewed by: cem Differential Revision: https://reviews.freebsd.org/D8775 Modified: head/sys/dev/acpica/acpi_thermal.c Modified: head/sys/dev/acpica/acpi_thermal.c ============================================================================== --- head/sys/dev/acpica/acpi_thermal.c Wed Dec 14 12:56:58 2016 (r310053) +++ head/sys/dev/acpica/acpi_thermal.c Wed Dec 14 13:00:27 2016 (r310054) @@ -258,9 +258,9 @@ acpi_tz_attach(device_t dev) } sysctl_ctx_init(&sc->tz_sysctl_ctx); sprintf(oidname, "tz%d", device_get_unit(dev)); - sc->tz_sysctl_tree = SYSCTL_ADD_NODE(&sc->tz_sysctl_ctx, - SYSCTL_CHILDREN(acpi_tz_sysctl_tree), - OID_AUTO, oidname, CTLFLAG_RD, 0, ""); + sc->tz_sysctl_tree = SYSCTL_ADD_NODE_WITH_LABEL(&sc->tz_sysctl_ctx, + SYSCTL_CHILDREN(acpi_tz_sysctl_tree), + OID_AUTO, oidname, CTLFLAG_RD, 0, "", "thermal_zone"); SYSCTL_ADD_PROC(&sc->tz_sysctl_ctx, SYSCTL_CHILDREN(sc->tz_sysctl_tree), OID_AUTO, "temperature", CTLTYPE_INT | CTLFLAG_RD, &sc->tz_temperature, 0, sysctl_handle_int,