aboutsummaryrefslogtreecommitdiff
path: root/src/startstop.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/startstop.c')
-rw-r--r--src/startstop.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/startstop.c b/src/startstop.c
index 2460682..78c581c 100644
--- a/src/startstop.c
+++ b/src/startstop.c
@@ -41,13 +41,12 @@ start_stop_instance(eclat_command_env_t *env, int argc, char **argv)
41 bend = buf + strlen(buf); 41 bend = buf + strlen(buf);
42 bs = sizeof(buf) - strlen(buf); 42 bs = sizeof(buf) - strlen(buf);
43 for (i = 0; i < argc; i++) { 43 for (i = 0; i < argc; i++) {
44 snprintf(bend, bs, "%lu", (unsigned long)(i + 1)); 44 snprintf(bend, bs, "%lu", (unsigned long)(i + 1));
45 eclat_request_add_param(q, buf, argv[i]); 45 eclat_request_add_param(q, buf, argv[i]);
46 } 46 }
47
48 return 0; 47 return 0;
49} 48}
50 49
51int 50int
52eclat_start_instance(eclat_command_env_t *env, int argc, char **argv) 51eclat_start_instance(eclat_command_env_t *env, int argc, char **argv)
53{ 52{
@@ -87,6 +86,19 @@ eclat_reboot_instance(eclat_command_env_t *env, int argc, char **argv)
87 "Reboot named instances", 86 "Reboot named instances",
88 argc, argv, &i); 87 argc, argv, &i);
89 88
90 debug(ECLAT_DEBCAT_MAIN, 1, ("rebooting instances")); 89 debug(ECLAT_DEBCAT_MAIN, 1, ("rebooting instances"));
91 return start_stop_instance(env, argc - i, argv + i); 90 return start_stop_instance(env, argc - i, argv + i);
92} 91}
92
93int
94eclat_terminate_instances(eclat_command_env_t *env, int argc, char **argv)
95{
96 int i;
97
98 parse_options(env->cmd,
99 "Terminate named instances",
100 argc, argv, &i);
101
102 debug(ECLAT_DEBCAT_MAIN, 1, ("terminate instances"));
103 return start_stop_instance(env, argc - i, argv + i);
104}

Return to:

Send suggestions and report system problems to the System administrator.