summaryrefslogtreecommitdiff
path: root/recipes/apmd/apmd-3.2.2/zaurus24.patch
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/apmd/apmd-3.2.2/zaurus24.patch
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/apmd/apmd-3.2.2/zaurus24.patch')
-rw-r--r--recipes/apmd/apmd-3.2.2/zaurus24.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/recipes/apmd/apmd-3.2.2/zaurus24.patch b/recipes/apmd/apmd-3.2.2/zaurus24.patch
new file mode 100644
index 0000000000..5df016ab77
--- /dev/null
+++ b/recipes/apmd/apmd-3.2.2/zaurus24.patch
@@ -0,0 +1,50 @@
+Index: apmd-3.2.2.orig/apm.c
+===================================================================
+--- apmd-3.2.2.orig.orig/apm.c 2006-01-26 15:15:27.000000000 +0100
++++ apmd-3.2.2.orig/apm.c 2006-01-26 17:50:14.000000000 +0100
+@@ -24,10 +24,12 @@
+ #include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <sys/utsname.h>
+ #include <fcntl.h>
+ #include <errno.h>
+ #include <time.h>
+ #include <getopt.h>
++#include <signal.h>
+ #include "apm.h"
+
+ static int verbose = 0;
+@@ -43,6 +45,9 @@
+ int fd;
+ time_t then, now;
+ int error;
++ FILE* pid_file;
++ int apmd_pid;
++ struct utsname uname_ver;
+
+ fd = open(APM_DEVICE, O_WRONLY);
+ if (fd < 0)
+@@ -54,6 +59,22 @@
+ switch (mode)
+ {
+ case SUSPEND:
++ if(0 == system("grep -i hardware /proc/cpuinfo|grep -i SHARP"))
++ {
++ uname(&uname_ver);
++
++ if(0 == strncmp("2.4", uname_ver.release, 3))
++ {
++ pid_file = fopen("/var/run/apmd.pid", "r");
++ if(pid_file)
++ {
++ fscanf(pid_file, "%d", &apmd_pid);
++ fclose(pid_file);
++ }
++
++ kill(apmd_pid, SIGKILL);
++ }
++ }
+ error = apm_suspend(fd);
+ break;
+ case STANDBY: