aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/config.c1
-rw-r--r--src/dscrinsts.c2
-rw-r--r--src/eclat.c28
-rw-r--r--src/eclat.h2
-rw-r--r--src/startinst.c6
-rw-r--r--src/util.c6
6 files changed, 9 insertions, 36 deletions
diff --git a/src/config.c b/src/config.c
index e781f34..0712110 100644
--- a/src/config.c
+++ b/src/config.c
@@ -119,6 +119,7 @@ cb_format(enum grecs_callback_command cmd,
set_command_format(value->v.arg.v[0]->v.string,
value->v.arg.v[1]->v.string,
&value->v.arg.v[1]->locus);
+ return 0;
}
static int
diff --git a/src/dscrinsts.c b/src/dscrinsts.c
index 865c2ce..81720aa 100644
--- a/src/dscrinsts.c
+++ b/src/dscrinsts.c
@@ -141,8 +141,6 @@ eclat_describe_instances(CURL *curl, int argc, char **argv)
{
int i;
struct ec2_query *q;
- CURLcode res;
- char *url;
parse_options(argc, argv, &i);
argv += i;
diff --git a/src/eclat.c b/src/eclat.c
index 7dd32e4..181391e 100644
--- a/src/eclat.c
+++ b/src/eclat.c
@@ -108,7 +108,7 @@ eclat_trace_fun(CURL *handle, curl_infotype type,
char *data, size_t size,
void *userp)
{
- struct data *config = (struct data *)userp;
+/* struct data *config = (struct data *)userp;*/
const char *text;
switch (type) {
@@ -142,25 +142,6 @@ eclat_trace_fun(CURL *handle, curl_infotype type,
}
static void
-dump_text(FILE *stream, int line, int column, const char *text, size_t len)
-{
- fprintf(stream, "%02d:%02d: ", line, column);
- while (len--) {
- char c = *text++;
- if (c == '\r')
- continue;
- fputc(c, stream);
- ++column;
- if (c == '\n') {
- ++line;
- column = 0;
- fprintf(stream, "%02d:%02d: ", line, column);
- }
- }
- fputc('\n', stream);
-}
-
-static void
dumpxml(void *ptr, size_t realsize)
{
static int open_failed = 0;
@@ -251,13 +232,6 @@ struct command cmdtab[] = {
};
size_t cmdcnt = sizeof(cmdtab) / sizeof(cmdtab[0]);
-static int
-cmdcmp(const void *a, const void *b)
-{
- struct command const *cmda = a, *cmdb = b;
- return strcmp(cmda->ident, cmdb->ident);
-}
-
void
listcmd()
{
diff --git a/src/eclat.h b/src/eclat.h
index 96068d9..bf98828 100644
--- a/src/eclat.h
+++ b/src/eclat.h
@@ -78,6 +78,8 @@ int eclat_describe_security_groups(CURL *curl, int argc, char **argv);
char *region_to_endpoint(const char *region);
void define_format(const char *name, const char *format, grecs_locus_t *locus);
+void set_command_format(const char *name, const char *format,
+ grecs_locus_t *locus);
struct ec2_query *describe_query_create(CURL *curl, const char *verb,
int argc, char **argv,
diff --git a/src/startinst.c b/src/startinst.c
index 3c34526..f1ace61 100644
--- a/src/startinst.c
+++ b/src/startinst.c
@@ -81,7 +81,7 @@ eclat_start_instance(CURL *curl, int argc, char **argv)
argc, argv, &i);
debug(ECLAT_DEBCAT_MAIN, 1, ("starting instances"));
- start_stop_instance(curl, "StartInstances", argc - i, argv + i);
+ return start_stop_instance(curl, "StartInstances", argc - i, argv + i);
}
int
@@ -94,7 +94,7 @@ eclat_stop_instance(CURL *curl, int argc, char **argv)
argc, argv, &i);
debug(ECLAT_DEBCAT_MAIN, 1, ("stopping instances"));
- start_stop_instance(curl, "StopInstances", argc - i, argv + i);
+ return start_stop_instance(curl, "StopInstances", argc - i, argv + i);
}
int
@@ -107,5 +107,5 @@ eclat_reboot_instance(CURL *curl, int argc, char **argv)
argc, argv, &i);
debug(ECLAT_DEBCAT_MAIN, 1, ("rebooting instances"));
- start_stop_instance(curl, "RebootInstances", argc - i, argv + i);
+ return start_stop_instance(curl, "RebootInstances", argc - i, argv + i);
}
diff --git a/src/util.c b/src/util.c
index f61432d..b4af99f 100644
--- a/src/util.c
+++ b/src/util.c
@@ -26,7 +26,7 @@ translate_ids(int argc, char **argv, const char *mapname)
{
int i;
struct eclat_map *map;
- char *val, *p;
+ char *val;
if (!translate_option)
return;
@@ -68,7 +68,7 @@ translate_resource_ids(int argc, char **argv)
int i, j, rc, ecnt;
size_t len;
struct eclat_map *map;
- char *val, *p, *mapname;
+ char *val, *p;
struct wordsplit ws;
int wsflags = WRDSF_DEFFLAGS|WRDSF_DELIM;
@@ -144,10 +144,8 @@ describe_query_create(CURL *curl, const char *verb, int argc, char **argv,
{
int i, j, k;
struct ec2_query *q;
- char *url;
char *bufptr = NULL;
size_t bufsize = 0;
- size_t bs;
struct wordsplit ws;
int wsflags;
int upn = 0;

Return to:

Send suggestions and report system problems to the System administrator.