Date: Tue, 4 Oct 2016 20:07:15 +0000 (UTC) From: Guido Falsi <madpilot@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r423301 - in head/sysutils/conky: . files Message-ID: <201610042007.u94K7Fah033336@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: madpilot Date: Tue Oct 4 20:07:15 2016 New Revision: 423301 URL: https://svnweb.freebsd.org/changeset/ports/423301 Log: Make conky try to get CPU temperature from more than just one sysctl. PR: 210235 Submitted by: walter@pelissero.de Added: head/sysutils/conky/files/patch-src_freebsd.cc (contents, props changed) Modified: head/sysutils/conky/Makefile Modified: head/sysutils/conky/Makefile ============================================================================== --- head/sysutils/conky/Makefile Tue Oct 4 20:05:14 2016 (r423300) +++ head/sysutils/conky/Makefile Tue Oct 4 20:07:15 2016 (r423301) @@ -4,6 +4,7 @@ PORTNAME= conky PORTVERSION= 1.10.5 DISTVERSIONPREFIX= v +PORTREVISION= 1 CATEGORIES= sysutils MAINTAINER= madpilot@FreeBSD.org Added: head/sysutils/conky/files/patch-src_freebsd.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/conky/files/patch-src_freebsd.cc Tue Oct 4 20:07:15 2016 (r423301) @@ -0,0 +1,24 @@ +--- src/freebsd.cc.orig 2016-10-04 07:49:19 UTC ++++ src/freebsd.cc +@@ -426,13 +426,15 @@ double get_acpi_temperature(int fd) + int temp; + (void)fd; + +- if (GETSYSCTL("hw.acpi.thermal.tz0.temperature", temp)) { +- fprintf(stderr, +- "Cannot read sysctl \"hw.acpi.thermal.tz0.temperature\"\n"); +- return 0.0; +- } ++ if (GETSYSCTL("hw.acpi.thermal.tz0.temperature", temp) == 0) ++ return KELVTOC(temp); ++ if (GETSYSCTL("dev.cpu.0.temperature", temp) == 0) ++ return KELVTOC(temp); ++ if (GETSYSCTL("dev.amdtemp.0.core0.sensor0", temp) == 0) ++ return KELVTOC(temp); ++ fprintf(stderr, "Cannot get temperature from sysctl\n"); + +- return KELVTOC(temp); ++ return 0.0; + } + + static void get_battery_stats(int *battime, int *batcapacity, int *batstate, int *ac) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610042007.u94K7Fah033336>