Enlightenment CVS committal

Author  : raster
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/modules/battery


Modified Files:
        e_mod_main.c 


Log Message:


fix sys battery reader to support lowercase bats too...
 some other bugs and fixes

===================================================================
RCS file: /cvs/e/e17/apps/e/src/modules/battery/e_mod_main.c,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -3 -r1.104 -r1.105
--- e_mod_main.c        28 Jan 2008 20:37:00 -0000      1.104
+++ e_mod_main.c        26 Feb 2008 09:47:51 -0000      1.105
@@ -251,10 +251,10 @@
 #else
    if (battery_config->battery_check_mode == 0)
      {
-       if (ecore_file_is_dir("/proc/acpi")) /* <= 2.6.24 */
-         battery_config->battery_check_mode = CHECK_ACPI;
-       else if (ecore_file_is_dir("/sys/class/power_supply")) /* >= 2.6.24 */
+       if (ecore_file_is_dir("/sys/class/power_supply")) /* >= 2.6.24 */
          battery_config->battery_check_mode = CHECK_SYS_ACPI;
+       else if (ecore_file_is_dir("/proc/acpi")) /* <= 2.6.24 */
+         battery_config->battery_check_mode = CHECK_ACPI;
        else if (ecore_file_exists("/proc/apm"))
          battery_config->battery_check_mode = CHECK_APM;
        else if (ecore_file_is_dir("/proc/pmu"))
@@ -418,7 +418,7 @@
             int rate = 1;
             int level = 0;
 
-            if (name && strncmp("BAT",name,3)) continue;
+            if (name && strncasecmp("BAT", name, 3)) continue;
              
             /* present */
             snprintf(buf, sizeof(buf), "/sys/class/power_supply/%s/present", 
name);



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to