aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/busybox/slingbox-1.3.1/halt.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/busybox/slingbox-1.3.1/halt.patch
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
downloadopenembedded-709c4d66e0b107ca606941b988bad717c0b45d9b.tar.gz
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/busybox/slingbox-1.3.1/halt.patch')
-rw-r--r--recipes/busybox/slingbox-1.3.1/halt.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/recipes/busybox/slingbox-1.3.1/halt.patch b/recipes/busybox/slingbox-1.3.1/halt.patch
new file mode 100644
index 0000000000..729c3b7ecd
--- /dev/null
+++ b/recipes/busybox/slingbox-1.3.1/halt.patch
@@ -0,0 +1,40 @@
+diff -Naur busybox-1.3.1.orig/init/halt.c busybox-1.3.1/init/halt.c
+--- busybox-1.3.1.orig/init/halt.c 2006-12-26 22:56:38.000000000 -0600
++++ busybox-1.3.1/init/halt.c 2006-12-29 22:48:18.000000000 -0600
+@@ -10,6 +10,8 @@
+ #include "busybox.h"
+ #include <sys/reboot.h>
+
++#include "init_shared.h" /* Linksys mods */
++
+ int halt_main(int argc, char *argv[])
+ {
+ static const int magic[] = {
+@@ -38,6 +40,12 @@
+ if (flags & 1) sleep(xatou(delay));
+ if (!(flags & 2)) sync();
+
++/* Linksys Halt code - adapted from the Linksys source for Busybox. */
++ rc = bb_shutdown_system(magic[which]);
++ if (rc) bb_error_msg("No.");
++ return rc; /* Shrug */
++/* End of Linksys code */
++
+ /* Perform action. */
+ if (ENABLE_INIT && !(flags & 4)) {
+ if (ENABLE_FEATURE_INITRD) {
+diff -Naur busybox-1.3.1.orig/init/init_shared.c busybox-1.3.1/init/init_shared.c
+--- busybox-1.3.1.orig/init/init_shared.c 2006-12-26 22:56:38.000000000 -0600
++++ busybox-1.3.1/init/init_shared.c 2006-12-29 22:48:18.000000000 -0600
+@@ -57,6 +57,11 @@
+
+ sync();
+
++/* Linksys Halt code - if poweroff or halt, invoke an external program
++ to do actually turn off the power. */
++ if (magic != 0x01234567) system("/usr/bin/Set_Led power_off");
++/* End of Linksys Halt code */
++
+ reboot(magic);
+ return 0; /* Shrug */
+ }