diff options
author | Paul Sokolovsky <pmiscml@gmail.com> | 2007-01-03 23:22:42 +0000 |
---|---|---|
committer | Paul Sokolovsky <pmiscml@gmail.com> | 2007-01-03 23:22:42 +0000 |
commit | 91818574fb20e98aed69f4f4586e3f971e17f013 (patch) | |
tree | e025ebd5590ec3ca7edf69a871753f85e10598f5 /packages/busybox/slingbox-1.3.1/halt.patch | |
parent | c73693c12be6d852f243ed5bb5b8d585943e8003 (diff) | |
parent | 84a4706fc5292c926fb1126857cd350b62ddd0b4 (diff) |
merge of '4b865f129d7c784106bb82861c16cc6330c629a9'
and '7e82eca3f8662bfb12dc49e93daed21b2aa8feeb'
Diffstat (limited to 'packages/busybox/slingbox-1.3.1/halt.patch')
-rw-r--r-- | packages/busybox/slingbox-1.3.1/halt.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/packages/busybox/slingbox-1.3.1/halt.patch b/packages/busybox/slingbox-1.3.1/halt.patch new file mode 100644 index 0000000000..729c3b7ecd --- /dev/null +++ b/packages/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 */ + } |