Package: ksensors
Version: 0.7.3-16
Severity: normal
Tags: patch


-- System Information:
Debian Release: lenny/sid
  APT prefers oldstable
  APT policy: (500, 'oldstable'), (400, 'testing'), (200, 'unstable'), (199, 
'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.18.1 (PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages ksensors depends on:
ii  kdelibs4c2a             4:3.5.7.dfsg.1-6 core libraries and binaries for al
ii  libc6                   2.6.1-1+b1       GNU C Library: Shared libraries
ii  libgcc1                 1:4.2.1-4        GCC support library
ii  libqt3-mt               3:3.3.7-7        Qt GUI Library (Threaded runtime v
ii  libsensors3             1:2.10.4-1       library to read temperature/voltag
ii  libstdc++6              4.2.1-4          The GNU Standard C++ Library v3
ii  lm-sensors              1:2.10.4-1       utilities to read temperature/volt

Versions of packages ksensors recommends:
pn  hddtemp                       <none>     (no description available)

-- debconf information:
  ksensors/v6:

Ksensors is set up to only read from /proc/acpi/thermal_zone/THRM.  On my 
motherboard the bios maker is using THM instead.
I have included a patch to read from both THRM and THM.
diff -urN ./ksensors-0.7.3.orig/src/procinfo.cpp ./ksensors-0.7.3/src/procinfo.cpp
--- ./ksensors-0.7.3.orig/src/procinfo.cpp	2003-10-26 14:45:41.000000000 -0800
+++ ./ksensors-0.7.3/src/procinfo.cpp	2007-08-27 18:42:27.000000000 -0700
@@ -84,11 +84,13 @@
 {
 char buf[128];
 
-    if(read_file("/proc/acpi/thermal_zone/THRM/temperature", buf, sizeof(buf))<= 0)  return -1;
+    if((read_file("/proc/acpi/thermal_zone/THRM/temperature", buf, sizeof(buf))> 0) || (read_file("/proc/acpi/thermal_zone/THM/temperature", buf, sizeof(buf))> 0))
+    {
+	sscanf(buf, "temperature: %lf C", cpuTemp);
+	return 0;
+    }
 
-    sscanf(buf, "temperature: %lf C", cpuTemp);
-
-    return 0;
+    return -1;
 }
 
 

Reply via email to