aboutsummaryrefslogtreecommitdiff
path: root/src/eclat.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2013-11-28 16:06:56 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2013-11-28 16:33:57 +0200
commit155a76453f41b7ad80af4f8b4bf0539f2df32498 (patch)
treeb5322a09cf94efda672f7b195d6e8e5ff41d35aa /src/eclat.c
parentd9fbe79146e386cc29a6000cb55d6fb5337e5214 (diff)
downloadeclat-155a76453f41b7ad80af4f8b4bf0539f2df32498.tar.gz
eclat-155a76453f41b7ad80af4f8b4bf0539f2df32498.tar.bz2
Implement sg command
* etc/sg.fln: New file. * etc/Makefile.am (FLNFILES): Add sg.fln * src/sg.c: New file. * src/sg-cl.opt: New file. * src/Makefile.am (eclat_SOURCES): Add sg.c (OPTFILES): Add sg-cl.opt * src/eclat.c (cmdtab): Add entry for "sg". (eclat_do_command): Ignore tag if it is NULL. * src/eclat.h (eclat_sg): New proto.
Diffstat (limited to 'src/eclat.c')
-rw-r--r--src/eclat.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/eclat.c b/src/eclat.c
index 063accb..0558fcd 100644
--- a/src/eclat.c
+++ b/src/eclat.c
@@ -149,6 +149,7 @@ struct eclat_command cmdtab[] = {
eclat_copy_snapshot },
{ "lsattr", NULL, NULL,
eclat_lsattr, CMD_NOQRY },
+ { "sg", NULL, NULL, eclat_sg },
};
size_t cmdcnt = sizeof(cmdtab) / sizeof(cmdtab[0]);
@@ -636,9 +637,11 @@ eclat_do_command(eclat_command_env_t *env, struct eclat_command *command,
if (!(command->flags & CMD_NOQRY)) {
env->query = eclat_query_create(use_ssl ? EC2_QF_HTTPS : 0,
endpoint, "/");
- eclat_query_add_param(env->query, "Action", command->tag);
}
-
+
+ if (command->tag)
+ eclat_query_add_param(env->query, "Action", command->tag);
+
rc = command->handler(env, argc, argv);
if (rc == 0 && !(command->flags & CMD_NOQRY)) {

Return to:

Send suggestions and report system problems to the System administrator.