3 # Patch managed by http://www.holgerschurig.de/patcher.html
6 --- apmd-3.2.2.orig/apmd.c~workaround.patch
7 +++ apmd-3.2.2.orig/apmd.c
9 static int quiet_bios_batlow; /* = 0 */
10 static int verbosity = DEFAULT_VERBOSITY;
11 static int warn_level = 10;
12 +static int sleep_now = 0; /* ntp */
14 static uid_t apmd_uid = 0;
15 static int apmd_fd = -1;
21 +static void sig_usr1(int sig)
26 int main(int argc, char **argv)
30 openlog("apmd", (verbosity>=LOG_DEBUG)?LOG_PERROR:0 | LOG_PID | LOG_CONS, LOG_DAEMON);
32 /* Set up signal handler */
33 + if (signal(SIGUSR1, SIG_IGN) != SIG_IGN)
34 + signal(SIGUSR1, sig_usr1); /* ntp */
35 if (signal(SIGINT, SIG_IGN) != SIG_IGN)
36 signal(SIGINT, sig_handler);
37 if (signal(SIGQUIT, SIG_IGN) != SIG_IGN)
38 @@ -1230,9 +1239,16 @@
42 - int num_events = apm_get_events(apmd_fd, check_interval, events, MAX_EVENTS);
49 + handle_event(APM_USER_SUSPEND, &apminfo);
52 + num_events = apm_get_events(apmd_fd, check_interval, events, MAX_EVENTS);
55 if (num_events == 0) {