summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--doc/eclat.conf.551
-rw-r--r--src/asscaddr.c2
-rw-r--r--src/atvol.c4
-rw-r--r--src/cmdline.opt6
-rw-r--r--src/config.c3
-rw-r--r--src/deimg.c2
-rw-r--r--src/devol.c4
-rw-r--r--src/eclat.c4
-rw-r--r--src/eclat.h14
-rw-r--r--src/getconout.c2
-rw-r--r--src/lsattr.c2
-rw-r--r--src/lsiattr.c2
-rw-r--r--src/lsimg.c2
-rw-r--r--src/lsinst.c2
-rw-r--r--src/lsistat.c2
-rw-r--r--src/lsreg.c2
-rw-r--r--src/lssattr.c6
-rw-r--r--src/lssg.c13
-rw-r--r--src/lssnap.c2
-rw-r--r--src/lstag-cl.opt8
-rw-r--r--src/lsvol.c2
-rw-r--r--src/lszon.c2
-rw-r--r--src/mkimg.c2
-rw-r--r--src/mksnap.c2
-rw-r--r--src/mktags-cl.opt8
-rw-r--r--src/rmsnap.c2
-rw-r--r--src/rmvol.c2
-rw-r--r--src/setiattr.c2
-rw-r--r--src/startstop.c2
-rw-r--r--src/util.c22
30 files changed, 120 insertions, 59 deletions
diff --git a/doc/eclat.conf.5 b/doc/eclat.conf.5
index 9b43dbe..30b5b81 100644
--- a/doc/eclat.conf.5
+++ b/doc/eclat.conf.5
@@ -13,7 +13,7 @@
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat. If not, see <http://www.gnu.org/licenses/>.
-.TH ECLAT.CONF 5 "January 19, 2013" "ECLAT" "Eclat User Reference"
+.TH ECLAT.CONF 5 "April 26, 2013" "ECLAT" "Eclat User Reference"
.SH NAME
eclat.conf \- configuration file for
.BR eclat (1).
@@ -596,13 +596,13 @@ to ask for confirmation if one of the destructive commands is
requested, or if the command is start-instance or stop-instance.
.PP
Here is an example of how this modifies the behavior of
-.B freeaddr
+.B rmaddr
command:
.PP
.nf
.if +2
-$ \fBeclat freeaddr 192.168.0.1\fR
-Proceed with freeaddr [Y/n] _
+$ \fBeclat rmaddr 192.168.0.1\fR
+Proceed with release-address [Y/n] _
.fi
.PP
If the response begins with \fBY\fR (case-insensitive), it is taken
@@ -625,30 +625,51 @@ resource identifiers. See the section
.B MAPS
in
.BR eclat (1),
-for the discussion of the subject.
+for the discussion of the subject. The translation is disabled by
+default. This can be changed using the following statement:
+.TP
+\fBtranslate\fR \fIBOOL\fR
+Depending on its argument, enables or disables ID translation by
+default.
.PP
A map is declared using the following statement:
.sp
.nf
- map \fIname\fR {
- type \fIbackend\-type\fR;
- key \fItrans\fR;
- /* \fIType-specific statements.\fR */
- }
+.in +4
+\fBmap\fR \fIname\fR {
+ \fBtype\fR \fIbackend\-type\fR;
+ \fBkey\fR \fItrans\fR;
+ /* \fIType-specific statements.\fR */
+}
.fi
-.sp
+.PP
The \fIname\fR argument is used to identify the map. A map can be
used from the command line using the \fB\--map=\fIname\fR option. The
following names are special:
.TP
+.B ImageId
+Translates AMI names to IDs.
+.TP
.B InstanceId
-This map translates instance names to instance IDs.
+Translates instance names to IDs.
+.TP
+.B GroupId
+Translates security group names to Amazon group IDs.
.TP
.B GroupName
-Translates the security group name to its Amazon name.
+Translates security group names to Amazon names.
.TP
-.B GroupId
-Translates the security group name to its Amazon group ID.
+.B SnapshotId
+Translates snapshot names to IDs.
+.TP
+.B VolumeId
+Translates volume names to IDs.
+.TP
+.B AZ
+Translates availability region names to Amazon names.
+.TP
+.B reg
+Translates region names to Amazon region names.
.PP
The \fIbackend\-type\fR declares the type of this map. Depending on
this type, several sets of type-specific statements can be present.
diff --git a/src/asscaddr.c b/src/asscaddr.c
index 8ec3998..cbe5a2d 100644
--- a/src/asscaddr.c
+++ b/src/asscaddr.c
@@ -33,7 +33,7 @@ eclat_associate_address(eclat_command_env_t *env, int argc, char **argv)
if (argc != 2)
die(EX_USAGE, "wrong number of arguments to associate-address");
- translate_ids(1, argv, "InstanceId");
+ translate_ids(1, argv, MAP_INSTANCE);
eclat_query_add_param(env->query, "InstanceId", argv[0]);
if (vpc) {
eclat_query_add_param(env->query, "AllocationId", argv[1]);
diff --git a/src/atvol.c b/src/atvol.c
index 2ee452b..6ad4f5d 100644
--- a/src/atvol.c
+++ b/src/atvol.c
@@ -32,8 +32,8 @@ eclat_attach_volume(eclat_command_env_t *env, int argc, char **argv)
if (argc != 3)
die(EX_USAGE, "bad number of arguments");
- translate_ids(1, argv, "VolumeId");
- translate_ids(1, argv + 1, "InstanceId");
+ translate_ids(1, argv, MAP_VOLUME);
+ translate_ids(1, argv + 1, MAP_INSTANCE);
eclat_query_add_param(env->query, "VolumeId", argv[0]);
eclat_query_add_param(env->query, "InstanceId", argv[1]);
diff --git a/src/cmdline.opt b/src/cmdline.opt
index 561d7e2..b1faf5e 100644
--- a/src/cmdline.opt
+++ b/src/cmdline.opt
@@ -180,6 +180,12 @@ BEGIN
translate_option = 1;
END
+OPTION(no-translate,X,,
+ [<disable resource ID translation>])
+BEGIN
+ translate_option = 0;
+END
+
OPTION(map,M,[<MAPNAME>],
[<use this map instead of the default one (implies --translate)>])
BEGIN
diff --git a/src/config.c b/src/config.c
index c237e52..5495d41 100644
--- a/src/config.c
+++ b/src/config.c
@@ -292,6 +292,9 @@ static struct grecs_keyword eclat_kw[] = {
"<mode: { positive | negative | tty | always }> <commands: list>",
"Set confirmation mode",
grecs_type_string, GRECS_LIST, NULL, 0, cb_confirm },
+ { "translate", NULL,
+ "Use ID translation by default",
+ grecs_type_bool, GRECS_DFLT, &translation_enabled },
{ NULL }
};
diff --git a/src/deimg.c b/src/deimg.c
index 4a76d39..345c586 100644
--- a/src/deimg.c
+++ b/src/deimg.c
@@ -29,7 +29,7 @@ eclat_deregister_image(eclat_command_env_t *env, int argc, char **argv)
if (argc != 1)
die(EX_USAGE, "bad number of arguments");
- translate_ids(argc, argv, "ImageId");
+ translate_ids(argc, argv, MAP_IMAGE);
eclat_query_add_param(env->query, "ImageId", argv[0]);
return 0;
}
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]);
diff --git a/src/eclat.c b/src/eclat.c
index b78e079..c00c795 100644
--- a/src/eclat.c
+++ b/src/eclat.c
@@ -37,6 +37,7 @@ int sort_option;
char *format_file;
char *test_map_name;
enum eclat_confirm_mode confirm_mode;
+int translate_option = -1;
FILE *xml_dump_file;
@@ -850,6 +851,9 @@ main(int argc, char **argv)
"cannot access \"%s\": %s",
conffile, strerror(errno));
+ if (translate_option != -1)
+ translation_enabled = translate_option;
+
if (test_map_name) {
int i;
diff --git a/src/eclat.h b/src/eclat.h
index e328b15..72691ca 100644
--- a/src/eclat.h
+++ b/src/eclat.h
@@ -50,7 +50,7 @@ extern char *access_file_name;
extern char *access_key;
extern char *secret_key;
extern char *format_file;
-extern int translate_option;
+extern int translation_enabled;
extern char *custom_map;
extern enum eclat_confirm_mode confirm_mode;
@@ -169,7 +169,17 @@ extern char **available_attrs;
void list_attrs(FILE *fp);
int get_scr_cols(void);
-void translate_ids(int argc, char **argv, const char *mapname);
+
+#define MAP_IMAGE "ImageId"
+#define MAP_INSTANCE "InstanceId"
+#define MAP_GROUPID "GroupId"
+#define MAP_GROUPNAME "GroupName"
+#define MAP_SNAPSHOT "SnapshotId"
+#define MAP_VOLUME "VolumeId"
+#define MAP_AZ "AZ"
+#define MAP_REG "reg"
+
+void translate_ids(int argc, char **argv, const char *map);
void translate_resource_ids(int argc, char **argv);
int get_access_creds(const char *id, char **access_key_ptr,
diff --git a/src/getconout.c b/src/getconout.c
index a00f4cb..e8ff9b7 100644
--- a/src/getconout.c
+++ b/src/getconout.c
@@ -33,7 +33,7 @@ eclat_get_console_output(eclat_command_env_t *env, int argc, char **argv)
die(EX_USAGE, "not enough arguments");
else if (i > 1)
die(EX_USAGE, "only one argument is allowed");
- translate_ids(argc, argv, "InstanceId");
+ translate_ids(argc, argv, MAP_INSTANCE);
describe_query_create(env, argc, argv, "InstanceId");
return 0;
diff --git a/src/lsattr.c b/src/lsattr.c
index 9b49ca3..13d43aa 100644
--- a/src/lsattr.c
+++ b/src/lsattr.c
@@ -47,7 +47,7 @@ eclat_lsattr(eclat_command_env_t *env, int argc, char **argv)
command = find_command_name(cmdname);
if (!command)
abort();
- translate_option = 0;
+ translation_enabled = 0;
argv--;
argc++;
argv[0] = "lsattr";
diff --git a/src/lsiattr.c b/src/lsiattr.c
index 633e94d..77d1ea1 100644
--- a/src/lsiattr.c
+++ b/src/lsiattr.c
@@ -50,7 +50,7 @@ eclat_describe_instance_attribute(eclat_command_env_t *env, int argc, char **arg
if (argc != 2)
die(EX_USAGE, "wrong number of arguments");
- translate_ids(1, argv, "InstanceId");
+ translate_ids(1, argv, MAP_INSTANCE);
eclat_query_add_param(q, "InstanceId", argv[0]);
eclat_query_add_param(q, "Attribute", argv[1]);
diff --git a/src/lsimg.c b/src/lsimg.c
index db3c98b..973487e 100644
--- a/src/lsimg.c
+++ b/src/lsimg.c
@@ -27,7 +27,7 @@ eclat_describe_images(eclat_command_env_t *env, int argc, char **argv)
argc -= i;
argv += i;
- translate_ids(argc, argv, "ImageId");
+ translate_ids(argc, argv, MAP_IMAGE);
describe_query_create(env, argc, argv, "ImageId");
return 0;
diff --git a/src/lsinst.c b/src/lsinst.c
index 4cf4a34..cc45a70 100644
--- a/src/lsinst.c
+++ b/src/lsinst.c
@@ -145,7 +145,7 @@ eclat_describe_instances(eclat_command_env_t *env, int argc, char **argv)
parse_options(env->cmd, argc, argv, &i);
argv += i;
argc -= i;
- translate_ids(argc, argv, "InstanceId");
+ translate_ids(argc, argv, MAP_INSTANCE);
describe_query_create(env, argc, argv, "InstanceId");
return 0;
diff --git a/src/lsistat.c b/src/lsistat.c
index c9a518a..7ec5a0d 100644
--- a/src/lsistat.c
+++ b/src/lsistat.c
@@ -26,7 +26,7 @@ eclat_describe_instance_status(eclat_command_env_t *env, int argc, char **argv)
parse_options(env, argc, argv, &i);
argv += i;
argc -= i;
- translate_ids(argc, argv, "InstanceId");
+ translate_ids(argc, argv, MAP_INSTANCE);
describe_query_create(env, argc, argv, "InstanceId");
diff --git a/src/lsreg.c b/src/lsreg.c
index ef2cafb..cddd11a 100644
--- a/src/lsreg.c
+++ b/src/lsreg.c
@@ -42,7 +42,7 @@ eclat_describe_regions(eclat_command_env_t *env, int argc, char **argv)
parse_options(env->cmd, argc, argv, &i);
argv += i;
argc -= i;
- translate_ids(argc, argv, "reg");
+ translate_ids(argc, argv, MAP_REG);
describe_query_create(env, argc, argv, "RegionName");
return 0;
diff --git a/src/lssattr.c b/src/lssattr.c
index c3deb23..aa852bb 100644
--- a/src/lssattr.c
+++ b/src/lssattr.c
@@ -63,7 +63,7 @@ eclat_describe_snapshot_attribute(eclat_command_env_t *env,
attrname = attrs[0];
}
- translate_ids(1, argv, "SnapshotId");
+ translate_ids(1, argv, MAP_SNAPSHOT);
eclat_query_add_param(q, "SnapshotId", argv[0]);
eclat_query_add_param(q, "Attribute", attrname);
return 0;
@@ -139,7 +139,7 @@ eclat_modify_snapshot_attribute(eclat_command_env_t *env,
}
free(bufptr);
- translate_ids(1, argv + i, "SnapshotId");
+ translate_ids(1, argv + i, MAP_SNAPSHOT);
eclat_query_add_param(q, "SnapshotId", argv[i]);
return 0;
@@ -162,7 +162,7 @@ eclat_reset_snapshot_attribute(eclat_command_env_t *env,
if (argc != 1)
die(EX_USAGE, "wrong number of arguments");
- translate_ids(1, argv, "SnapshotId");
+ translate_ids(1, argv, MAP_SNAPSHOT);
eclat_query_add_param(q, "SnapshotId", argv[0]);
eclat_query_add_param(q, "Attribute", "CreateVolumePermission");
diff --git a/src/lssg.c b/src/lssg.c
index b3bd633..9068a08 100644
--- a/src/lssg.c
+++ b/src/lssg.c
@@ -22,14 +22,21 @@ int
eclat_describe_security_groups(eclat_command_env_t *env, int argc, char **argv)
{
int i;
- const char *resid = name_option ? "GroupName" : "GroupId";
+ static struct {
+ char *resid;
+ char *map;
+ } rt[] = {
+ { "GroupId", MAP_GROUPID },
+ { "GroupName", MAP_GROUPNAME }
+ };
+ int n = !!name_option;
parse_options(env, argc, argv, &i);
argv += i;
argc -= i;
- translate_ids(argc, argv, resid);
+ translate_ids(argc, argv, rt[n].map);
- describe_query_create(env, argc, argv, resid);
+ describe_query_create(env, argc, argv, rt[n].resid);
return 0;
}
diff --git a/src/lssnap.c b/src/lssnap.c
index d60e048..2392bf7 100644
--- a/src/lssnap.c
+++ b/src/lssnap.c
@@ -51,7 +51,7 @@ eclat_describe_snapshots(eclat_command_env_t *env, int argc, char **argv)
parse_options(env, argc, argv, &i);
argc -= i;
argv += i;
- translate_ids(argc, argv, "SnapshotId");
+ translate_ids(argc, argv, MAP_SNAPSHOT);
describe_query_create(env, argc, argv, "SnapshotId");
diff --git a/src/lstag-cl.opt b/src/lstag-cl.opt
index dfb8fc0..56f051f 100644
--- a/src/lstag-cl.opt
+++ b/src/lstag-cl.opt
@@ -44,7 +44,7 @@ OPTION(instance,i,[<ID>],
[<instance ID>])
BEGIN
struct resource *res = grecs_malloc(sizeof(*res));
- res->map = "InstanceId";
+ res->map = MAP_INSTANCE;
res->resid = optarg;
grecs_list_append(reslist, res);
END
@@ -53,7 +53,7 @@ OPTION(volume,v,[<ID>],
[<volume ID>])
BEGIN
struct resource *res = grecs_malloc(sizeof(*res));
- res->map = "VolumeId";
+ res->map = MAP_VOLUME;
res->resid = optarg;
grecs_list_append(reslist, res);
END
@@ -62,7 +62,7 @@ OPTION(ami,a,[<ID>],
[<AMI ID>])
BEGIN
struct resource *res = grecs_malloc(sizeof(*res));
- res->map = "ImageId";
+ res->map = MAP_IMAGE;
res->resid = optarg;
grecs_list_append(reslist, res);
END
@@ -71,7 +71,7 @@ OPTION(snapshot,s,[<ID>],
[<snapshot ID>])
BEGIN
struct resource *res = grecs_malloc(sizeof(*res));
- res->map = "SnapshotId";
+ res->map = MAP_SNAPSHOT;
res->resid = optarg;
grecs_list_append(reslist, res);
END
diff --git a/src/lsvol.c b/src/lsvol.c
index d52722d..de25b29 100644
--- a/src/lsvol.c
+++ b/src/lsvol.c
@@ -56,7 +56,7 @@ eclat_describe_volumes(eclat_command_env_t *env, int argc, char **argv)
argc, argv, &i);
argv += i;
argc -= i;
- translate_ids(argc, argv, "VolumeId");
+ translate_ids(argc, argv, MAP_VOLUME);
describe_query_create(env, argc, argv, "VolumeId");
return 0;
diff --git a/src/lszon.c b/src/lszon.c
index d5c06df..67550c6 100644
--- a/src/lszon.c
+++ b/src/lszon.c
@@ -49,7 +49,7 @@ eclat_describe_avaialbility_zones(eclat_command_env_t *env,
parse_options(env->cmd, argc, argv, &i);
argv += i;
argc -= i;
- translate_ids(argc, argv, "AZ");
+ translate_ids(argc, argv, MAP_AZ);
describe_query_create(env, argc, argv, "ZoneName");
return 0;
diff --git a/src/mkimg.c b/src/mkimg.c
index a34c302..5fc388a 100644
--- a/src/mkimg.c
+++ b/src/mkimg.c
@@ -32,7 +32,7 @@ eclat_create_image(eclat_command_env_t *env, int argc, char **argv)
if (argc != 2)
die(EX_USAGE, "wrong number of arguments");
- translate_ids(1, argv+1, "InstanceId");
+ translate_ids(1, argv+1, MAP_INSTANCE);
eclat_query_add_param(q, "Name", argv[0]);
eclat_query_add_param(q, "InstanceId", argv[1]);
diff --git a/src/mksnap.c b/src/mksnap.c
index 66a12f3..aaaa8fa 100644
--- a/src/mksnap.c
+++ b/src/mksnap.c
@@ -32,7 +32,7 @@ eclat_create_snapshot(eclat_command_env_t *env, int argc, char **argv)
argv += i;
if (argc < 1)
die(EX_USAGE, "not enough arguments");
- translate_ids(1, argv, "VolumeId");
+ translate_ids(1, argv, MAP_VOLUME);
if (argc == 2)
descr = argv[1];
else if (argc > 2) {
diff --git a/src/mktags-cl.opt b/src/mktags-cl.opt
index e622db8..58111e3 100644
--- a/src/mktags-cl.opt
+++ b/src/mktags-cl.opt
@@ -45,7 +45,7 @@ OPTION(instance,i,[<ID>],
[<instance ID>])
BEGIN
struct resource *res = grecs_malloc(sizeof(*res));
- res->map = "InstanceId";
+ res->map = MAP_INSTANCE;
res->resid = optarg;
grecs_list_append(reslist, res);
END
@@ -54,7 +54,7 @@ OPTION(volume,v,[<ID>],
[<volume ID>])
BEGIN
struct resource *res = grecs_malloc(sizeof(*res));
- res->map = "VolumeId";
+ res->map = MAP_VOLUME;
res->resid = optarg;
grecs_list_append(reslist, res);
END
@@ -63,7 +63,7 @@ OPTION(ami,a,[<ID>],
[<AMI ID>])
BEGIN
struct resource *res = grecs_malloc(sizeof(*res));
- res->map = "ImageId";
+ res->map = MAP_IMAGE;
res->resid = optarg;
grecs_list_append(reslist, res);
END
@@ -72,7 +72,7 @@ OPTION(snapshot,s,[<ID>],
[<snapshot ID>])
BEGIN
struct resource *res = grecs_malloc(sizeof(*res));
- res->map = "SnapshotId";
+ res->map = MAP_SNAPSHOT;
res->resid = optarg;
grecs_list_append(reslist, res);
END
diff --git a/src/rmsnap.c b/src/rmsnap.c
index 1446433..51e23b4 100644
--- a/src/rmsnap.c
+++ b/src/rmsnap.c
@@ -30,7 +30,7 @@ eclat_delete_snapshot(eclat_command_env_t *env, int argc, char **argv)
argv += i;
if (argc != 1)
die(EX_USAGE, "bad number of arguments");
- translate_ids(argc, argv, "SnapshotId");
+ translate_ids(argc, argv, MAP_SNAPSHOT);
eclat_query_add_param(q, "SnapshotId", argv[0]);
return 0;
}
diff --git a/src/rmvol.c b/src/rmvol.c
index 856b245..a90b79e 100644
--- a/src/rmvol.c
+++ b/src/rmvol.c
@@ -31,7 +31,7 @@ eclat_delete_volume(eclat_command_env_t *env, int argc, char **argv)
if (argc != 1)
die(EX_USAGE, "bad number of arguments");
- translate_ids(argc, argv, "VolumeId");
+ translate_ids(argc, argv, MAP_VOLUME);
eclat_query_add_param(q, "VolumeId", argv[0]);
return 0;
}
diff --git a/src/setiattr.c b/src/setiattr.c
index decfcbb..8a62c1a 100644
--- a/src/setiattr.c
+++ b/src/setiattr.c
@@ -92,7 +92,7 @@ eclat_modify_instance_attribute(eclat_command_env_t *env, int argc, char **argv)
if (argc < 3)
die(EX_USAGE, "wrong number of arguments");
- translate_ids(1, argv, "InstanceId");
+ translate_ids(1, argv, MAP_INSTANCE);
eclat_query_add_param(q, "InstanceId", argv[0]);
canonattr = canonattrname(argv[1], &canonlen);
diff --git a/src/startstop.c b/src/startstop.c
index 7ffb5bb..fa36ed7 100644
--- a/src/startstop.c
+++ b/src/startstop.c
@@ -35,7 +35,7 @@ start_stop_instance(eclat_command_env_t *env, int argc, char **argv)
if (argc == 0)
die(EX_USAGE, "no instance ids");
- translate_ids(argc, argv, "InstanceId");
+ translate_ids(argc, argv, MAP_INSTANCE);
strcpy(buf, "InstanceId.");
bend = buf + strlen(buf);
diff --git a/src/util.c b/src/util.c
index 65b8385..85a7e02 100644
--- a/src/util.c
+++ b/src/util.c
@@ -18,7 +18,7 @@
#include <termios.h>
#include <sys/ioctl.h>
-int translate_option;
+int translation_enabled;
char *custom_map;
void
@@ -29,8 +29,9 @@ translate_ids(int argc, char **argv, const char *mapname)
char *val;
char *q, *realname;
int dir;
+ int rc;
- if (!translate_option || argc == 0)
+ if (!translation_enabled || argc == 0)
return;
if (custom_map)
mapname = custom_map;
@@ -50,12 +51,21 @@ translate_ids(int argc, char **argv, const char *mapname)
for (i = 0; i < argc; i++) {
if (!strchr(argv[i], '=')) {
- int rc = eclat_map_get(map, dir, argv[i], &val);
- if (rc != eclat_map_ok) {
+ switch (rc = eclat_map_get(map, dir, argv[i], &val)) {
+ case eclat_map_ok:
+ argv[i] = val;
+ break;
+
+ case eclat_map_not_found:
+ debug(ECLAT_DEBCAT_MAIN, 1,
+ ("%s not found in map %s",
+ argv[i], mapname));
+ break;
+
+ default:
die(EX_UNAVAILABLE, "cannot translate %s: %s",
argv[i], eclat_map_strerror(rc));
}
- argv[i] = val;
}
}
}
@@ -81,7 +91,7 @@ translate_resource_ids(int argc, char **argv)
struct wordsplit ws;
int wsflags = WRDSF_DEFFLAGS|WRDSF_DELIM;
- if (!translate_option || argc == 0)
+ if (!translation_enabled || argc == 0)
return;
ws.ws_delim = ",";
for (i = 0; i < argc; i++) {

Return to:

Send suggestions and report system problems to the System administrator.