aboutsummaryrefslogtreecommitdiff
path: root/src/devol.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2013-04-26 17:18:53 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2013-04-26 17:48:21 +0300
commit699ba6cd496d8401959a0581a1d49c448d3f3c7c (patch)
treee576553ef6531cdf7b1f9b375036f9dd28f2332d /src/devol.c
parentaf02bbe4ab84ddd6a5ec8da3bab0fa360e8bded2 (diff)
downloadeclat-699ba6cd496d8401959a0581a1d49c448d3f3c7c.tar.gz
eclat-699ba6cd496d8401959a0581a1d49c448d3f3c7c.tar.bz2
Improve ID mapping.
* doc/eclat.conf.5: Update. * src/cmdline.opt: New option --no-translate (-X) * src/config.c (eclat_kw): New statement: translate. * src/eclat.c (main): override the value of translation_enabled from the command line. * src/eclat.h (translate_option): Rename to translation_enabled. All uses changed. (MAP_IMAGE,MAP_INSTANCE) (MAP_GROUPID,MAP_GROUPNAME) (MAP_SNAPSHOT,MAP_VOLUME) (MAP_AZ,MAP_REG): New defines, to use instead of literal map names. All sources updated accordingly. * src/util.c (translate_option): Rename to translation_enabled. (translate_ids): It is not an error if the name is not found in the map. Use it as the resource ID in that case.
Diffstat (limited to 'src/devol.c')
-rw-r--r--src/devol.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/devol.c b/src/devol.c
index b575352..dfc7f31 100644
--- a/src/devol.c
+++ b/src/devol.c
@@ -31,11 +31,11 @@ eclat_detach_volume(eclat_command_env_t *env, int argc, char **argv)
if (argc < 1 || argc > 3)
die(EX_USAGE, "bad number of arguments");
- translate_ids(1, argv, "VolumeId");
+ translate_ids(1, argv, MAP_VOLUME);
eclat_query_add_param(q, "VolumeId", argv[0]);
if (argc > 1) {
- translate_ids(1, argv + 1, "InstanceId");
+ translate_ids(1, argv + 1, MAP_INSTANCE);
eclat_query_add_param(q, "InstanceId", argv[1]);
if (argc > 2)
eclat_query_add_param(q, "Device", argv[2]);

Return to:

Send suggestions and report system problems to the System administrator.