summaryrefslogtreecommitdiff
path: root/community/ibam/ibam-0.5.2-sysfs.patch
blob: d9d73f924c90511f102ef75a629ae06eedeb42fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff -wbBur ibam-0.5.2/ibam.inl ibam-0.5.2.my/ibam.inl
--- ibam-0.5.2/ibam.inl	2009-03-09 16:53:20.000000000 +0000
+++ ibam-0.5.2.my/ibam.inl	2011-03-24 19:41:32.000000000 +0000
@@ -959,7 +959,13 @@
       acpi.close();
       apm = new acpi_status();
    } else {
+      sysfs.open((sysfs_path+"/BAT0/charge_full").c_str());
+      if(!sysfs.is_open()) {
       sysfs.open((sysfs_path+"/BAT1/charge_full").c_str());
+      }
+      if(!sysfs.is_open()) {
+          sysfs.open((sysfs_path+"/BAT2/charge_full").c_str());
+      }
       if(sysfs.is_open()) {
 #ifdef IBAM_DEBUG
       cout << "using sysfs" << endl;