updated on Sun Jan 15 08:01:04 UTC 2012
[aur-mirror.git] / wmbattery / disable-apm.patch
blob399a58eccc27b82c6f56cbf9625c9aaad682c045
1 --- apm.h.orig 2009-07-01 02:42:09.000000000 +0200
2 +++ apm.h 2009-07-01 02:42:36.000000000 +0200
3 @@ -1,4 +1,17 @@
4 -#include <apm.h>
5 +typedef struct apm_info
6 +{
7 + const char driver_version[10];
8 + int apm_version_major;
9 + int apm_version_minor;
10 + int apm_flags;
11 + int ac_line_status;
12 + int battery_status;
13 + int battery_flags;
14 + int battery_percentage;
15 + int battery_time;
16 + int using_minutes;
18 +apm_info;
20 /* Symbolic constants for apm may be in system apm.h, or may not. */
21 #ifndef AC_LINE_STATUS_ON
22 --- wmbattery.c.orig 2009-07-01 02:45:22.000000000 +0200
23 +++ wmbattery.c 2009-07-01 02:49:29.000000000 +0200
24 @@ -528,10 +528,6 @@
25 error("Cannot read HAL information.");
27 #endif
28 - else if (! use_sonypi) {
29 - if (apm_read(&cur_info) != 0)
30 - error("Cannot read APM information.");
31 - }
32 else {
33 if (sonypi_read(&cur_info) != 0)
34 error("Cannot read sonypi information.");
35 @@ -583,10 +579,7 @@
36 int main(int argc, char *argv[]) {
37 make_window(parse_commandline(argc, argv), argc ,argv);
39 - /* Check for APM support (returns 0 on success). */
40 - if (apm_exists() == 0) {
41 - if (! delay)
42 - delay = 1;
43 + if (0) {
45 #ifdef HAL
46 /* Check for hal support. */