summaryrefslogtreecommitdiffstats
path: root/src/H5Gname.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-12-05 20:25:58 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-12-05 20:25:58 (GMT)
commit307749cc71603b67c0b6e6fbafcb09b065026800 (patch)
tree34114998b7c028c9c52a0393e44ef37aecee8792 /src/H5Gname.c
parenta68fd292081be9415d9f9c9de41312a9d60bb5ad (diff)
parent55e87e5b86aacbb37c57614cd2e869541291caad (diff)
downloadhdf5-307749cc71603b67c0b6e6fbafcb09b065026800.zip
hdf5-307749cc71603b67c0b6e6fbafcb09b065026800.tar.gz
hdf5-307749cc71603b67c0b6e6fbafcb09b065026800.tar.bz2
Merging in latest from upstream (HDFFV/hdf5:refs/heads/develop)
* commit '55e87e5b86aacbb37c57614cd2e869541291caad': (51 commits) Correct Windows build. Refactor allocating & releasing pass through wrapper objects. Fix typo Remove duplicated comment. Add a couple of missing prototypes for static routines, along with updating a comment from VOL plugin -> connector. Switch H5VL_class_value_t from unsigned to int, and add "invalid" ID value. Correct "make check-vol" regression test target. Switch H5VL_class_value_t from enum to unsigned integer Add support for "make check-vol", along with a few minor cleanups, etc. Refactor infrastructure for setting FAPL information from environment variables during testing, including connecting native, pass-through, and dynamically loaded VOL connectors. Also bring native and pass-through VOL connectors into alignment, removing the "H5VLnative_private.h" header. Remove example VOL connector, since it's been superceded by the pass-through VOL connector in the src subdirectory. Add pass-through VOL connector Update API tracing info for VOL functions and regenerate trace macros for VOL API calls. Added 'notify' callback for async requests; switched VOL class and info comparison to return comparison value as parameter, so they can return error values; "cancelled" -> "canceled"; switched order of 'wrap_object' and 'free_wrap_ctx' management callbacks. Add using FAPL from h5_fileaccess() to more tests. Remove unused test for unimplemented routine. Switch loc_params to VOL callbacks to pass struct by pointer instead of by value. Add info_to_str and str_to_info "management" callbacks for serializing and deserializing a connector's info object. Revert some of the changes to support the original property list value of metadata read attempts. Add VOL connector info to the flie access property list returned from H5Fget_access_plist(). Also, other misc. cleanups, etc. ...
Diffstat (limited to 'src/H5Gname.c')
-rw-r--r--src/H5Gname.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/src/H5Gname.c b/src/H5Gname.c
index b6b0c20..f6ddeeb 100644
--- a/src/H5Gname.c
+++ b/src/H5Gname.c
@@ -584,21 +584,9 @@ H5G_get_name(const H5G_loc_t *loc, char *name/*out*/, size_t size,
*cached = TRUE;
} /* end if */
else if(!loc->path->obj_hidden) {
- hid_t file;
-
- /* Retrieve file ID for name search */
- if((file = H5F_get_id(loc->oloc->file, FALSE)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get file ID")
-
/* Search for name of object */
- if((len = H5G_get_name_by_addr(file, loc->oloc, name, size)) < 0) {
- H5I_dec_ref(file);
+ if((len = H5G_get_name_by_addr(loc->oloc->file, loc->oloc, name, size)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't determine name")
- } /* end if */
-
- /* Close file ID used for search */
- if(H5I_dec_ref(file) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTCLOSEFILE, FAIL, "can't determine name")
/* Indicate that the name is _not_ cached, if requested */
/* (Currently only used for testing - QAK, 2010/07/26) */
@@ -1282,8 +1270,7 @@ done:
*-------------------------------------------------------------------------
*/
ssize_t
-H5G_get_name_by_addr(hid_t file, const H5O_loc_t *loc,
- char *name, size_t size)
+H5G_get_name_by_addr(H5F_t *f, const H5O_loc_t *loc, char *name, size_t size)
{
H5G_gnba_iter_t udata; /* User data for iteration */
H5G_loc_t root_loc; /* Root group's location */
@@ -1296,8 +1283,8 @@ H5G_get_name_by_addr(hid_t file, const H5O_loc_t *loc,
FUNC_ENTER_NOAPI((-1))
- /* Construct the link info for the file's root group */
- if(H5G_loc(file, &root_loc) < 0)
+ /* Construct a group location for root group of the file */
+ if(H5G_root_loc(f, &root_loc) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, (-1), "can't get root group's location")
/* Check for root group being the object looked for */