aboutsummaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/util.c b/src/util.c
index 9e90ca5..a4a5834 100644
--- a/src/util.c
+++ b/src/util.c
@@ -42,10 +42,11 @@ translate_ids(int argc, char **argv, const char *mapname)
map = eclat_map_lookup(realname);
if (!map)
die(EX_UNAVAILABLE, "no such map: %s", realname);
- free(realname);
if (eclat_map_open(map) != eclat_map_ok)
- exit(EX_UNAVAILABLE);
+ die(EX_UNAVAILABLE, "failed to open map %s", realname);
+
+ free(realname);
for (i = 0; i < argc; i++) {
if (!strchr(argv[i], '=')) {
@@ -101,7 +102,8 @@ translate_resource_ids(int argc, char **argv)
die(EX_UNAVAILABLE, "no such map: %s",
ws.ws_wordv[j]);
if (eclat_map_open(map) != eclat_map_ok)
- exit(EX_UNAVAILABLE);
+ die(EX_UNAVAILABLE,
+ "failed to open map %s", ws.ws_wordv[j]);
rc = eclat_map_get(map, MAP_DIR, p, &val);
if (rc != eclat_map_ok) {
die(EX_UNAVAILABLE,

Return to:

Send suggestions and report system problems to the System administrator.