updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / sleepd-git / no-apmd.patch
blobc084103386958a2db65c070d12ebb026d3411964
1 diff -Naurp sleepd/Makefile sleepd-new/Makefile
2 --- sleepd/Makefile 2009-07-08 16:30:20.000000000 -0400
3 +++ sleepd-new/Makefile 2009-07-08 16:32:19.000000000 -0400
4 @@ -15,7 +15,7 @@ CFLAGS += -g
5 endif
7 OBJS=sleepd.o acpi.o eventmonitor.o
8 -LIBS=-lapm
9 +LIBS=
11 all: $(BINS)
13 diff -Naurp sleepd/apm.h sleepd-new/apm.h
14 --- sleepd/apm.h 2009-01-04 08:40:05.000000000 -0500
15 +++ sleepd-new/apm.h 2009-01-04 08:41:33.000000000 -0500
16 @@ -1,4 +1,4 @@
17 -#include <apm.h>
18 +#include "from_apmd.h"
20 /* Symbolic constants for apm may be in system apm.h, or may not. */
21 #ifndef AC_LINE_STATUS_ON
22 diff -Naurp sleepd/sleepd.c sleepd-new/sleepd.c
23 --- sleepd/sleepd.c 2009-07-08 16:30:20.000000000 -0400
24 +++ sleepd-new/sleepd.c 2009-07-08 16:33:22.000000000 -0400
25 @@ -17,7 +17,7 @@
26 #include <sys/file.h>
27 #include <sys/stat.h>
28 #include <fcntl.h>
29 -#include <apm.h>
30 +#include "apm.h"
31 #include <utmp.h>
32 #include "acpi.h"
33 #ifdef HAL
34 @@ -436,7 +436,7 @@ void main_loop (void) {
36 #endif
37 else {
38 - apm_read(&ai);
39 + exit(1);
42 if (min_batt != -1 && ai.ac_line_status != 1 &&
43 @@ -600,7 +600,12 @@ int main (int argc, char **argv) {
47 - if (apm_exists() != 0) {
48 + //if (apm_exists() != 0) {
49 +/* If APM support of the right version exists in kernel, return zero.
50 + * Otherwise, return 1 if no support exists, or 2 if it is the wrong
51 + * version. *NOTE* The sense of the return value is not intuitive.
52 + */
53 + if (1) {
54 if (! sleep_command)
55 sleep_command=acpi_sleep_command;