svn commit: r423301 - in head/sysutils/conky: . files
Guido Falsi
madpilot at FreeBSD.org
Tue Oct 4 20:07:16 UTC 2016
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 at 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 at 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) {
More information about the svn-ports-all
mailing list