summaryrefslogtreecommitdiffstats
path: root/src/H5Gloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Gloc.c')
-rw-r--r--src/H5Gloc.c106
1 files changed, 53 insertions, 53 deletions
diff --git a/src/H5Gloc.c b/src/H5Gloc.c
index 885fdca..24590d0 100644
--- a/src/H5Gloc.c
+++ b/src/H5Gloc.c
@@ -151,7 +151,7 @@ H5G_loc_real(void *obj, H5I_type_t type, H5G_loc_t *loc)
/* Construct a group location for root group of the file */
if (H5G_root_loc(f, loc) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "unable to create location for file")
+ HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "unable to create location for file");
break;
}
@@ -159,9 +159,9 @@ H5G_loc_real(void *obj, H5I_type_t type, H5G_loc_t *loc)
H5G_t *group = (H5G_t *)obj;
if (NULL == (loc->oloc = H5G_oloc(group)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location of group")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location of group");
if (NULL == (loc->path = H5G_nameof(group)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path of group")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path of group");
break;
}
@@ -172,9 +172,9 @@ H5G_loc_real(void *obj, H5I_type_t type, H5G_loc_t *loc)
dt = H5T_get_actual_type((H5T_t *)obj);
if (NULL == (loc->oloc = H5T_oloc(dt)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location of datatype")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location of datatype");
if (NULL == (loc->path = H5T_nameof(dt)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path of datatype")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path of datatype");
break;
}
@@ -182,9 +182,9 @@ H5G_loc_real(void *obj, H5I_type_t type, H5G_loc_t *loc)
H5D_t *dset = (H5D_t *)obj;
if (NULL == (loc->oloc = H5D_oloc(dset)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location of dataset")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location of dataset");
if (NULL == (loc->path = H5D_nameof(dset)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path of dataset")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path of dataset");
break;
}
@@ -192,48 +192,48 @@ H5G_loc_real(void *obj, H5I_type_t type, H5G_loc_t *loc)
H5A_t *attr = (H5A_t *)obj;
if (NULL == (loc->oloc = H5A_oloc(attr)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location of attribute")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get object location of attribute");
if (NULL == (loc->path = H5A_nameof(attr)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path of attribute")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get path of attribute");
break;
}
case H5I_DATASPACE:
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get group location of dataspace")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get group location of dataspace");
case H5I_MAP:
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "maps not supported in native VOL connector")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "maps not supported in native VOL connector");
case H5I_GENPROP_CLS:
case H5I_GENPROP_LST:
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get group location of property list")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get group location of property list");
case H5I_ERROR_CLASS:
case H5I_ERROR_MSG:
case H5I_ERROR_STACK:
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "unable to get group location of error class, message or stack")
+ "unable to get group location of error class, message or stack");
case H5I_VFL:
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "unable to get group location of a virtual file driver (VFD)")
+ "unable to get group location of a virtual file driver (VFD)");
case H5I_VOL:
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "unable to get group location of a virtual object layer (VOL) connector")
+ "unable to get group location of a virtual object layer (VOL) connector");
case H5I_SPACE_SEL_ITER:
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
- "unable to get group location of a dataspace selection iterator")
+ "unable to get group location of a dataspace selection iterator");
case H5I_EVENTSET:
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get group location of a event set")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unable to get group location of a event set");
case H5I_UNINIT:
case H5I_BADID:
case H5I_NTYPES:
default:
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid location ID")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid location ID");
} /* end switch */
done:
@@ -259,11 +259,11 @@ H5G_loc(hid_t loc_id, H5G_loc_t *loc)
/* Get the object from the VOL */
if (NULL == (obj = H5VL_object(loc_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid location identifier");
/* Fill in the struct */
if (H5G_loc_real(obj, H5I_get_type(loc_id), loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "unable to fill in location struct")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "unable to fill in location struct");
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -291,9 +291,9 @@ H5G_loc_copy(H5G_loc_t *dst, const H5G_loc_t *src, H5_copy_depth_t depth)
/* Copy components of the location */
if (H5O_loc_copy(dst->oloc, src->oloc, depth) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to copy entry")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to copy entry");
if (H5G_name_copy(dst->path, src->path, depth) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to copy path")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to copy path");
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -320,9 +320,9 @@ H5G_loc_reset(H5G_loc_t *loc)
/* Reset components of the location */
if (H5O_loc_reset(loc->oloc) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to reset entry")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to reset entry");
if (H5G_name_reset(loc->path) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to reset path")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to reset path");
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -349,9 +349,9 @@ H5G_loc_free(H5G_loc_t *loc)
/* Reset components of the location */
if (H5G_name_free(loc->path) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to free path")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "unable to free path");
if (H5O_loc_free(loc->oloc) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "unable to free object header location")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "unable to free object header location");
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -378,7 +378,7 @@ H5G__loc_find_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char *name,
/* Check if the name in this group resolved to a valid object */
if (obj_loc == NULL)
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object '%s' doesn't exist", name)
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object '%s' doesn't exist", name);
/* Take ownership of the object's group location */
/* (Group traversal callbacks are responsible for either taking ownership
@@ -418,7 +418,7 @@ H5G_loc_find(const H5G_loc_t *loc, const char *name, H5G_loc_t *obj_loc /*out*/)
/* Traverse group hierarchy to locate object */
if (H5G_traverse(loc, name, H5G_TARGET_NORMAL, H5G__loc_find_cb, &udata) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't find object")
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't find object");
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -450,23 +450,23 @@ H5G__loc_find_by_idx_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_
/* Check if the name in this group resolved to a valid link */
if (obj_loc == NULL)
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "group doesn't exist")
+ HGOTO_ERROR(H5E_SYM, 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_SYM, H5E_NOTFOUND, FAIL, "link not found")
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "link not found");
lnk_copied = TRUE;
/* Build the initial object location for the link */
if (H5G__link_to_loc(obj_loc, &fnd_lnk, udata->loc) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "cannot initialize object location")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "cannot initialize object location");
obj_loc_valid = TRUE;
/* Perform any special traversals that the link needs */
/* (soft links, user-defined links, file mounting, etc.) */
/* (may modify the object location) */
if (H5G__traverse_special(obj_loc, &fnd_lnk, H5G_TARGET_NORMAL, TRUE, udata->loc, &obj_exists) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_TRAVERSE, FAIL, "special link traversal failed")
+ HGOTO_ERROR(H5E_LINK, H5E_TRAVERSE, FAIL, "special link traversal failed");
done:
/* Reset the link information, if we have a copy */
@@ -516,7 +516,7 @@ H5G_loc_find_by_idx(const H5G_loc_t *loc, const char *group_name, H5_index_t idx
/* Traverse group hierarchy to locate object */
if (H5G_traverse(loc, group_name, H5G_TARGET_NORMAL, H5G__loc_find_by_idx_cb, &udata) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't find object")
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't find object");
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -554,11 +554,11 @@ H5G__loc_insert(H5G_loc_t *grp_loc, char *name, H5G_loc_t *obj_loc, H5O_type_t o
/* Insert new group into current group's symbol table */
if (H5G_obj_insert(grp_loc->oloc, name, &lnk, TRUE, obj_type, crt_info) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert object")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert object");
/* Set the name of the object location */
if (H5G_name_set(grp_loc->path, obj_loc->path, name) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "cannot set name")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "cannot set name");
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -588,7 +588,7 @@ H5G__loc_exists_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ATTR_
if (lnk)
*exists = FALSE;
else
- HGOTO_ERROR(H5E_SYM, H5E_INTERNAL, FAIL, "no object or link info?")
+ HGOTO_ERROR(H5E_SYM, H5E_INTERNAL, FAIL, "no object or link info?");
else
*exists = TRUE;
@@ -624,7 +624,7 @@ H5G_loc_exists(const H5G_loc_t *loc, const char *name, hbool_t *exists)
/* Traverse group hierarchy to locate object */
if (H5G_traverse(loc, name, H5G_TARGET_EXISTS, H5G__loc_exists_cb, exists) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't check if object exists")
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't check if object exists");
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -651,7 +651,7 @@ H5G__loc_addr_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ATTR_UN
/* Check if the name in this group resolved to a valid link */
if (obj_loc == NULL)
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "name doesn't exist")
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "name doesn't exist");
/* Set address of object */
*udata = obj_loc->oloc->addr;
@@ -688,7 +688,7 @@ H5G__loc_addr(const H5G_loc_t *loc, const char *name, haddr_t *addr /*out*/)
/* Traverse group hierarchy to locate object */
if (H5G_traverse(loc, name, H5G_TARGET_NORMAL, H5G__loc_addr_cb, addr) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't find object")
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't find object");
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -715,11 +715,11 @@ H5G__loc_info_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_ATTR_UN
/* Check if the name in this group resolved to a valid link */
if (obj_loc == NULL)
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "name doesn't exist")
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "name doesn't exist");
/* Query object information */
if (H5O_get_info(obj_loc->oloc, udata->oinfo, udata->fields) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get object info")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get object info");
done:
/* Indicate that this callback didn't take ownership of the group *
@@ -758,7 +758,7 @@ H5G_loc_info(const H5G_loc_t *loc, const char *name, H5O_info2_t *oinfo /*out*/,
/* Traverse group hierarchy to locate object */
if (H5G_traverse(loc, name, H5G_TARGET_NORMAL, H5G__loc_info_cb, &udata) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't find object")
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't find object");
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -785,11 +785,11 @@ H5G__loc_native_info_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_
/* Check if the name in this group resolved to a valid link */
if (obj_loc == NULL)
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "name doesn't exist")
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "name doesn't exist");
/* Query object information */
if (H5O_get_native_info(obj_loc->oloc, udata->oinfo, udata->fields) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get object info")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get object info");
done:
/* Indicate that this callback didn't take ownership of the group *
@@ -828,7 +828,7 @@ H5G_loc_native_info(const H5G_loc_t *loc, const char *name, H5O_native_info_t *o
/* Traverse group hierarchy to locate object */
if (H5G_traverse(loc, name, H5G_TARGET_NORMAL, H5G__loc_native_info_cb, &udata) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't find object")
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't find object");
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -857,24 +857,24 @@ H5G__loc_set_comment_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_
/* Check if the name in this group resolved to a valid link */
if (obj_loc == NULL)
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "name doesn't exist")
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "name doesn't exist");
/* Check for existing comment message */
if ((exists = H5O_msg_exists(obj_loc->oloc, H5O_NAME_ID)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to read object header")
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to read object header");
/* Remove the previous comment message if any */
if (exists)
if (H5O_msg_remove(obj_loc->oloc, H5O_NAME_ID, 0, TRUE) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL,
- "unable to delete existing comment object header message")
+ "unable to delete existing comment object header message");
/* Add the new message */
if (udata->comment && *udata->comment) {
if (NULL == (comment.s = HDstrdup(udata->comment)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't copy group comment")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't copy group comment");
if (H5O_msg_create(obj_loc->oloc, H5O_NAME_ID, 0, H5O_UPDATE_TIME, &comment) < 0)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to set comment object header message")
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to set comment object header message");
} /* end if */
done:
@@ -914,7 +914,7 @@ H5G_loc_set_comment(const H5G_loc_t *loc, const char *name, const char *comment)
/* Traverse group hierarchy to locate object */
if (H5G_traverse(loc, name, H5G_TARGET_NORMAL, H5G__loc_set_comment_cb, &udata) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't find object")
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't find object");
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -942,7 +942,7 @@ H5G__loc_get_comment_cb(H5G_loc_t H5_ATTR_UNUSED *grp_loc /*in*/, const char H5_
/* Check if the name in this group resolved to a valid link */
if (obj_loc == NULL)
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "name doesn't exist")
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "name doesn't exist");
/* Query object comment */
comment.s = NULL;
@@ -997,7 +997,7 @@ H5G_loc_get_comment(const H5G_loc_t *loc, const char *name, char *comment /*out*
/* Traverse group hierarchy to locate object */
if (H5G_traverse(loc, name, H5G_TARGET_NORMAL, H5G__loc_get_comment_cb, &udata) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't find object")
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't find object");
/* Set value to return */
if (comment_len)