FreeCalypso > hg > freecalypso-tools
comparison libpwon/forkoff.c @ 953:ab54957dbe35
libpwon: implement -Petmoff mode
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 07 Jun 2023 20:06:12 +0000 |
parents | 7d1df6d831e4 |
children |
comparison
equal
deleted
inserted
replaced
952:68d4474c1a36 | 953:ab54957dbe35 |
---|---|
3 #include <stdio.h> | 3 #include <stdio.h> |
4 #include <stdlib.h> | 4 #include <stdlib.h> |
5 #include <unistd.h> | 5 #include <unistd.h> |
6 | 6 |
7 extern char bootctrl_pwon_cmd[]; | 7 extern char bootctrl_pwon_cmd[]; |
8 extern int bootctrl_duart28c_mode; | 8 extern int bootctrl_duart28c_mode, bootctrl_etmoff_mode; |
9 | 9 |
10 static char shell_pathname[] = "/bin/sh"; | 10 static char shell_pathname[] = "/bin/sh"; |
11 | 11 |
12 void | 12 void |
13 fork_exec_pwon_cmd() | 13 fork_exec_pwon_cmd() |
36 if (bootctrl_pwon_cmd[0]) { | 36 if (bootctrl_pwon_cmd[0]) { |
37 signal(SIGCHLD, SIG_IGN); | 37 signal(SIGCHLD, SIG_IGN); |
38 fork_exec_pwon_cmd(); | 38 fork_exec_pwon_cmd(); |
39 return(1); | 39 return(1); |
40 } | 40 } |
41 if (bootctrl_etmoff_mode) { | |
42 bootctrl_do_etmoff(); | |
43 return(2); | |
44 } | |
41 return(0); | 45 return(0); |
42 } | 46 } |