summaryrefslogtreecommitdiffstats
path: root/src/H5Lint.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Lint.c')
-rw-r--r--src/H5Lint.c177
1 files changed, 89 insertions, 88 deletions
diff --git a/src/H5Lint.c b/src/H5Lint.c
index a6a3824..554dd14 100644
--- a/src/H5Lint.c
+++ b/src/H5Lint.c
@@ -207,7 +207,7 @@ H5L_init(void)
/* Initialize user-defined link classes */
if (H5L_register_external() < 0)
- HGOTO_ERROR(H5E_LINK, H5E_NOTREGISTERED, FAIL, "unable to register external link class")
+ HGOTO_ERROR(H5E_LINK, H5E_NOTREGISTERED, FAIL, "unable to register external link class");
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -288,7 +288,7 @@ H5L_find_class(H5L_type_t id)
/* Get the index in the global table */
if ((idx = H5L__find_class_idx(id)) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_NOTREGISTERED, NULL, "unable to find link class")
+ HGOTO_ERROR(H5E_LINK, H5E_NOTREGISTERED, NULL, "unable to find link class");
/* Set return value */
ret_value = H5L_table_g + idx;
@@ -331,7 +331,7 @@ H5L_register(const H5L_class_t *cls)
size_t n = MAX(H5L_MIN_TABLE_SIZE, (2 * H5L_table_alloc_g));
H5L_class_t *table = (H5L_class_t *)H5MM_realloc(H5L_table_g, (n * sizeof(H5L_class_t)));
if (!table)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to extend link type table")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to extend link type table");
H5L_table_g = table;
H5L_table_alloc_g = n;
} /* end if */
@@ -375,7 +375,7 @@ H5L_unregister(H5L_type_t id)
/* Fail if filter not found */
if (i >= H5L_table_used_g)
- HGOTO_ERROR(H5E_LINK, H5E_NOTREGISTERED, FAIL, "link class is not registered")
+ HGOTO_ERROR(H5E_LINK, H5E_NOTREGISTERED, FAIL, "link class is not registered");
/* Remove filter from table */
/* Don't worry about shrinking table size (for now) */
@@ -451,7 +451,7 @@ H5L_link(const H5G_loc_t *new_loc, const char *new_name, H5G_loc_t *obj_loc, hid
/* Create the link */
if (H5L__create_real(new_loc, new_name, obj_loc->path, obj_loc->oloc->file, &lnk, NULL, lcpl_id) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create new link to object")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create new link to object");
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -489,7 +489,7 @@ H5L_link_object(const H5G_loc_t *new_loc, const char *new_name, H5O_obj_create_t
/* Create the link */
if (H5L__create_real(new_loc, new_name, NULL, NULL, &lnk, ocrt_info, lcpl_id) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create new link to object")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create new link to object");
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -521,7 +521,7 @@ H5L__link_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t H5_AT
/* Check if the name in this group resolved to a valid location */
/* (which is not what we want) */
if (obj_loc != NULL)
- HGOTO_ERROR(H5E_LINK, H5E_EXISTS, FAIL, "name already exists")
+ HGOTO_ERROR(H5E_LINK, H5E_EXISTS, FAIL, "name already exists");
/* Check for crossing file boundaries with a new hard link */
if (udata->lnk->type == H5L_TYPE_HARD) {
@@ -534,7 +534,7 @@ H5L__link_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t H5_AT
if (NULL ==
(udata->ocrt_info->new_obj = H5O_obj_create(grp_loc->oloc->file, udata->ocrt_info->obj_type,
udata->ocrt_info->crt_info, &new_loc)))
- HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create object")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create object");
/* Set address for hard link */
udata->lnk->u.hard.addr = new_loc.oloc->addr;
@@ -548,7 +548,7 @@ H5L__link_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t H5_AT
else {
/* Check that both objects are in same file */
if (!H5F_SAME_SHARED(grp_loc->oloc->file, udata->file))
- HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, FAIL, "interfile hard links are not allowed")
+ HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, FAIL, "interfile hard links are not allowed");
} /* end else */
} /* end if */
@@ -561,7 +561,7 @@ H5L__link_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t H5_AT
if (udata->lc_plist) {
/* Get character encoding property */
if (H5CX_get_encoding(&udata->lnk->cset) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't get 'character set' property")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't get 'character set' property");
} /* end if */
else
udata->lnk->cset = H5F_DEFAULT_CSET; /* Default character encoding for link */
@@ -575,12 +575,12 @@ H5L__link_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t H5_AT
if (H5G_obj_insert(grp_loc->oloc, name, udata->lnk, TRUE,
udata->ocrt_info ? udata->ocrt_info->obj_type : H5O_TYPE_UNKNOWN,
udata->ocrt_info ? udata->ocrt_info->crt_info : NULL) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create new link for object")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create new link for object");
/* Set object's path if it has been passed in and is not set */
if (udata->path != NULL && udata->path->user_path_r == NULL)
if (H5G_name_set(grp_loc->path, udata->path, name) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "cannot set name")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "cannot set name");
/* If link is a user-defined link, trigger its creation callback if it has one */
if (udata->lnk->type >= H5L_TYPE_UD_MIN) {
@@ -588,7 +588,7 @@ H5L__link_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t H5_AT
/* Get the link class for this type of link. */
if (NULL == (link_class = H5L_find_class(udata->lnk->type)))
- HGOTO_ERROR(H5E_LINK, H5E_NOTREGISTERED, FAIL, "unable to get class of UD link")
+ HGOTO_ERROR(H5E_LINK, H5E_NOTREGISTERED, FAIL, "unable to get class of UD link");
if (link_class->create_func != NULL) {
H5O_loc_t temp_oloc;
@@ -599,7 +599,7 @@ H5L__link_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t H5_AT
*/
H5G_name_reset(&temp_path);
if (H5O_loc_copy_deep(&temp_oloc, grp_loc->oloc) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to copy object location")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to copy object location");
temp_loc.oloc = &temp_oloc;
temp_loc.path = &temp_path;
@@ -607,14 +607,14 @@ H5L__link_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t H5_AT
/* Set up location for user-defined callback */
if (NULL == (grp = H5G_open(&temp_loc)))
- HGOTO_ERROR(H5E_LINK, H5E_CANTOPENOBJ, FAIL, "unable to open group")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTOPENOBJ, FAIL, "unable to open group");
if ((grp_id = H5VL_wrap_register(H5I_GROUP, grp, TRUE)) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTREGISTER, FAIL, "unable to register ID for group")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTREGISTER, FAIL, "unable to register ID for group");
/* Make callback */
if ((link_class->create_func)(name, grp_id, udata->lnk->u.ud.udata, udata->lnk->u.ud.size,
H5P_DEFAULT) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CALLBACK, FAIL, "link creation callback failed")
+ HGOTO_ERROR(H5E_LINK, H5E_CALLBACK, FAIL, "link creation callback failed");
} /* end if */
} /* end if */
@@ -688,7 +688,7 @@ H5L__create_real(const H5G_loc_t *link_loc, const char *link_name, H5G_name_t *o
/* Get normalized link name */
if ((norm_link_name = H5G_normalize(link_name)) == NULL)
- HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, FAIL, "can't normalize name")
+ HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, FAIL, "can't normalize name");
/* Check for flags present in creation property list */
if (lcpl_id != H5P_DEFAULT) {
@@ -696,11 +696,11 @@ H5L__create_real(const H5G_loc_t *link_loc, const char *link_name, H5G_name_t *o
/* Get link creation property list */
if (NULL == (lc_plist = (H5P_genplist_t *)H5I_object(lcpl_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list");
/* Get intermediate group creation property */
if (H5CX_get_intermediate_group(&crt_intmd_group) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't get 'create intermediate group' property")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't get 'create intermediate group' property");
if (crt_intmd_group > 0)
target_flags |= H5G_CRT_INTMD_GROUP;
@@ -726,7 +726,7 @@ H5L__create_real(const H5G_loc_t *link_loc, const char *link_name, H5G_name_t *o
/* Traverse the destination path & create new link */
if (H5G_traverse(link_loc, link_name, target_flags, H5L__link_cb, &udata) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTINSERT, FAIL, "can't insert link")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTINSERT, FAIL, "can't insert link");
done:
/* Free the normalized path name */
@@ -768,7 +768,7 @@ H5L__create_hard(H5G_loc_t *cur_loc, const char *cur_name, const H5G_loc_t *link
/* Get normalized copy of the current name */
if ((norm_cur_name = H5G_normalize(cur_name)) == NULL)
- HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, FAIL, "can't normalize name")
+ HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, FAIL, "can't normalize name");
/* Set up link data specific to hard links */
lnk.type = H5L_TYPE_HARD;
@@ -778,7 +778,7 @@ H5L__create_hard(H5G_loc_t *cur_loc, const char *cur_name, const H5G_loc_t *link
obj_loc.oloc = &oloc;
H5G_loc_reset(&obj_loc);
if (H5G_loc_find(cur_loc, norm_cur_name, &obj_loc) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "source object not found")
+ HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "source object not found");
loc_valid = TRUE;
/* Construct link information for eventual insertion */
@@ -790,7 +790,7 @@ H5L__create_hard(H5G_loc_t *cur_loc, const char *cur_name, const H5G_loc_t *link
/* Create actual link to the object. Pass in NULL for the path, since this
* function shouldn't change an object's user path. */
if (H5L__create_real(link_loc, link_name, NULL, link_file, &lnk, NULL, lcpl_id) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create new link to object")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create new link to object");
done:
/* Free the object header location */
@@ -830,7 +830,7 @@ H5L__create_soft(const char *target_path, const H5G_loc_t *link_loc, const char
/* Get normalized copy of the link target */
if ((norm_target = H5G_normalize(target_path)) == NULL)
- HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, FAIL, "can't normalize name")
+ HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, FAIL, "can't normalize name");
/* Set up link data specific to soft links */
lnk.type = H5L_TYPE_SOFT;
@@ -838,7 +838,7 @@ H5L__create_soft(const char *target_path, const H5G_loc_t *link_loc, const char
/* Create actual link to the object */
if (H5L__create_real(link_loc, link_name, NULL, NULL, &lnk, NULL, lcpl_id) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create new link to object")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create new link to object");
done:
/* Free the normalized target name */
@@ -878,7 +878,7 @@ H5L__create_ud(const H5G_loc_t *link_loc, const char *link_name, const void *ud_
/* Make sure that this link class is registered */
if (H5L__find_class_idx(type) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "link class has not been registered with library")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "link class has not been registered with library");
/* Fill in UD link-specific information in the link struct*/
if (ud_data_size > 0) {
@@ -893,7 +893,7 @@ H5L__create_ud(const H5G_loc_t *link_loc, const char *link_name, const void *ud_
/* Create actual link to the object */
if (H5L__create_real(link_loc, link_name, NULL, NULL, &lnk, NULL, lcpl_id) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to register new name for object")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to register new name for object");
done:
/* Free the link's udata buffer if it's been allocated */
@@ -942,13 +942,13 @@ H5L__get_val_real(const H5O_link_t *lnk, void *buf, size_t size)
if (link_class != NULL && link_class->query_func != NULL) {
if ((link_class->query_func)(lnk->name, lnk->u.ud.udata, lnk->u.ud.size, buf, size) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CALLBACK, FAIL, "query callback returned failure")
+ HGOTO_ERROR(H5E_LINK, H5E_CALLBACK, FAIL, "query callback returned failure");
} /* end if */
else if (buf && size > 0)
((char *)buf)[0] = '\0';
} /* end if */
else
- HGOTO_ERROR(H5E_LINK, H5E_BADTYPE, FAIL, "object is not a symbolic or user-defined link")
+ HGOTO_ERROR(H5E_LINK, H5E_BADTYPE, FAIL, "object is not a symbolic or user-defined link");
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -974,11 +974,11 @@ H5L__get_val_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char *name, cons
/* Check if the name in this group resolved to a valid link */
if (lnk == NULL)
- HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "'%s' doesn't exist", name)
+ HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "'%s' doesn't exist", name);
/* Retrieve the value for the link */
if (H5L__get_val_real(lnk, udata->buf, udata->size) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't retrieve link value")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't retrieve link value");
done:
/* Indicate that this callback didn't take ownership of the group *
@@ -1022,7 +1022,7 @@ H5L__get_val(const H5G_loc_t *loc, const char *name, void *buf /*out*/, size_t s
/* Traverse the group hierarchy to locate the object to get info about */
if (H5G_traverse(loc, name, H5G_TARGET_SLINK | H5G_TARGET_UDLINK, H5L__get_val_cb, &udata) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "name doesn't exist")
+ HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "name doesn't exist");
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1052,16 +1052,16 @@ H5L__get_val_by_idx_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_A
/* Check if the name of the group resolved to a valid object */
if (obj_loc == NULL)
- HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "group doesn't exist")
+ HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "group doesn't exist");
/* Query link */
if (H5G_obj_lookup_by_idx(obj_loc->oloc, udata->idx_type, udata->order, udata->n, &fnd_lnk) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "link not found")
+ HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "link not found");
lnk_copied = TRUE;
/* Retrieve the value for the link */
if (H5L__get_val_real(&fnd_lnk, udata->buf, udata->size) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't retrieve link value")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't retrieve link value");
done:
/* Reset the link information, if we have a copy */
@@ -1107,7 +1107,8 @@ H5L__get_val_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type,
/* Traverse the group hierarchy to locate the object to get info about */
if (H5G_traverse(loc, name, H5G_TARGET_SLINK | H5G_TARGET_UDLINK, H5L__get_val_by_idx_cb, &udata) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't get link info for index: %llu", (unsigned long long)n)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't get link info for index: %llu",
+ (unsigned long long)n);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1134,22 +1135,22 @@ H5L__delete_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t *ln
/* Check if the group resolved to a valid link */
if (grp_loc == NULL)
- HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "group doesn't exist")
+ HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "group doesn't exist");
/* Check if the name in this group resolved to a valid link */
if (name == NULL)
- HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "name doesn't exist")
+ HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "name doesn't exist");
/* Check for non-existent (NULL) link.
* Note that this can also occur when attempting to remove '.'
*/
if (lnk == NULL)
HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL,
- "callback link pointer is NULL (specified link may be '.' or not exist)")
+ "callback link pointer is NULL (specified link may be '.' or not exist)");
/* Remove the link from the group */
if (H5G_obj_remove(grp_loc->oloc, grp_loc->path->full_path_r, name) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "unable to remove link from group")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "unable to remove link from group");
done:
/* Indicate that this callback didn't take ownership of the group *
@@ -1182,12 +1183,12 @@ H5L__delete(const H5G_loc_t *loc, const char *name)
/* Get normalized copy of the name */
if ((norm_name = H5G_normalize(name)) == NULL)
- HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, FAIL, "can't normalize name")
+ HGOTO_ERROR(H5E_LINK, H5E_BADVALUE, FAIL, "can't normalize name");
/* Set up user data for unlink operation */
if (H5G_traverse(loc, norm_name, H5G_TARGET_SLINK | H5G_TARGET_UDLINK | H5G_TARGET_MOUNT, H5L__delete_cb,
NULL) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTREMOVE, FAIL, "can't unlink object")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTREMOVE, FAIL, "can't unlink object");
done:
/* Free the normalized path name */
@@ -1218,12 +1219,12 @@ H5L__delete_by_idx_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_AT
/* Check if the name of the group resolved to a valid object */
if (obj_loc == NULL)
- HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "group doesn't exist")
+ HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "group doesn't exist");
/* Delete link */
if (H5G_obj_remove_by_idx(obj_loc->oloc, obj_loc->path->full_path_r, udata->idx_type, udata->order,
udata->n) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "link not found")
+ HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "link not found");
done:
/* Indicate that this callback didn't take ownership of the group *
@@ -1264,7 +1265,7 @@ H5L__delete_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type,
/* Traverse the group hierarchy to remove the link */
if (H5G_traverse(loc, name, H5G_TARGET_SLINK | H5G_TARGET_UDLINK | H5G_TARGET_MOUNT,
H5L__delete_by_idx_cb, &udata) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "link doesn't exist")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "link doesn't exist");
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1296,13 +1297,13 @@ H5L__move_dest_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t
/* Make sure an object with this name doesn't already exist */
if (obj_loc != NULL)
- HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "an object with that name already exists")
+ HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "an object with that name already exists");
/* Check for crossing file boundaries with a new hard link */
if (udata->lnk->type == H5L_TYPE_HARD)
/* Check that both objects are in same file */
if (!H5F_SAME_SHARED(grp_loc->oloc->file, udata->file))
- HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "moving a link across files is not allowed")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "moving a link across files is not allowed");
/* Give the object its new name */
assert(udata->lnk->name == NULL);
@@ -1312,7 +1313,7 @@ H5L__move_dest_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t
/* Insert the link into the group */
if (H5G_obj_insert(grp_loc->oloc, name, udata->lnk, TRUE, H5O_TYPE_UNKNOWN, NULL) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create new link to object")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create new link to object");
/* If the link was a user-defined link, call its move callback if it has one */
if (udata->lnk->type >= H5L_TYPE_UD_MIN) {
@@ -1320,7 +1321,7 @@ H5L__move_dest_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t
/* Get the link class for this type of link. */
if (NULL == (link_class = H5L_find_class(udata->lnk->type)))
- HGOTO_ERROR(H5E_LINK, H5E_NOTREGISTERED, FAIL, "link class is not registered")
+ HGOTO_ERROR(H5E_LINK, H5E_NOTREGISTERED, FAIL, "link class is not registered");
if ((!udata->copy && link_class->move_func) || (udata->copy && link_class->copy_func)) {
H5O_loc_t temp_oloc;
@@ -1331,7 +1332,7 @@ H5L__move_dest_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t
*/
H5G_name_reset(&temp_path);
if (H5O_loc_copy_deep(&temp_oloc, grp_loc->oloc) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to copy object location")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to copy object location");
temp_loc.oloc = &temp_oloc;
temp_loc.path = &temp_path;
@@ -1339,19 +1340,19 @@ H5L__move_dest_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t
/* Set up location for user-defined callback */
if (NULL == (grp = H5G_open(&temp_loc)))
- HGOTO_ERROR(H5E_LINK, H5E_CANTOPENOBJ, FAIL, "unable to open group")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTOPENOBJ, FAIL, "unable to open group");
if ((grp_id = H5VL_wrap_register(H5I_GROUP, grp, TRUE)) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTREGISTER, FAIL, "unable to register group ID")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTREGISTER, FAIL, "unable to register group ID");
if (udata->copy) {
if ((link_class->copy_func)(udata->lnk->name, grp_id, udata->lnk->u.ud.udata,
udata->lnk->u.ud.size) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CALLBACK, FAIL, "UD copy callback returned error")
+ HGOTO_ERROR(H5E_LINK, H5E_CALLBACK, FAIL, "UD copy callback returned error");
} /* end if */
else {
if ((link_class->move_func)(udata->lnk->name, grp_id, udata->lnk->u.ud.udata,
udata->lnk->u.ud.size) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CALLBACK, FAIL, "UD move callback returned error")
+ HGOTO_ERROR(H5E_LINK, H5E_CALLBACK, FAIL, "UD move callback returned error");
} /* end else */
} /* end if */
} /* end if */
@@ -1405,15 +1406,15 @@ H5L__move_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t *lnk,
/* Check if the name in this group resolved to a valid link */
if (obj_loc == NULL)
- HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "name doesn't exist")
+ HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "name doesn't exist");
/* Check for operations on '.' */
if (lnk == NULL)
- HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "the name of a link must be supplied to move or copy")
+ HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "the name of a link must be supplied to move or copy");
/* Set up user data for move_dest_cb */
if (NULL == (udata_out.lnk = (H5O_link_t *)H5O_msg_copy(H5O_LINK_ID, lnk, NULL)))
- HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to copy link to be moved")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to copy link to be moved");
/* In this special case, the link's name is going to be replaced at its
* destination, so we should free it here.
@@ -1432,12 +1433,12 @@ H5L__move_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t *lnk,
* (destination) traversal has the correct value
*/
if (H5CX_set_nlinks(udata->orig_nlinks) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't reset # of soft / UD links to traverse")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't reset # of soft / UD links to traverse");
/* Insert the link into its new location */
if (H5G_traverse(udata->dst_loc, udata->dst_name, udata->dst_target_flags, H5L__move_dest_cb,
&udata_out) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to follow symbolic link")
+ HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to follow symbolic link");
/* If this is a move and not a copy operation, change the object's name and remove the old link */
if (!udata->copy) {
@@ -1450,7 +1451,7 @@ H5L__move_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t *lnk,
/* Create reference counted string for full dst path */
if ((dst_name_r = H5G_build_fullpath_refstr_str(udata->dst_loc->path->full_path_r,
udata->dst_name)) == NULL)
- HGOTO_ERROR(H5E_LINK, H5E_PATH, FAIL, "can't build destination path name")
+ HGOTO_ERROR(H5E_LINK, H5E_PATH, FAIL, "can't build destination path name");
} /* end if */
else
dst_name_r = H5RS_wrap(udata->dst_name);
@@ -1460,13 +1461,13 @@ H5L__move_cb(H5G_loc_t *grp_loc /*in*/, const char *name, const H5O_link_t *lnk,
if (H5G_name_replace(lnk, H5G_NAME_MOVE, obj_loc->oloc->file, obj_loc->path->full_path_r,
udata->dst_loc->oloc->file, dst_name_r) < 0) {
H5RS_decr(dst_name_r);
- HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to replace name")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to replace name");
} /* end if */
/* Remove the old link */
if (H5G_obj_remove(grp_loc->oloc, grp_loc->path->full_path_r, orig_name) < 0) {
H5RS_decr(dst_name_r);
- HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to remove old name")
+ HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to remove old name");
} /* end if */
H5RS_decr(dst_name_r);
@@ -1531,11 +1532,11 @@ H5L__move(const H5G_loc_t *src_loc, const char *src_name, const H5G_loc_t *dst_l
unsigned crt_intmd_group;
if (NULL == (lc_plist = (H5P_genplist_t *)H5I_object(lcpl_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list");
/* Get intermediate group creation property */
if (H5CX_get_intermediate_group(&crt_intmd_group) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for creating missing groups")
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for creating missing groups");
/* Set target flags for source and destination */
if (crt_intmd_group > 0)
@@ -1543,7 +1544,7 @@ H5L__move(const H5G_loc_t *src_loc, const char *src_name, const H5G_loc_t *dst_l
/* Get character encoding property */
if (H5CX_get_encoding(&char_encoding) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for character encoding")
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for character encoding");
} /* end if */
/* Set up user data */
@@ -1557,12 +1558,12 @@ H5L__move(const H5G_loc_t *src_loc, const char *src_name, const H5G_loc_t *dst_l
* that the countdown can be reset after the first path is traversed.
*/
if (H5CX_get_nlinks(&udata.orig_nlinks) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to retrieve # of soft / UD links to traverse")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to retrieve # of soft / UD links to traverse");
/* Do the move */
if (H5G_traverse(src_loc, src_name, H5G_TARGET_MOUNT | H5G_TARGET_SLINK | H5G_TARGET_UDLINK, H5L__move_cb,
&udata) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to find link")
+ HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "unable to find link");
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1637,7 +1638,7 @@ H5L__exists_inter_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ATT
cb_func = H5L__exists_inter_cb;
} /* end else */
if (H5G_traverse(obj_loc, next, H5G_TARGET_SLINK | H5G_TARGET_UDLINK, cb_func, udata) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't determine if link exists")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't determine if link exists");
} /* end if */
else
*udata->exists = TRUE;
@@ -1705,7 +1706,7 @@ H5L_exists_tolerant(const H5G_loc_t *loc, const char *name, hbool_t *exists)
/* Traverse the group hierarchy to locate the link to check */
if (H5G_traverse(loc, name_trav, H5G_TARGET_SLINK | H5G_TARGET_UDLINK, cb_func, &udata) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't determine if link exists")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't determine if link exists");
}
done:
@@ -1747,7 +1748,7 @@ H5L__exists(const H5G_loc_t *loc, const char *name, hbool_t *exists)
/* Traverse the group hierarchy to locate the object to get info about */
udata.exists = exists;
if (H5G_traverse(loc, name, H5G_TARGET_SLINK | H5G_TARGET_UDLINK, H5L__exists_final_cb, &udata) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_EXISTS, FAIL, "link doesn't exist")
+ HGOTO_ERROR(H5E_LINK, H5E_EXISTS, FAIL, "link doesn't exist");
}
done:
@@ -1774,11 +1775,11 @@ H5L__get_info_cb(H5G_loc_t *grp_loc /*in*/, const char H5_ATTR_UNUSED *name, con
/* Check if the name in this group resolved to a valid link */
if (lnk == NULL)
- HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "name doesn't exist")
+ HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "name doesn't exist");
/* Get information from the link */
if (H5G_link_to_info(grp_loc->oloc, lnk, udata->linfo) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't get link info")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't get link info");
done:
/* Indicate that this callback didn't take ownership of the group *
@@ -1809,7 +1810,7 @@ H5L_get_info(const H5G_loc_t *loc, const char *name, H5L_info2_t *linfo /*out*/)
/* Traverse the group hierarchy to locate the object to get info about */
if (H5G_traverse(loc, name, H5G_TARGET_SLINK | H5G_TARGET_UDLINK, H5L__get_info_cb, &udata) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_EXISTS, FAIL, "name doesn't exist")
+ HGOTO_ERROR(H5E_LINK, H5E_EXISTS, FAIL, "name doesn't exist");
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1839,16 +1840,16 @@ H5L__get_info_by_idx_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_
/* Check if the name of the group resolved to a valid object */
if (obj_loc == NULL)
- HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "group doesn't exist")
+ HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "group doesn't exist");
/* Query link */
if (H5G_obj_lookup_by_idx(obj_loc->oloc, udata->idx_type, udata->order, udata->n, &fnd_lnk) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "link not found")
+ HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "link not found");
lnk_copied = TRUE;
/* Get information from the link */
if (H5G_link_to_info(obj_loc->oloc, &fnd_lnk, udata->linfo) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't get link info")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't get link info");
done:
/* Reset the link information, if we have a copy */
@@ -1894,7 +1895,7 @@ H5L__get_info_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type
/* Traverse the group hierarchy to locate the object to get info about */
if (H5G_traverse(loc, name, H5G_TARGET_SLINK | H5G_TARGET_UDLINK, H5L__get_info_by_idx_cb, &udata) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get link info")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get link info");
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1922,12 +1923,12 @@ H5L__get_name_by_idx_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_
/* Check if the name of the group resolved to a valid object */
if (obj_loc == NULL)
- HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "group doesn't exist")
+ HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "group doesn't exist");
/* Query link */
if (H5G_obj_get_name_by_idx(obj_loc->oloc, udata->idx_type, udata->order, udata->n, udata->name,
udata->size, &udata->name_len) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "link not found")
+ HGOTO_ERROR(H5E_LINK, H5E_NOTFOUND, FAIL, "link not found");
done:
/* Indicate that this callback didn't take ownership of the group *
@@ -1972,7 +1973,7 @@ H5L__get_name_by_idx(const H5G_loc_t *loc, const char *group_name, H5_index_t id
/* Traverse the group hierarchy to locate the link to get name of */
if (H5G_traverse(loc, group_name, H5G_TARGET_SLINK | H5G_TARGET_UDLINK, H5L__get_name_by_idx_cb, &udata) <
0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't get name")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't get name");
/* Set the return value */
*link_name_len = udata.name_len;
@@ -2028,24 +2029,24 @@ H5L__link_copy_file(H5F_t *dst_file, const H5O_link_t *_src_lnk, const H5O_loc_t
/* Check if the target object exists */
if (H5G_loc_exists(&lnk_grp_loc, src_lnk->name, &tar_exists) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to check if target object exists")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to check if target object exists");
if (tar_exists) {
/* Make a temporary copy of the link, so that it will not change the
* info in the cache when we change it to a hard link */
if (NULL == H5O_msg_copy(H5O_LINK_ID, src_lnk, &tmp_src_lnk))
- HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to copy message")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to copy message");
/* Set up group location for target object. Let H5G_traverse expand
* the link. */
tmp_src_loc.path = &tmp_src_path;
tmp_src_loc.oloc = &tmp_src_oloc;
if (H5G_loc_reset(&tmp_src_loc) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to reset location")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to reset location");
/* Find the target object */
if (H5G_loc_find(&lnk_grp_loc, src_lnk->name, &tmp_src_loc) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to find target object")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to find target object");
expanded_link_open = TRUE;
/* Convert symbolic link to hard link */
@@ -2061,7 +2062,7 @@ H5L__link_copy_file(H5F_t *dst_file, const H5O_link_t *_src_lnk, const H5O_loc_t
/* Copy src link information to dst link information */
if (NULL == H5O_msg_copy(H5O_LINK_ID, src_lnk, dst_lnk))
- HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to copy message")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to copy message");
dst_lnk_init = TRUE;
/* Check if object in source group is a hard link & copy it */
@@ -2084,7 +2085,7 @@ H5L__link_copy_file(H5F_t *dst_file, const H5O_link_t *_src_lnk, const H5O_loc_t
/* Don't care about obj_type or udata because those are only important
* for old style groups */
if (H5O_copy_header_map(&tmp_src_oloc, &new_dst_oloc, cpy_info, TRUE, NULL, NULL) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to copy object")
+ HGOTO_ERROR(H5E_LINK, H5E_CANTCOPY, FAIL, "unable to copy object");
/* Copy new destination object's information for eventual insertion */
dst_lnk->u.hard.addr = new_dst_oloc.addr;
@@ -2142,7 +2143,7 @@ H5L_iterate(H5G_loc_t *loc, const char *group_name, H5_index_t idx_type, H5_iter
/* Iterate over the links */
if ((ret_value = H5G_iterate(loc, group_name, idx_type, order, idx, &last_lnk, &lnk_op, op_data)) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "link iteration failed")
+ HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "link iteration failed");
/* Set the index we stopped at */
if (idx_p)