From c00af9aab3f48251f5b29d73fde9c192f44ea87e Mon Sep 17 00:00:00 2001 From: pav Date: Mon, 25 Oct 2004 21:42:01 +0000 Subject: - Fix acpitemp function by changing type from double to int (we get temp in kelvins (int) and then convert it in celsius (double)). Reported by: Aurel Bodenmann PR: ports/73087 Submitted by: Roman Bogorodskiy (maintainer) --- sysutils/torsmo/Makefile | 2 +- sysutils/torsmo/files/freebsd.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sysutils') diff --git a/sysutils/torsmo/Makefile b/sysutils/torsmo/Makefile index 930938e1a2d5..b9281dc2944b 100644 --- a/sysutils/torsmo/Makefile +++ b/sysutils/torsmo/Makefile @@ -7,7 +7,7 @@ PORTNAME= torsmo PORTVERSION= 0.17 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= sysutils MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} diff --git a/sysutils/torsmo/files/freebsd.c b/sysutils/torsmo/files/freebsd.c index cd5e9b00d8c2..19916df13dab 100644 --- a/sysutils/torsmo/files/freebsd.c +++ b/sysutils/torsmo/files/freebsd.c @@ -295,8 +295,8 @@ void get_load_average(double v[3]) { } double get_acpi_temperature(int fd) { - double temp; - + int temp; + if (GETSYSCTL("hw.acpi.thermal.tz0.temperature", temp)) { (void)fprintf(stderr, "Cannot read sysctl \"hw.acpi.thermal.tz0.temperature\"\n"); temp = -1.0; -- cgit