summaryrefslogtreecommitdiffstats
path: root/src/H5R.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5R.c')
-rw-r--r--src/H5R.c172
1 files changed, 88 insertions, 84 deletions
diff --git a/src/H5R.c b/src/H5R.c
index 2c4c713..8b9c979 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -66,22 +66,22 @@
/*-------------------------------------------------------------------------
* Function: H5Rcreate_object
*
- * Purpose: Creates an object reference. The LOC_ID and NAME are used to locate
- * the object pointed to.
+ * Purpose: Creates an object reference. The LOC_ID and NAME are used
+ * to locate the object pointed to.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success / Negative on failure
*
*-------------------------------------------------------------------------
*/
herr_t
H5Rcreate_object(hid_t loc_id, const char *name, hid_t oapl_id, H5R_ref_t *ref_ptr)
{
- H5VL_object_t *vol_obj = NULL; /* Object token of loc_id */
+ H5VL_object_t *vol_obj = NULL; /* Object of loc_id */
H5I_type_t obj_type; /* Object type of loc_id */
hid_t file_id = H5I_INVALID_HID;/* File ID */
- H5VL_object_t *vol_obj_file = NULL; /* Object token of file_id */
+ H5VL_object_t *vol_obj_file = NULL; /* Object of file_id */
H5VL_loc_params_t loc_params; /* Location parameters */
- H5VL_token_t obj_token = {0}; /* Object token */
+ H5O_token_t obj_token = {0}; /* Object token */
H5VL_file_cont_info_t cont_info = {H5VL_CONTAINER_INFO_VERSION, 0, 0, 0};
herr_t ret_value = SUCCEED; /* Return value */
@@ -135,11 +135,11 @@ H5Rcreate_object(hid_t loc_id, const char *name, hid_t oapl_id, H5R_ref_t *ref_p
/* Create the reference (do not pass filename, since file_id is attached) */
HDmemset(ref_ptr, 0, H5R_REF_BUF_SIZE);
- if(H5R__create_object((const H5VL_token_t *)&obj_token, cont_info.token_size, (H5R_ref_priv_t *)ref_ptr) < 0)
+ if(H5R__create_object((const H5O_token_t *)&obj_token, cont_info.token_size, (H5R_ref_priv_t *)ref_ptr) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCREATE, FAIL, "unable to create object reference")
/* Attach loc_id to reference and hold reference to it */
- if(H5R__set_loc_id((H5R_ref_priv_t *)ref_ptr, file_id, TRUE) < 0)
+ if(H5R__set_loc_id((H5R_ref_priv_t *)ref_ptr, file_id, TRUE, TRUE) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "unable to attach location id to reference")
done:
@@ -152,11 +152,11 @@ done:
/*-------------------------------------------------------------------------
* Function: H5Rcreate_region
*
- * Purpose: Creates a region reference. The LOC_ID and NAME are used to locate
- * the object pointed to and the SPACE_ID is used to choose the region pointed
- * to.
+ * Purpose: Creates a region reference. The LOC_ID and NAME are used to
+ * locate the object pointed to and the SPACE_ID is used to
+ * choose the region pointed to.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success / Negative on failure
*
*-------------------------------------------------------------------------
*/
@@ -164,12 +164,12 @@ herr_t
H5Rcreate_region(hid_t loc_id, const char *name, hid_t space_id,
hid_t oapl_id, H5R_ref_t *ref_ptr)
{
- H5VL_object_t *vol_obj = NULL; /* Object token of loc_id */
+ H5VL_object_t *vol_obj = NULL; /* Object of loc_id */
H5I_type_t obj_type; /* Object type of loc_id */
hid_t file_id = H5I_INVALID_HID;/* File ID */
- H5VL_object_t *vol_obj_file = NULL; /* Object token of file_id */
+ H5VL_object_t *vol_obj_file = NULL; /* Object of file_id */
H5VL_loc_params_t loc_params; /* Location parameters */
- H5VL_token_t obj_token = {0}; /* Object token */
+ H5O_token_t obj_token = {0}; /* Object token */
H5VL_file_cont_info_t cont_info = {H5VL_CONTAINER_INFO_VERSION, 0, 0, 0};
struct H5S_t *space = NULL; /* Pointer to dataspace containing region */
herr_t ret_value = SUCCEED; /* Return value */
@@ -228,16 +228,16 @@ H5Rcreate_region(hid_t loc_id, const char *name, hid_t space_id,
/* Create the reference (do not pass filename, since file_id is attached) */
HDmemset(ref_ptr, 0, H5R_REF_BUF_SIZE);
- if(H5R__create_region((const H5VL_token_t *)&obj_token, cont_info.token_size, space, (H5R_ref_priv_t *)ref_ptr) < 0)
+ if(H5R__create_region((const H5O_token_t *)&obj_token, cont_info.token_size, space, (H5R_ref_priv_t *)ref_ptr) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCREATE, FAIL, "unable to create region reference")
/* Attach loc_id to reference and hold reference to it */
- if(H5R__set_loc_id((H5R_ref_priv_t *)ref_ptr, file_id, TRUE) < 0)
+ if(H5R__set_loc_id((H5R_ref_priv_t *)ref_ptr, file_id, TRUE, TRUE) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "unable to attach location id to reference")
done:
if(file_id != H5I_INVALID_HID && H5I_dec_ref(file_id) < 0)
- HDONE_ERROR(H5E_REFERENCE, H5E_CANTDEC, H5I_INVALID_HID, "unable to decrement refcount on file")
+ HDONE_ERROR(H5E_REFERENCE, H5E_CANTDEC, FAIL, "unable to decrement refcount on file")
FUNC_LEAVE_API(ret_value)
} /* end H5Rcreate_region() */
@@ -245,10 +245,10 @@ done:
/*-------------------------------------------------------------------------
* Function: H5Rcreate_attr
*
- * Purpose: Creates an attribute reference. The LOC_ID, NAME and ATTR_NAME are
- * used to locate the attribute pointed to.
+ * Purpose: Creates an attribute reference. The LOC_ID, NAME and
+ * ATTR_NAME are used to locate the attribute pointed to.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success / Negative on failure
*
*-------------------------------------------------------------------------
*/
@@ -256,12 +256,12 @@ herr_t
H5Rcreate_attr(hid_t loc_id, const char *name, const char *attr_name,
hid_t oapl_id, H5R_ref_t *ref_ptr)
{
- H5VL_object_t *vol_obj = NULL; /* Object token of loc_id */
+ H5VL_object_t *vol_obj = NULL; /* Object of loc_id */
H5I_type_t obj_type; /* Object type of loc_id */
hid_t file_id = H5I_INVALID_HID;/* File ID */
- H5VL_object_t *vol_obj_file = NULL; /* Object token of file_id */
+ H5VL_object_t *vol_obj_file = NULL; /* Object of file_id */
H5VL_loc_params_t loc_params; /* Location parameters */
- H5VL_token_t obj_token = {0}; /* Object token */
+ H5O_token_t obj_token = {0}; /* Object token */
H5VL_file_cont_info_t cont_info = {H5VL_CONTAINER_INFO_VERSION, 0, 0, 0};
herr_t ret_value = SUCCEED; /* Return value */
@@ -317,16 +317,16 @@ H5Rcreate_attr(hid_t loc_id, const char *name, const char *attr_name,
/* Create the reference (do not pass filename, since file_id is attached) */
HDmemset(ref_ptr, 0, H5R_REF_BUF_SIZE);
- if(H5R__create_attr((const H5VL_token_t *)&obj_token, cont_info.token_size, attr_name, (H5R_ref_priv_t *)ref_ptr) < 0)
+ if(H5R__create_attr((const H5O_token_t *)&obj_token, cont_info.token_size, attr_name, (H5R_ref_priv_t *)ref_ptr) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTCREATE, FAIL, "unable to create attribute reference")
/* Attach loc_id to reference and hold reference to it */
- if(H5R__set_loc_id((H5R_ref_priv_t *)ref_ptr, file_id, TRUE) < 0)
+ if(H5R__set_loc_id((H5R_ref_priv_t *)ref_ptr, file_id, TRUE, TRUE) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "unable to attach location id to reference")
done:
if(file_id != H5I_INVALID_HID && H5I_dec_ref(file_id) < 0)
- HDONE_ERROR(H5E_REFERENCE, H5E_CANTDEC, H5I_INVALID_HID, "unable to decrement refcount on file")
+ HDONE_ERROR(H5E_REFERENCE, H5E_CANTDEC, FAIL, "unable to decrement refcount on file")
FUNC_LEAVE_API(ret_value)
} /* end H5Rcreate_attr() */
@@ -334,9 +334,10 @@ done:
/*-------------------------------------------------------------------------
* Function: H5Rdestroy
*
- * Purpose: Destroy reference and free resources allocated during H5Rcreate.
+ * Purpose: Destroy reference and free resources allocated during
+ * H5Rcreate.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success / Negative on failure
*
*-------------------------------------------------------------------------
*/
@@ -367,9 +368,10 @@ done:
/*-------------------------------------------------------------------------
* Function: H5Rget_type
*
- * Purpose: Given a reference to some object, return the type of that reference.
+ * Purpose: Given a reference to some object, return the type of that
+ * reference.
*
- * Return: Reference type/H5R_BADTYPE on failure
+ * Return: Reference type / H5R_BADTYPE on failure
*
*-------------------------------------------------------------------------
*/
@@ -398,9 +400,9 @@ done:
/*-------------------------------------------------------------------------
* Function: H5Requal
*
- * Purpose: Compare two references
+ * Purpose: Compare two references
*
- * Return: TRUE if equal, FALSE if unequal, FAIL if error
+ * Return: TRUE if equal, FALSE if unequal, FAIL if error
*
*-------------------------------------------------------------------------
*/
@@ -428,9 +430,9 @@ done:
/*-------------------------------------------------------------------------
* Function: H5Rcopy
*
- * Purpose: Copy a reference
+ * Purpose: Copy a reference
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success / Negative on failure
*
*-------------------------------------------------------------------------
*/
@@ -458,20 +460,20 @@ done:
/*-------------------------------------------------------------------------
* Function: H5Ropen_object
*
- * Purpose: Given a reference to some object, open that object and return an
- * ID for that object.
+ * Purpose: Given a reference to some object, open that object and
+ * return an ID for that object.
*
- * Return: Valid ID on success/Negative on failure
+ * Return: Valid ID on success / H5I_INVALID_HID on failure
*
*-------------------------------------------------------------------------
*/
hid_t
-H5Ropen_object(const H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t oapl_id)
+H5Ropen_object(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t oapl_id)
{
hid_t loc_id; /* Reference location ID */
- H5VL_object_t *vol_obj = NULL; /* Object token of loc_id */
+ H5VL_object_t *vol_obj = NULL; /* Object of loc_id */
H5VL_loc_params_t loc_params; /* Location parameters */
- H5VL_token_t obj_token = {0}; /* Object token */
+ H5O_token_t obj_token = {0}; /* Object token */
H5I_type_t opened_type; /* Opened object type */
void *opened_obj = NULL; /* Opened object */
hid_t ret_value = H5I_INVALID_HID; /* Return value */
@@ -530,21 +532,21 @@ done:
/*-------------------------------------------------------------------------
* Function: H5Ropen_region
*
- * Purpose: Given a reference to some object, creates a copy of the dataset
- * pointed to's dataspace and defines a selection in the copy which is the
- * region pointed to.
+ * Purpose: Given a reference to some object, creates a copy of the dataset
+ * pointed to's dataspace and defines a selection in the copy
+ * which is the region pointed to.
*
- * Return: Valid ID on success/Negative on failure
+ * Return: Valid ID on success / H5I_INVALID_HID on failure
*
*-------------------------------------------------------------------------
*/
hid_t
-H5Ropen_region(const H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t oapl_id)
+H5Ropen_region(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t oapl_id)
{
hid_t loc_id; /* Reference location ID */
- H5VL_object_t *vol_obj = NULL; /* Object token of loc_id */
+ H5VL_object_t *vol_obj = NULL; /* Object of loc_id */
H5VL_loc_params_t loc_params; /* Location parameters */
- H5VL_token_t obj_token = {0}; /* Object token */
+ H5O_token_t obj_token = {0}; /* Object token */
H5I_type_t opened_type; /* Opened object type */
void *opened_obj = NULL; /* Opened object */
hid_t opened_obj_id = H5I_INVALID_HID; /* Opened object ID */
@@ -616,7 +618,7 @@ done:
HDONE_ERROR(H5E_REFERENCE, H5E_CLOSEERROR, H5I_INVALID_HID, "can't close object")
if(H5I_INVALID_HID == ret_value) /* Cleanup on failure */
if((space_id != H5I_INVALID_HID) && (H5I_dec_ref(space_id) < 0))
- HDONE_ERROR(H5E_REFERENCE, H5E_CLOSEERROR, H5I_INVALID_HID, "can't close dataspace")
+ HDONE_ERROR(H5E_REFERENCE, H5E_CLOSEERROR, H5I_INVALID_HID, "can't close dataspace")
FUNC_LEAVE_API(ret_value)
} /* end H5Ropen_region() */
@@ -625,20 +627,20 @@ done:
/*-------------------------------------------------------------------------
* Function: H5Ropen_attr
*
- * Purpose: Given a reference to some attribute, open that attribute and
- * return an ID for that attribute.
+ * Purpose: Given a reference to some attribute, open that attribute and
+ * return an ID for that attribute.
*
- * Return: Valid ID on success/Negative on failure
+ * Return: Valid ID on success / H5I_INVALID_HID on failure
*
*-------------------------------------------------------------------------
*/
hid_t
-H5Ropen_attr(const H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t aapl_id)
+H5Ropen_attr(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t aapl_id)
{
hid_t loc_id; /* Reference location ID */
- H5VL_object_t *vol_obj = NULL; /* Object token of loc_id */
+ H5VL_object_t *vol_obj = NULL; /* Object of loc_id */
H5VL_loc_params_t loc_params; /* Location parameters */
- H5VL_token_t obj_token = {0}; /* Object token */
+ H5O_token_t obj_token = {0}; /* Object token */
H5I_type_t opened_type; /* Opened object type */
void *opened_obj = NULL; /* Opened object */
hid_t opened_obj_id = H5I_INVALID_HID; /* Opened object ID */
@@ -688,7 +690,7 @@ H5Ropen_attr(const H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t aapl_id)
/* Verify access property list and set up collective metadata if appropriate */
if(H5CX_set_apl(&aapl_id, H5P_CLS_AACC, loc_id, FALSE) < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info")
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info")
/* Set location parameters */
loc_params.type = H5VL_OBJECT_BY_SELF;
@@ -700,18 +702,18 @@ H5Ropen_attr(const H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t aapl_id)
/* Open the attribute */
if(NULL == (opened_attr = H5VL_attr_open(opened_obj, &loc_params, H5R_REF_ATTRNAME((const H5R_ref_priv_t *)ref_ptr), aapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open attribute: '%s'", H5R_REF_ATTRNAME((const H5R_ref_priv_t *)ref_ptr))
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open attribute: '%s'", H5R_REF_ATTRNAME((const H5R_ref_priv_t *)ref_ptr))
/* Register the attribute and get an ID for it */
if((ret_value = H5VL_register(H5I_ATTR, opened_attr, vol_obj->connector, TRUE)) < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to atomize attribute handle")
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to atomize attribute handle")
done:
if((opened_obj_id != H5I_INVALID_HID) && (H5I_dec_ref(opened_obj_id) < 0))
HDONE_ERROR(H5E_REFERENCE, H5E_CLOSEERROR, H5I_INVALID_HID, "can't close object")
if(H5I_INVALID_HID == ret_value) /* Cleanup on failure */
if(opened_attr && H5VL_attr_close(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0)
- HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, H5I_INVALID_HID, "can't close attribute")
+ HDONE_ERROR(H5E_REFERENCE, H5E_CLOSEERROR, H5I_INVALID_HID, "can't close attribute")
FUNC_LEAVE_API(ret_value)
} /* end H5Ropen_attr() */
@@ -720,20 +722,20 @@ done:
/*-------------------------------------------------------------------------
* Function: H5Rget_obj_type3
*
- * Purpose: Given a reference to some object, this function returns the type
- * of object pointed to.
+ * Purpose: Given a reference to some object, this function returns the
+ * type of object pointed to.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: Non-negative on success / Negative on failure
*
*-------------------------------------------------------------------------
*/
herr_t
-H5Rget_obj_type3(const H5R_ref_t *ref_ptr, hid_t rapl_id, H5O_type_t *obj_type)
+H5Rget_obj_type3(H5R_ref_t *ref_ptr, hid_t rapl_id, H5O_type_t *obj_type)
{
hid_t loc_id; /* Reference location ID */
- H5VL_object_t *vol_obj = NULL; /* Object token of loc_id */
+ H5VL_object_t *vol_obj = NULL; /* Object of loc_id */
H5VL_loc_params_t loc_params; /* Location parameters */
- H5VL_token_t obj_token = {0}; /* Object token */
+ H5O_token_t obj_token = {0}; /* Object token */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -746,7 +748,7 @@ H5Rget_obj_type3(const H5R_ref_t *ref_ptr, hid_t rapl_id, H5O_type_t *obj_type)
|| H5R__get_type((const H5R_ref_priv_t *)ref_ptr) >= H5R_MAXTYPE)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference type")
if(rapl_id < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property list")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
/* Retrieve loc_id from reference */
if(H5I_INVALID_HID == (loc_id = H5R__get_loc_id((const H5R_ref_priv_t *)ref_ptr))) {
@@ -770,7 +772,7 @@ H5Rget_obj_type3(const H5R_ref_t *ref_ptr, hid_t rapl_id, H5O_type_t *obj_type)
/* Retrieve object's type */
if(H5VL_object_get(vol_obj, &loc_params, H5VL_OBJECT_GET_TYPE, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, obj_type) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, FAIL, "can't retrieve object type")
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, FAIL, "can't retrieve object type")
done:
FUNC_LEAVE_API(ret_value)
@@ -780,10 +782,10 @@ done:
/*-------------------------------------------------------------------------
* Function: H5Rget_file_name
*
- * Purpose: Given a reference to some object, determine a file name of the
- * object located into.
+ * Purpose: Given a reference to some object, determine a file name of the
+ * object located into.
*
- * Return: Non-negative length of the path on success/Negative on failure
+ * Return: Non-negative length of the path on success / -1 on failure
*
*-------------------------------------------------------------------------
*/
@@ -809,8 +811,9 @@ H5Rget_file_name(const H5R_ref_t *ref_ptr, char *buf, size_t size)
* copy of the filename */
if((ret_value = H5R__get_file_name((const H5R_ref_priv_t *)ref_ptr, buf, size)) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, (-1), "unable to retrieve file name")
- } else {
- H5VL_object_t *vol_obj = NULL; /* Object token of loc_id */
+ }
+ else {
+ H5VL_object_t *vol_obj = NULL; /* Object of loc_id */
/* Retrieve VOL file object */
if(NULL == (vol_obj = H5VL_vol_object(loc_id)))
@@ -828,21 +831,21 @@ done:
/*-------------------------------------------------------------------------
* Function: H5Rget_obj_name
*
- * Purpose: Given a reference to some object, determine a path to the object
- * referenced in the file.
+ * Purpose: Given a reference to some object, determine a path to the
+ * object referenced in the file.
*
- * Return: Non-negative length of the path on success/Negative on failure
+ * Return: Non-negative length of the path on success / -1 on failure
*
*-------------------------------------------------------------------------
*/
ssize_t
-H5Rget_obj_name(const H5R_ref_t *ref_ptr, hid_t rapl_id, char *buf, size_t size)
+H5Rget_obj_name(H5R_ref_t *ref_ptr, hid_t rapl_id, char *buf, size_t size)
{
hid_t loc_id; /* Reference location ID */
- H5VL_object_t *vol_obj = NULL; /* Object token of loc_id */
+ H5VL_object_t *vol_obj = NULL; /* Object of loc_id */
H5VL_loc_params_t loc_params; /* Location parameters */
- H5VL_token_t obj_token = {0}; /* Object token */
- ssize_t ret_value; /* Return value */
+ H5O_token_t obj_token = {0}; /* Object token */
+ ssize_t ret_value = 0; /* Return value */
FUNC_ENTER_API((-1))
H5TRACE4("Zs", "*Rri*sz", ref_ptr, rapl_id, buf, size);
@@ -854,7 +857,7 @@ H5Rget_obj_name(const H5R_ref_t *ref_ptr, hid_t rapl_id, char *buf, size_t size)
|| H5R__get_type((const H5R_ref_priv_t *)ref_ptr) >= H5R_MAXTYPE)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "invalid reference type")
if(rapl_id < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a property list")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, (-1), "not a property list")
/* Retrieve loc_id from reference */
if(H5I_INVALID_HID == (loc_id = H5R__get_loc_id((const H5R_ref_priv_t *)ref_ptr))) {
@@ -864,7 +867,7 @@ H5Rget_obj_name(const H5R_ref_t *ref_ptr, hid_t rapl_id, char *buf, size_t size)
}
/* Get object token */
- if((ret_value = H5R__get_obj_token((const H5R_ref_priv_t *)ref_ptr, &obj_token, NULL)) < 0)
+ if(H5R__get_obj_token((const H5R_ref_priv_t *)ref_ptr, &obj_token, NULL) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, (-1), "unable to get object token")
/* Get the VOL object */
@@ -878,7 +881,7 @@ H5Rget_obj_name(const H5R_ref_t *ref_ptr, hid_t rapl_id, char *buf, size_t size)
/* Retrieve object's name */
if(H5VL_object_get(vol_obj, &loc_params, H5VL_OBJECT_GET_NAME, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, &ret_value, buf, size) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, (-1), "can't retrieve object name")
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTGET, (-1), "can't retrieve object name")
done:
FUNC_LEAVE_API(ret_value)
@@ -888,9 +891,9 @@ done:
/*-------------------------------------------------------------------------
* Function: H5Rget_attr_name
*
- * Purpose: Given a reference to some attribute, determine its name.
+ * Purpose: Given a reference to some attribute, determine its name.
*
- * Return: Non-negative length of the path on success/Negative on failure
+ * Return: Non-negative length of the path on success / -1 on failure
*
*-------------------------------------------------------------------------
*/
@@ -915,3 +918,4 @@ H5Rget_attr_name(const H5R_ref_t *ref_ptr, char *buf, size_t size)
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Rget_attr_name() */
+