FreeCalypso > hg > freecalypso-tools
diff libpwon/forkoff.c @ 736:7d1df6d831e4
libpwon: added -Pdtr and -Prts support for DUART28C
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 16 Sep 2020 03:40:51 +0000 |
parents | cef70d53fc5e |
children | ab54957dbe35 |
line wrap: on
line diff
--- a/libpwon/forkoff.c Tue Sep 15 04:29:43 2020 +0000 +++ b/libpwon/forkoff.c Wed Sep 16 03:40:51 2020 +0000 @@ -5,6 +5,7 @@ #include <unistd.h> extern char bootctrl_pwon_cmd[]; +extern int bootctrl_duart28c_mode; static char shell_pathname[] = "/bin/sh"; @@ -27,9 +28,15 @@ pwon_if_needed() { - if (!bootctrl_pwon_cmd[0]) - return(0); - signal(SIGCHLD, SIG_IGN); - fork_exec_pwon_cmd(); - return(1); + if (bootctrl_duart28c_mode) { + signal(SIGCHLD, SIG_IGN); + fork_duart28c_pulse(); + return(1); + } + if (bootctrl_pwon_cmd[0]) { + signal(SIGCHLD, SIG_IGN); + fork_exec_pwon_cmd(); + return(1); + } + return(0); }