changeset 67802:91c501f75eea

(battery-linux-proc-acpi): Also try `/proc/acpi/thermal_zone/THM0/temperature'.
author Romain Francoise <romain@orebokech.com>
date Sun, 25 Dec 2005 14:09:57 +0000
parents 66142acef663
children 4009e1aa393f
files lisp/ChangeLog lisp/battery.el
diffstat 2 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sat Dec 24 17:35:22 2005 +0000
+++ b/lisp/ChangeLog	Sun Dec 25 14:09:57 2005 +0000
@@ -1,3 +1,8 @@
+2005-12-25  Romain Francoise  <romain@orebokech.com>
+
+	* battery.el (battery-linux-proc-acpi): Also try
+	`/proc/acpi/thermal_zone/THM0/temperature'.
+
 2005-12-24  Chong Yidong  <cyd@stupidchicken.com>
 
 	* custom.el (custom-push-theme): Fix docstring.
--- a/lisp/battery.el	Sat Dec 24 17:35:22 2005 +0000
+++ b/lisp/battery.el	Sun Dec 25 14:09:57 2005 +0000
@@ -347,6 +347,14 @@
 			   (when (re-search-forward
 				  "temperature: +\\([0-9]+\\) C$" nil t)
 			     (match-string 1))))
+		       (when (file-exists-p
+			      "/proc/acpi/thermal_zone/THM0/temperature")
+			 (with-temp-buffer
+			   (insert-file-contents
+			    "/proc/acpi/thermal_zone/THM0/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"))