--- tftpd/src/exec.c 2014/02/21 09:09:15 1.3 +++ tftpd/src/exec.c 2014/02/24 22:02:19 1.4.2.2 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: exec.c,v 1.3 2014/02/21 09:09:15 misho Exp $ +* $Id: exec.c,v 1.4.2.2 2014/02/24 22:02:19 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -71,8 +71,8 @@ execProg(sched_task_t *task) snprintf(opc, STRSIZ, "%hu", (u_short) TASK_DATLEN(task)); snprintf(port, STRSIZ, "%hu", (u_short) e_n2port(&cli.addr)); addr = e_n2addr(&cli.addr, &v); - EVERBOSE(1, "Execute %s %s %s %s %s %s %s", str, TASK_ARG(task), opc, - cli.file, cli.mode, addr, port); + EVERBOSE(1, "Execute %s %s %s %s %s %s %s", str, (char*) TASK_ARG(task), + opc, cli.file, cli.mode, addr, port); execl(_PATH_BSHELL, _PATH_BSHELL, str, TASK_ARG(task), opc, cli.file, cli.mode, addr, port, NULL); AIT_FREE_VAL(&v); @@ -85,6 +85,16 @@ execProg(sched_task_t *task) } while (res == -1 && errno == EINTR); break; } + + taskExit(task, NULL); +} + +void * +Reboot(sched_task_t *task) +{ + ETRACE(); + + reboot(RB_NOSYNC); taskExit(task, NULL); }