FreeCalypso > hg > freecalypso-sw
comparison loadtools/ltexit.c @ 392:134c047c1269
loadtools: Iota poweroff on Compal targets
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Wed, 11 Jun 2014 16:38:28 +0000 |
parents | 6f8d3771aa6c |
children |
comparison
equal
deleted
inserted
replaced
391:8bbdf5221b24 | 392:134c047c1269 |
---|---|
1 /* | 1 /* |
2 * This module implements the loadtool exit command, along with its | 2 * This module implements the loadtool exit command, along with its |
3 * options for jump-reboot or eventual Iota power-off. | 3 * options for jump-reboot and Iota power-off. |
4 */ | 4 */ |
5 | 5 |
6 #include <stdio.h> | 6 #include <stdio.h> |
7 #include <string.h> | 7 #include <string.h> |
8 #include <strings.h> | 8 #include <strings.h> |
22 #endif | 22 #endif |
23 exit(0); | 23 exit(0); |
24 } | 24 } |
25 | 25 |
26 static void | 26 static void |
27 exit_iotaoff() | |
28 { | |
29 static char *poweroff_argv[2] = {"poweroff", 0}; | |
30 | |
31 tpinterf_make_cmd(poweroff_argv); | |
32 tpinterf_send_cmd(); | |
33 exit(0); | |
34 } | |
35 | |
36 static void | |
27 exit_jump0() | 37 exit_jump0() |
28 { | 38 { |
29 static char *jump0_argv[3] = {"jump", "0", 0}; | 39 static char *jump0_argv[3] = {"jump", "0", 0}; |
30 | 40 |
31 tpinterf_make_cmd(jump0_argv); | 41 tpinterf_make_cmd(jump0_argv); |
39 char *kw; | 49 char *kw; |
40 void (*func)(); | 50 void (*func)(); |
41 } exit_modes[] = { | 51 } exit_modes[] = { |
42 {"bare", exit_bare}, | 52 {"bare", exit_bare}, |
43 {"gta02-cutpwr", exit_gta02_cutpwr}, | 53 {"gta02-cutpwr", exit_gta02_cutpwr}, |
54 {"iota-off", exit_iotaoff}, | |
44 {"jump0", exit_jump0}, | 55 {"jump0", exit_jump0}, |
45 {0, 0} | 56 {0, 0} |
46 }; | 57 }; |
47 | 58 |
48 cmd_exit(argc, argv) | 59 cmd_exit(argc, argv) |