(battery-linux-proc-acpi): Also try `/proc/acpi/thermal_zone/THR2/temperature'.
authorJuri Linkov <juri@jurta.org>
Tue, 9 May 2006 22:43:35 +0000 (22:43 +0000)
committerJuri Linkov <juri@jurta.org>
Tue, 9 May 2006 22:43:35 +0000 (22:43 +0000)
lisp/battery.el

index 34f74aa..50edc8d 100644 (file)
@@ -386,6 +386,14 @@ The following %-sequences are provided:
                           (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"))