diff options
author | Richard Purdie <richard@openedhand.com> | 2006-02-10 12:06:32 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2006-02-10 12:06:32 +0000 |
commit | 42dfbb2a0223ba5d091f053ad5401ecce6446e41 (patch) | |
tree | 2636ad1c536f88f79517299d441be6584a58d892 /openembedded/packages/apmd | |
parent | dd1b4430b5d74ee7f3827ed6eed56a2bd5f99d42 (diff) | |
download | openembedded-core-42dfbb2a0223ba5d091f053ad5401ecce6446e41.tar.gz openembedded-core-42dfbb2a0223ba5d091f053ad5401ecce6446e41.tar.bz2 openembedded-core-42dfbb2a0223ba5d091f053ad5401ecce6446e41.tar.xz openembedded-core-42dfbb2a0223ba5d091f053ad5401ecce6446e41.zip |
Sync more files with OE
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@271 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'openembedded/packages/apmd')
-rw-r--r-- | openembedded/packages/apmd/apmd-3.2.2/zaurus24.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/openembedded/packages/apmd/apmd-3.2.2/zaurus24.patch b/openembedded/packages/apmd/apmd-3.2.2/zaurus24.patch new file mode 100644 index 000000000..5df016ab7 --- /dev/null +++ b/openembedded/packages/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: |