updated on Sun Jan 15 04:04:02 UTC 2012
[aur-mirror.git] / acpitool / sysfs-battery.patch
blob4f6898a78b8353203268627cc6d251d0ae69bf8c
1 diff -wbBur acpitool-0.5.1/src/acpitool.h acpitool-0.5.1.my/src/acpitool.h
2 --- acpitool-0.5.1/src/acpitool.h 2008-10-16 19:38:12.000000000 +0400
3 +++ acpitool-0.5.1.my/src/acpitool.h 2011-11-10 21:55:23.000000000 +0400
4 @@ -29,11 +29,11 @@
6 struct Battery_Info {
7 int Battery_Present;
8 - char Charging_State[12];
9 - char Remaining_Cap[10];
10 - char Design_Cap[10];
11 - char LastFull_Cap[10];
12 - char Present_Rate[10];
13 + char Charging_State[13];
14 + char Remaining_Cap[13];
15 + char Design_Cap[13];
16 + char LastFull_Cap[13];
17 + char Present_Rate[13];
18 char Technology[13];
19 char Model[13];
20 char Serial[13];
21 diff -wbBur acpitool-0.5.1/src/battery.cpp acpitool-0.5.1.my/src/battery.cpp
22 --- acpitool-0.5.1/src/battery.cpp 2009-08-13 23:42:43.000000000 +0400
23 +++ acpitool-0.5.1.my/src/battery.cpp 2011-11-10 21:48:22.000000000 +0400
24 @@ -614,7 +614,7 @@
27 memset(str, '\0', 100);
28 - for(int t=0; t<5; t++)
29 + for(int t=0; t<1; t++)
30 fgets(str, 100, power_fp); /* skip first 5 lines */
32 /* get battery status (full, charging, ...) */
33 @@ -664,8 +664,8 @@
37 - fgets(str, 100, power_fp); /* skip 1 line */
39 + fgets(str, 100, power_fp); /* cycle count - skip 1 line */
40 + fgets(str, 100, power_fp); /* voltage_min - skip 1 line */
42 /* get voltage_now */
43 memset(str, '\0', 100);
44 @@ -756,7 +756,7 @@
45 else
46 strncpy(batt_info->Model, "unknown", 7);
48 - fgets(str, 100, power_fp);
49 + fgets(str, 100, power_fp); /* manufacturer - skip 1 line */
51 /* get serial */
52 memset(str, '\0', 100);