changeset 70539:b270f677c979

(battery-linux-proc-acpi): Also try `/proc/acpi/thermal_zone/THR2/temperature'.
author Juri Linkov <juri@jurta.org>
date Tue, 09 May 2006 22:43:35 +0000
parents 08c09d92fecc
children b0678252450c
files lisp/battery.el
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/battery.el	Tue May 09 19:48:03 2006 +0000
+++ b/lisp/battery.el	Tue May 09 22:43:35 2006 +0000
@@ -386,6 +386,14 @@
 			   (when (re-search-forward
 				  "temperature: +\\([0-9]+\\) C$" nil t)
 			     (match-string 1))))
+		       (when (file-exists-p
+			      "/proc/acpi/thermal_zone/THR2/temperature")
+			 (with-temp-buffer
+			   (insert-file-contents
+			    "/proc/acpi/thermal_zone/THR2/temperature")
+			   (when (re-search-forward
+				  "temperature: +\\([0-9]+\\) C$" nil t)
+			     (match-string 1))))
 		       "N/A"))
 	  (cons ?r (or (and rate (concat (number-to-string rate) " "
 					 rate-type)) "N/A"))