From owner-svn-ports-all@freebsd.org Tue Oct 4 20:07:16 2016 Return-Path: Delivered-To: svn-ports-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 8F658AF575F; Tue, 4 Oct 2016 20:07:16 +0000 (UTC) (envelope-from madpilot@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 5F435C8; Tue, 4 Oct 2016 20:07:16 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u94K7FSr033338; Tue, 4 Oct 2016 20:07:15 GMT (envelope-from madpilot@FreeBSD.org) Received: (from madpilot@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u94K7Fah033336; Tue, 4 Oct 2016 20:07:15 GMT (envelope-from madpilot@FreeBSD.org) Message-Id: <201610042007.u94K7Fah033336@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: madpilot set sender to madpilot@FreeBSD.org using -f From: Guido Falsi Date: Tue, 4 Oct 2016 20:07:15 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r423301 - in head/sysutils/conky: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 20:07:16 -0000 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) {