From e15bdb05e6bf52525c1df48f8e8e01aba3ce288b Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Wed, 31 Oct 2007 08:13:40 -0500 Subject: [svn-r14225] Description: Change H5Oget_info -> H5Oget_info_by_name and re-add H5Oget_info in a simpler form for querying a particular object, to align with other new API routines. Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Mac OS X/32 10.4.10 (amazon) in debug mode --- c++/src/H5Object.cpp | 2 +- examples/h5_attribute.c | 2 +- fortran/src/H5Af.c | 2 +- hl/src/H5DS.c | 32 +++++++-------- src/H5O.c | 41 ++++++++++++++++++- src/H5Opublic.h | 5 ++- test/dtypes.c | 8 ++-- test/links.c | 78 ++++++++++++++++++------------------ test/mount.c | 64 +++++++++++++++--------------- test/mtime.c | 8 ++-- test/objcopy.c | 16 ++++---- test/stab.c | 4 +- test/tattr.c | 72 ++++++++++++++++----------------- test/th5o.c | 90 +++++++++++++++++++++--------------------- test/titerate.c | 4 +- test/tmisc.c | 72 ++++++++++++++++----------------- test/tsohm.c | 16 ++++---- test/unlink.c | 12 +++--- tools/h5dump/h5dump.c | 14 +++---- tools/h5ls/h5ls.c | 6 +-- tools/h5repack/h5repack_copy.c | 2 +- tools/h5repack/h5repack_refs.c | 4 +- tools/h5stat/h5stat.c | 2 +- tools/lib/h5diff_array.c | 4 +- tools/lib/h5diff_attr.c | 4 +- tools/lib/h5tools_ref.c | 6 +-- tools/lib/h5tools_str.c | 2 +- tools/lib/h5tools_utils.c | 6 +-- tools/lib/h5trav.c | 4 +- 29 files changed, 310 insertions(+), 272 deletions(-) diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp index 28e231b..c027f51 100644 --- a/c++/src/H5Object.cpp +++ b/c++/src/H5Object.cpp @@ -235,7 +235,7 @@ int H5Object::getNumAttrs() const { H5O_info_t oinfo; /* Object info */ - if(H5Oget_info(id, ".", &oinfo, H5P_DEFAULT) < 0) + if(H5Oget_info(id, &oinfo) < 0) throw AttributeIException(inMemFunc("getNumAttrs"), "H5Oget_info failed"); else return( (int)oinfo.num_attrs ); diff --git a/examples/h5_attribute.c b/examples/h5_attribute.c index 27d144a..033aec1 100644 --- a/examples/h5_attribute.c +++ b/examples/h5_attribute.c @@ -192,7 +192,7 @@ main (void) /* * Find string attribute by iterating through all attributes */ - ret = H5Oget_info(dataset, ".", &oinfo, H5P_DEFAULT); + ret = H5Oget_info(dataset, &oinfo); for(i = 0; i < (unsigned)oinfo.num_attrs; i++) { attr = H5Aopen_by_idx(dataset, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)i, H5P_DEFAULT, H5P_DEFAULT); atype = H5Aget_type(attr); diff --git a/fortran/src/H5Af.c b/fortran/src/H5Af.c index 73cb5cf..0be225b 100644 --- a/fortran/src/H5Af.c +++ b/fortran/src/H5Af.c @@ -945,7 +945,7 @@ nh5aget_num_attrs_c (hid_t_f *obj_id, int_f *attr_num) /* * Call H5Oget_info function. */ - if(H5Oget_info((hid_t)*obj_id, ".", &oinfo, H5P_DEFAULT) < 0) + if(H5Oget_info((hid_t)*obj_id, &oinfo) < 0) HGOTO_DONE(FAIL); /* Set number of attributes */ diff --git a/hl/src/H5DS.c b/hl/src/H5DS.c index a29d8ae..08345c6 100644 --- a/hl/src/H5DS.c +++ b/hl/src/H5DS.c @@ -152,11 +152,11 @@ herr_t H5DSattach_scale(hid_t did, return FAIL; /* get info for the dataset in the parameter list */ - if(H5Oget_info(did, ".", &oi1, H5P_DEFAULT) < 0) + if(H5Oget_info(did, &oi1) < 0) return FAIL; /* get info for the scale in the parameter list */ - if(H5Oget_info(dsid, ".", &oi2, H5P_DEFAULT) < 0) + if(H5Oget_info(dsid, &oi2) < 0) return FAIL; /* same object, not valid */ @@ -328,11 +328,11 @@ herr_t H5DSattach_scale(hid_t did, goto out; /* get info for DS in the parameter list */ - if(H5Oget_info(dsid, ".", &oi1, H5P_DEFAULT) < 0) + if(H5Oget_info(dsid, &oi1) < 0) goto out; /* get info for this DS */ - if(H5Oget_info(dsid_j, ".", &oi2, H5P_DEFAULT) < 0) + if(H5Oget_info(dsid_j, &oi2) < 0) goto out; /* same object, so this DS scale is already in this DIM IDX */ @@ -612,11 +612,11 @@ herr_t H5DSdetach_scale(hid_t did, return FAIL; /* get info for the dataset in the parameter list */ - if(H5Oget_info(did, ".", &oi1, H5P_DEFAULT) < 0) + if(H5Oget_info(did, &oi1) < 0) return FAIL; /* get info for the scale in the parameter list */ - if(H5Oget_info(dsid, ".", &oi2, H5P_DEFAULT) < 0) + if(H5Oget_info(dsid, &oi2) < 0) return FAIL; /* same object, not valid */ @@ -706,11 +706,11 @@ herr_t H5DSdetach_scale(hid_t did, goto out; /* get info for DS in the parameter list */ - if(H5Oget_info(dsid, ".", &oi1, H5P_DEFAULT) < 0) + if(H5Oget_info(dsid, &oi1) < 0) goto out; /* get info for this DS */ - if(H5Oget_info(dsid_j, ".", &oi2, H5P_DEFAULT) < 0) + if(H5Oget_info(dsid_j, &oi2) < 0) goto out; /* same object, reset */ @@ -788,11 +788,11 @@ herr_t H5DSdetach_scale(hid_t did, goto out; /* get info for dataset in the parameter list */ - if(H5Oget_info(did, ".", &oi3, H5P_DEFAULT) < 0) + if(H5Oget_info(did, &oi3) < 0) goto out; /* get info for this dataset */ - if(H5Oget_info(did_i, ".", &oi4, H5P_DEFAULT) < 0) + if(H5Oget_info(did_i, &oi4) < 0) goto out; /* same object, reset. we want to detach only for this DIM */ @@ -967,11 +967,11 @@ htri_t H5DSis_attached(hid_t did, return FAIL; /* get info for the dataset in the parameter list */ - if(H5Oget_info(did, ".", &oi1, H5P_DEFAULT) < 0) + if(H5Oget_info(did, &oi1) < 0) return FAIL; /* get info for the scale in the parameter list */ - if(H5Oget_info(dsid, ".", &oi2, H5P_DEFAULT) < 0) + if(H5Oget_info(dsid, &oi2) < 0) return FAIL; /* same object, not valid */ @@ -1049,11 +1049,11 @@ htri_t H5DSis_attached(hid_t did, goto out; /* get info for DS in the parameter list */ - if(H5Oget_info(dsid, ".", &oi1, H5P_DEFAULT) < 0) + if(H5Oget_info(dsid, &oi1) < 0) goto out; /* get info for this DS */ - if(H5Oget_info(dsid_j, ".", &oi2, H5P_DEFAULT) < 0) + if(H5Oget_info(dsid_j, &oi2) < 0) goto out; /* same object */ @@ -1135,11 +1135,11 @@ htri_t H5DSis_attached(hid_t did, goto out; /* get info for dataset in the parameter list */ - if(H5Oget_info(did, ".", &oi3, H5P_DEFAULT) < 0) + if(H5Oget_info(did, &oi3) < 0) goto out; /* get info for this dataset */ - if(H5Oget_info(did_i, ".", &oi4, H5P_DEFAULT) < 0) + if(H5Oget_info(did_i, &oi4) < 0) goto out; /* same object */ diff --git a/src/H5O.c b/src/H5O.c index 2dd7d79..9e1c927 100644 --- a/src/H5O.c +++ b/src/H5O.c @@ -464,12 +464,49 @@ done: *------------------------------------------------------------------------- */ herr_t -H5Oget_info(hid_t loc_id, const char *name, H5O_info_t *oinfo, hid_t lapl_id) +H5Oget_info(hid_t loc_id, H5O_info_t *oinfo) { H5G_loc_t loc; /* Location of group */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(H5Oget_info, FAIL) + H5TRACE2("e", "i*x", loc_id, oinfo); + + /* Check args */ + if(H5G_loc(loc_id, &loc) < 0) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location") + if(!oinfo) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no info struct") + + /* Retrieve the object's information */ + if(H5G_loc_info(&loc, ".", TRUE, oinfo/*out*/, H5P_LINK_ACCESS_DEFAULT, H5AC_ind_dxpl_id) < 0) + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "object not found") + +done: + FUNC_LEAVE_API(ret_value) +} /* end H5Oget_info() */ + + +/*------------------------------------------------------------------------- + * Function: H5Oget_info_by_name + * + * Purpose: Retrieve information about an object. + * + * Return: Success: Non-negative + * Failure: Negative + * + * Programmer: Quincey Koziol + * November 21 2006 + * + *------------------------------------------------------------------------- + */ +herr_t +H5Oget_info_by_name(hid_t loc_id, const char *name, H5O_info_t *oinfo, hid_t lapl_id) +{ + H5G_loc_t loc; /* Location of group */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_API(H5Oget_info_by_name, FAIL) H5TRACE4("e", "i*s*xi", loc_id, name, oinfo, lapl_id); /* Check args */ @@ -491,7 +528,7 @@ H5Oget_info(hid_t loc_id, const char *name, H5O_info_t *oinfo, hid_t lapl_id) done: FUNC_LEAVE_API(ret_value) -} /* end H5Oget_info() */ +} /* end H5Oget_info_by_name() */ /*------------------------------------------------------------------------- diff --git a/src/H5Opublic.h b/src/H5Opublic.h index 41e9f18..d85d164 100644 --- a/src/H5Opublic.h +++ b/src/H5Opublic.h @@ -87,7 +87,7 @@ typedef enum H5O_type_t { H5O_TYPE_NTYPES /* Number of different object types (must be last!) */ } H5O_type_t; -/* Information struct for object (for H5Oget_info/H5Oget_info_by_idx) */ +/* Information struct for object (for H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx) */ typedef struct H5O_info_t { unsigned long fileno; /* File number that object is located in */ haddr_t addr; /* Object address in file */ @@ -141,7 +141,8 @@ H5_DLL hid_t H5Oopen(hid_t loc_id, const char *name, hid_t lapl_id); H5_DLL hid_t H5Oopen_by_addr(hid_t loc_id, haddr_t addr); H5_DLL hid_t H5Oopen_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t lapl_id); -H5_DLL herr_t H5Oget_info(hid_t loc_id, const char *name, H5O_info_t *oinfo, +H5_DLL herr_t H5Oget_info(hid_t loc_id, H5O_info_t *oinfo); +H5_DLL herr_t H5Oget_info_by_name(hid_t loc_id, const char *name, H5O_info_t *oinfo, hid_t lapl_id); H5_DLL herr_t H5Oget_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5O_info_t *oinfo, diff --git a/test/dtypes.c b/test/dtypes.c index 15f2b92..f01c5e3 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -4369,7 +4369,7 @@ test_latest(void) FAIL_STACK_ERROR /* Get information about datatype on disk */ - if(H5Oget_info(file, compnd_type, &oi, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name(file, compnd_type, &oi, H5P_DEFAULT) < 0) FAIL_STACK_ERROR old_dtype_oh_size = oi.hdr.space.total; @@ -4394,7 +4394,7 @@ test_latest(void) FAIL_STACK_ERROR /* Get information about datatype on disk */ - if(H5Oget_info(file, compnd_type, &oi, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name(file, compnd_type, &oi, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Check that the object header info is still the same */ @@ -4430,7 +4430,7 @@ test_latest(void) FAIL_STACK_ERROR /* Get information about datatype on disk */ - if(H5Oget_info(file, compnd_type, &oi, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name(file, compnd_type, &oi, H5P_DEFAULT) < 0) FAIL_STACK_ERROR new_dtype_oh_size = oi.hdr.space.total; @@ -4459,7 +4459,7 @@ test_latest(void) FAIL_STACK_ERROR /* Get information about datatype on disk */ - if(H5Oget_info(file, compnd_type, &oi, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name(file, compnd_type, &oi, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Check that the object header info is still the same */ diff --git a/test/links.c b/test/links.c index 9f648ba..bee4f07 100644 --- a/test/links.c +++ b/test/links.c @@ -298,8 +298,8 @@ cklinks(hid_t fapl, hbool_t new_format) if((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0) FAIL_STACK_ERROR /* Hard link */ - if(H5Oget_info(file, "d1", &oinfo1, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info(file, "grp1/hard", &oinfo2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file, "d1", &oinfo1, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file, "grp1/hard", &oinfo2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(H5O_TYPE_DATASET != oinfo2.type) { H5_FAILED(); printf(" %d: Unexpected object type should have been a dataset\n", __LINE__); @@ -315,7 +315,7 @@ cklinks(hid_t fapl, hbool_t new_format) if(H5Lexists(file, "grp1/hard", H5P_DEFAULT) != TRUE) FAIL_STACK_ERROR /* Symbolic link */ - if(H5Oget_info(file, "grp1/soft", &oinfo2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file, "grp1/soft", &oinfo2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(H5O_TYPE_DATASET != oinfo2.type) { H5_FAILED(); printf(" %d: Unexpected object type should have been a dataset\n", __LINE__); @@ -337,11 +337,11 @@ cklinks(hid_t fapl, hbool_t new_format) /* Dangling link */ H5E_BEGIN_TRY { - status = H5Oget_info(file, "grp1/dangle", &oinfo2, H5P_DEFAULT); + status = H5Oget_info_by_name(file, "grp1/dangle", &oinfo2, H5P_DEFAULT); } H5E_END_TRY; if(status >= 0) { H5_FAILED(); - puts(" H5Oget_info() should have failed for a dangling link."); + puts(" H5Oget_info_by_name() should have failed for a dangling link."); TEST_ERROR } /* end if */ if(H5Lget_info(file, "grp1/dangle", &linfo2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR @@ -364,11 +364,11 @@ cklinks(hid_t fapl, hbool_t new_format) /* Recursive link */ H5E_BEGIN_TRY { - status = H5Oget_info(file, "grp1/recursive", &oinfo2, H5P_DEFAULT); + status = H5Oget_info_by_name(file, "grp1/recursive", &oinfo2, H5P_DEFAULT); } H5E_END_TRY; if(status >= 0) { H5_FAILED(); - puts(" H5Oget_info() should have failed for a recursive link."); + puts(" H5Oget_info_by_name() should have failed for a recursive link."); TEST_ERROR } /* end if */ if(H5Lget_info(file, "grp1/recursive", &linfo2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR @@ -434,11 +434,11 @@ ck_new_links(hid_t fapl, hbool_t new_format) if((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR /* Get hard link info */ - if(H5Oget_info(file, "/grp1/dataset2", &oi_dset, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name(file, "/grp1/dataset2", &oi_dset, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info(file, "/grp1/hard1", &oi_hard1, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name(file, "/grp1/hard1", &oi_hard1, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info(file, "/grp2/hard2", &oi_hard2, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name(file, "/grp2/hard2", &oi_hard2, H5P_DEFAULT) < 0) TEST_ERROR /* Check hard links */ @@ -1343,7 +1343,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format) /* Get the group's link's information */ if(H5Lget_info(file_id, "group", &linfo, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info(file_id, "group", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name(file_id, "group", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR old_cset = linfo.cset; if(old_cset != H5T_CSET_UTF8) TEST_ERROR if(linfo.corder_valid != TRUE) TEST_ERROR @@ -1362,7 +1362,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format) /* Get the link's character set & modification time . They should be unchanged */ if(H5Lget_info(file_id, "group", &linfo, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info(file_id, "group", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name(file_id, "group", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR if(old_modification_time != oinfo.mtime) TEST_ERROR if(old_cset != linfo.cset) TEST_ERROR if(linfo.corder_valid != TRUE) TEST_ERROR @@ -1370,7 +1370,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format) /* Create a new link to the group. It should have a different creation order value but the same modification time */ if(H5Lcreate_hard(file_id, "group", file_id, "group2", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info(file_id, "group2", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name(file_id, "group2", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR if(old_modification_time != oinfo.mtime) TEST_ERROR if(H5Lget_info(file_id, "group2", &linfo, H5P_DEFAULT) < 0) TEST_ERROR if(old_corder == linfo.corder) TEST_ERROR @@ -1383,7 +1383,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format) * should not change. */ if(H5Lcopy(file_id, "group", file_id, "group_copied", lcpl_id, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info(file_id, "group_copied", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name(file_id, "group_copied", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR if(old_modification_time != oinfo.mtime) TEST_ERROR if(H5Lget_info(file_id, "group_copied", &linfo, H5P_DEFAULT) < 0) TEST_ERROR if(linfo.corder_valid != TRUE) TEST_ERROR @@ -1394,7 +1394,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format) /* Move the link with the default property list. */ if(H5Lmove(file_id, "group_copied", file_id, "group_copied2", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info(file_id, "group_copied2", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name(file_id, "group_copied2", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR if(old_modification_time != oinfo.mtime) TEST_ERROR if(H5Lget_info(file_id, "group_copied2", &linfo, H5P_DEFAULT) < 0) TEST_ERROR if(linfo.corder_valid != TRUE) TEST_ERROR @@ -1404,7 +1404,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format) if(linfo.cset == H5T_CSET_UTF8) TEST_ERROR /* Check that the original link is unchanged */ - if(H5Oget_info(file_id, "group", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name(file_id, "group", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR if(old_modification_time != oinfo.mtime) TEST_ERROR if(H5Lget_info(file_id, "group", &linfo, H5P_DEFAULT) < 0) TEST_ERROR if(linfo.corder_valid != TRUE) TEST_ERROR @@ -1415,7 +1415,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format) * Its creation order value will change, but modification time should not * change. */ if(H5Lmove(file_id, "group", file_id, "group_moved", lcpl_id, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info(file_id, "group_moved", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name(file_id, "group_moved", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR if(old_modification_time != oinfo.mtime) TEST_ERROR if(H5Lget_info(file_id, "group_moved", &linfo, H5P_DEFAULT) < 0) TEST_ERROR if(linfo.corder_valid != TRUE) TEST_ERROR @@ -1426,7 +1426,7 @@ test_move_preserves(hid_t fapl_id, hbool_t new_format) /* Move the link again using the default property list. */ if(H5Lmove(file_id, "group_moved", file_id, "group_moved_again", H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info(file_id, "group_moved_again", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name(file_id, "group_moved_again", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR if(old_modification_time != oinfo.mtime) TEST_ERROR if(H5Lget_info(file_id, "group_moved_again", &linfo, H5P_DEFAULT) < 0) TEST_ERROR if(linfo.corder_valid != TRUE) TEST_ERROR @@ -2686,7 +2686,7 @@ external_link_query(hid_t fapl, hbool_t new_format) if(HDstrcmp(object_name, "/dst")) TEST_ERROR /* Query information about object that external link points to */ - if(H5Oget_info(fid, "src", &oi, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(fid, "src", &oi, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(H5O_TYPE_GROUP != oi.type) { H5_FAILED(); puts(" Unexpected object type - should have been a group"); @@ -3420,8 +3420,8 @@ external_link_closing(hid_t fapl, hbool_t new_format) /* Test that getting info works */ if(H5Lget_info(fid1, "elink/elink/elink/type1", &li, H5P_DEFAULT) < 0) TEST_ERROR if(H5Lget_info(fid1, "elink/elink/elink", &li, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info(fid1, "elink/elink/elink/type1", &oi, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info(fid1, "elink/elink/elink", &oi, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name(fid1, "elink/elink/elink/type1", &oi, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name(fid1, "elink/elink/elink", &oi, H5P_DEFAULT) < 0) TEST_ERROR /* Test move */ if(H5Lmove(fid1, "elink/elink/elink/group1", fid1, @@ -3508,7 +3508,7 @@ external_link_closing(hid_t fapl, hbool_t new_format) if(H5Gclose(gid) < 0) TEST_ERROR if((gid = H5Gcreate2(fid1, "elink/elink2/group2/group3/group4", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR if(H5Gclose(gid) < 0) TEST_ERROR - if(H5Oget_info(fid1, "elink/elink2/group2/group3/group4", &oi, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name(fid1, "elink/elink2/group2/group3/group4", &oi, H5P_DEFAULT) < 0) TEST_ERROR /* Add a few regular groups and a soft link in file2 using intermediate group creation */ if((lcpl_id = H5Pcreate(H5P_LINK_CREATE)) < 0) TEST_ERROR @@ -6407,7 +6407,7 @@ link_info_by_idx_old(hid_t fapl) if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* Retrieve group's address on disk */ - if(H5Oget_info(group_id2, ".", &oi, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info(group_id2, &oi) < 0) TEST_ERROR objno[u] = oi.addr; /* Close group */ @@ -6900,7 +6900,7 @@ delete_by_idx_old(hid_t fapl) if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* Retrieve group's address on disk */ - if(H5Oget_info(group_id2, ".", &oi, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info(group_id2, &oi) < 0) TEST_ERROR objno[u] = oi.addr; /* Close group */ @@ -6973,7 +6973,7 @@ delete_by_idx_old(hid_t fapl) if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* Retrieve group's address on disk */ - if(H5Oget_info(group_id2, ".", &oi, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info(group_id2, &oi) < 0) TEST_ERROR objno[u] = oi.addr; /* Close group */ @@ -7973,7 +7973,7 @@ open_by_idx_check(hid_t main_group_id, hid_t soft_group_id, hid_t mount_file_id, if((obj_id = H5Oopen_by_idx(group_id, ".", idx_type, order, (hsize_t)u, H5P_DEFAULT)) < 0) TEST_ERROR /* Get the object's information */ - if(H5Oget_info(obj_id, ".", &oi, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info(obj_id, &oi) < 0) TEST_ERROR /* Check that the object is the correct one */ if(order == H5_ITER_INC) { @@ -7999,7 +7999,7 @@ open_by_idx_check(hid_t main_group_id, hid_t soft_group_id, hid_t mount_file_id, */ /* Get the address of the root group in the file to mount */ - if(H5Oget_info(mount_file_id, "/", &oi, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info(mount_file_id, &oi) < 0) TEST_ERROR mnt_root_addr = oi.addr; /* Mount a file over a group in main group */ @@ -8011,7 +8011,7 @@ open_by_idx_check(hid_t main_group_id, hid_t soft_group_id, hid_t mount_file_id, if((obj_id = H5Oopen_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)mnt_idx, H5P_DEFAULT)) < 0) TEST_ERROR /* Get the object's information */ - if(H5Oget_info(obj_id, ".", &oi, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info(obj_id, &oi) < 0) TEST_ERROR /* Check that the object is the root of the mounted file and not in the previous file */ if(H5F_addr_ne(oi.addr, mnt_root_addr)) TEST_ERROR @@ -8162,7 +8162,7 @@ open_by_idx(hid_t fapl) if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* Retrieve group's address on disk */ - if(H5Oget_info(group_id2, ".", &oi, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info(group_id2, &oi) < 0) TEST_ERROR objno[u] = oi.addr; /* Close group created */ @@ -8197,7 +8197,7 @@ open_by_idx(hid_t fapl) if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* Retrieve group's address on disk */ - if(H5Oget_info(group_id2, ".", &oi, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info(group_id2, &oi) < 0) TEST_ERROR objno[u] = oi.addr; /* Close group created */ @@ -8339,7 +8339,7 @@ open_by_idx_old(hid_t fapl) if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* Retrieve group's address on disk */ - if(H5Oget_info(group_id2, ".", &oi, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info(group_id2, &oi) < 0) TEST_ERROR objno[u] = oi.addr; /* Close group created */ @@ -8438,7 +8438,7 @@ object_info_check(hid_t main_group_id, hid_t soft_group_id, H5_index_t idx_type, sprintf(objname, "filler %02u", u); /* Query the object's information, by name */ - if(H5Oget_info(group_id, objname, &oinfo, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name(group_id, objname, &oinfo, H5P_DEFAULT) < 0) TEST_ERROR /* Check that the object is the correct one */ if(H5F_addr_ne(oinfo.addr, objno[u])) TEST_ERROR @@ -8603,7 +8603,7 @@ object_info(hid_t fapl) if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* Retrieve group's address on disk */ - if(H5Oget_info(group_id2, ".", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info(group_id2, &oinfo) < 0) TEST_ERROR objno[u] = oinfo.addr; /* Create attributes on new object */ @@ -8651,7 +8651,7 @@ object_info(hid_t fapl) if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* Retrieve group's address on disk */ - if(H5Oget_info(group_id2, ".", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info(group_id2, &oinfo) < 0) TEST_ERROR objno[u] = oinfo.addr; /* Create attributes on new object */ @@ -8800,7 +8800,7 @@ object_info_old(hid_t fapl) if((group_id2 = H5Gcreate2(group_id, objname, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR /* Retrieve group's address on disk */ - if(H5Oget_info(group_id2, ".", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info(group_id2, &oinfo) < 0) TEST_ERROR objno[u] = oinfo.addr; /* Create attributes on new object */ @@ -9594,8 +9594,8 @@ timestamps(hid_t fapl) if(track_times != TRUE) TEST_ERROR /* Query the object information for each group */ - if(H5Oget_info(group_id, ".", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info(group_id2, ".", &oinfo2, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info(group_id, &oinfo) < 0) TEST_ERROR + if(H5Oget_info(group_id2, &oinfo2) < 0) TEST_ERROR /* Sanity check object information for each group */ if(oinfo.atime != 0) TEST_ERROR @@ -9641,8 +9641,8 @@ timestamps(hid_t fapl) if(track_times != TRUE) TEST_ERROR /* Query the object information for each group */ - if(H5Oget_info(group_id, ".", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info(group_id2, ".", &oinfo2, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info(group_id, &oinfo) < 0) TEST_ERROR + if(H5Oget_info(group_id2, &oinfo2) < 0) TEST_ERROR /* Sanity check object information for each group */ if(oinfo.atime != 0) TEST_ERROR diff --git a/test/mount.c b/test/mount.c index e5e0d0a..2ce9a2a 100644 --- a/test/mount.c +++ b/test/mount.c @@ -266,7 +266,7 @@ test_hide(hid_t fapl) FAIL_STACK_ERROR /* Get information about file1:/mnt1/file1 for later */ - if(H5Oget_info(file1, "/mnt1/file1", &oi1, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file1, "/mnt1/file1", &oi1, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Build the virtual file */ if(H5Fmount(file1, "/mnt1", file2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR @@ -285,7 +285,7 @@ test_hide(hid_t fapl) * The original objects under file1:/mnt1 are still accessible by their * other names. This is a rather stupid test but demonstrates a point. */ - if(H5Oget_info(file1, "/file1", &oi2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file1, "/file1", &oi2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(oi1.fileno != oi2.fileno || H5F_addr_ne(oi1.addr, oi2.addr)) { H5_FAILED(); puts(" Hard link failed for hidden object."); @@ -344,7 +344,7 @@ test_assoc(hid_t fapl) FAIL_STACK_ERROR /* Get information about the root of file2 */ - if(H5Oget_info(file2, "/", &oi1, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info(file2, &oi1) < 0) FAIL_STACK_ERROR /* Create the virtual file */ if(H5Fmount(file1, "/mnt1", file2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR @@ -353,7 +353,7 @@ test_assoc(hid_t fapl) * Get info about the mount point -- should be the same as the root group * of file2. */ - if(H5Oget_info(file1, "/mnt1", &oi2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file1, "/mnt1", &oi2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(oi1.fileno != oi2.fileno || H5F_addr_ne(oi1.addr, oi2.addr)) { H5_FAILED(); puts(" Association failed."); @@ -541,7 +541,7 @@ test_preopen(hid_t fapl) if(H5Fmount(file1, "/mnt1", file2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Now access the thing we previously opened */ - if(H5Oget_info(grp, ".", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info(grp, &oinfo) < 0) FAIL_STACK_ERROR /* Shut down */ if(H5Funmount(file1, "/mnt1") < 0) FAIL_STACK_ERROR @@ -605,10 +605,10 @@ test_postopen(hid_t fapl) if(H5Funmount(file1, "/mnt1") < 0) FAIL_STACK_ERROR /* Now access the thing we previously opened */ - if(H5Oget_info(grp, ".", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info(grp, &oinfo) < 0) FAIL_STACK_ERROR /* Try accessing it from the file */ - if(H5Oget_info(file2, "/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file2, "/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Shut down */ if(H5Gclose(grp) < 0) FAIL_STACK_ERROR @@ -678,12 +678,12 @@ test_unlink(hid_t fapl) * before the H5Fmount() and thus refers to the mount point itself rather * than the group mounted there. */ - if(H5Oget_info(file1, "/mnt_unlink/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info(mnt, "/mnt_unlink/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info(root, "/mnt_unlink/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info(root, "file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file1, "/mnt_unlink/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(mnt, "/mnt_unlink/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(root, "/mnt_unlink/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(root, "file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR H5E_BEGIN_TRY { - status = H5Oget_info(mnt, "file2", &oinfo, H5P_DEFAULT); + status = H5Oget_info_by_name(mnt, "file2", &oinfo, H5P_DEFAULT); } H5E_END_TRY; if(status >= 0) { H5_FAILED(); @@ -698,9 +698,9 @@ test_unlink(hid_t fapl) * We should still be able to get to "/file2" of file2 by starting at * `root' which is still open, but not by name. */ - if(H5Oget_info(root, "file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(root, "file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR H5E_BEGIN_TRY { - status = H5Oget_info(mnt, "file2", &oinfo, H5P_DEFAULT); + status = H5Oget_info_by_name(mnt, "file2", &oinfo, H5P_DEFAULT); } H5E_END_TRY; if(status >= 0) { H5_FAILED(); @@ -708,7 +708,7 @@ test_unlink(hid_t fapl) TEST_ERROR } /* end if */ H5E_BEGIN_TRY { - status = H5Oget_info(file2, "/mnt_unlink/file2", &oinfo, H5P_DEFAULT); + status = H5Oget_info_by_name(file2, "/mnt_unlink/file2", &oinfo, H5P_DEFAULT); } H5E_END_TRY; if(status >= 0) { H5_FAILED(); @@ -796,7 +796,7 @@ test_mvmpt(hid_t fapl) if(H5Lmove(file1, "/mnt_move_a", H5L_SAME_LOC, "/mnt_move_b", H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Access something under the new name */ - if(H5Oget_info(file1, "/mnt_move_b/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file1, "/mnt_move_b/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Shut down */ if(H5Funmount(file1, "/mnt_move_b") < 0) FAIL_STACK_ERROR @@ -939,18 +939,18 @@ test_uniformity(hid_t fapl) if(H5Fmount(file1, "/mnt1", file2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Access some things from the file1 handle */ - if(H5Oget_info(file1, "/", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info(file1, "/mnt1", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info(file1, "mnt1", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info(file1, "/mnt1/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info(file1, "mnt1/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file1, "/", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file1, "/mnt1", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file1, "mnt1", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file1, "/mnt1/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file1, "mnt1/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Access the same things from the file2 handle */ - if(H5Oget_info(file2, "/", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info(file2, "/mnt1", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info(file2, "mnt1", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info(file2, "/mnt1/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info(file2, "mnt1/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file2, "/", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file2, "/mnt1", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file2, "mnt1", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file2, "/mnt1/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file2, "mnt1/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Shut down */ if(H5Funmount(file1, "/mnt1") < 0) FAIL_STACK_ERROR @@ -1007,7 +1007,7 @@ test_close(hid_t fapl) * still accessible through the file2 handle. */ if(H5Fclose(file1) < 0) FAIL_STACK_ERROR - if(H5Oget_info(file2, "/mnt1", &oinfo, H5P_DEFAULT) < 0) { + if(H5Oget_info_by_name(file2, "/mnt1", &oinfo, H5P_DEFAULT) < 0) { H5_FAILED(); puts(" File1 contents are not accessible!"); TEST_ERROR @@ -1028,7 +1028,7 @@ test_close(hid_t fapl) * Close file2. It is not actually closed because it's a child of file1. */ if(H5Fclose(file2) < 0) FAIL_STACK_ERROR - if(H5Oget_info(file1, "/mnt1/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file1, "/mnt1/file2", &oinfo, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(H5Fclose(file1) < 0) FAIL_STACK_ERROR /* Check that all file IDs have been closed */ @@ -2330,9 +2330,9 @@ test_fcdegree_strong(hid_t fapl) TEST_ERROR /* Check that objects are still open */ - if(H5Oget_info(gidA, ".", &oinfo, H5P_DEFAULT) < 0) + if(H5Oget_info(gidA, &oinfo) < 0) TEST_ERROR - if(H5Oget_info(gidAM, ".", &oinfo, H5P_DEFAULT) < 0) + if(H5Oget_info(gidAM, &oinfo) < 0) TEST_ERROR /* Close file #2 (should close open objects also) */ @@ -2341,12 +2341,12 @@ test_fcdegree_strong(hid_t fapl) /* Check that objects are closed */ H5E_BEGIN_TRY { - ret = H5Oget_info(gidA, ".", &oinfo, H5P_DEFAULT); + ret = H5Oget_info(gidA, &oinfo); } H5E_END_TRY; if(ret >= 0) TEST_ERROR H5E_BEGIN_TRY { - ret = H5Oget_info(gidAM, ".", &oinfo, H5P_DEFAULT); + ret = H5Oget_info(gidAM, &oinfo); } H5E_END_TRY; if(ret >= 0) TEST_ERROR diff --git a/test/mtime.c b/test/mtime.c index 1969af2..395b065 100644 --- a/test/mtime.c +++ b/test/mtime.c @@ -91,9 +91,9 @@ main(void) */ h5_fixname(FILENAME[0], fapl, filename, sizeof filename); if((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0) TEST_ERROR; - if(H5Oget_info(file, "dset", &oi1, H5P_DEFAULT) < 0) TEST_ERROR; + if(H5Oget_info_by_name(file, "dset", &oi1, H5P_DEFAULT) < 0) TEST_ERROR; if((dset = H5Dopen2(file, "dset", H5P_DEFAULT)) < 0) TEST_ERROR; - if(H5Oget_info(dset, ".", &oi2, H5P_DEFAULT) < 0) TEST_ERROR; + if(H5Oget_info(dset, &oi2) < 0) TEST_ERROR; if(H5Dclose(dset) < 0) TEST_ERROR; if(H5Fclose(file) < 0) TEST_ERROR; @@ -141,7 +141,7 @@ main(void) HDstrcat(testfile, TESTFILE1); file = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT); if(file >= 0){ - if(H5Oget_info(file, "/Dataset1", &oi1, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name(file, "/Dataset1", &oi1, H5P_DEFAULT) < 0) TEST_ERROR; if(oi1.mtime != MTIME1) { H5_FAILED(); @@ -177,7 +177,7 @@ main(void) HDstrcat(testfile, TESTFILE2); file = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT); if(file >= 0){ - if(H5Oget_info(file, "/Dataset1", &oi2, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name(file, "/Dataset1", &oi2, H5P_DEFAULT) < 0) TEST_ERROR; if(oi2.mtime != MTIME2) { H5_FAILED(); diff --git a/test/objcopy.c b/test/objcopy.c index cde4e2c..69a6769 100755 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -771,10 +771,10 @@ compare_std_attributes(hid_t oid, hid_t oid2, hid_t pid) cpy_flags = 0; /* Check the number of attributes on source dataset */ - if(H5Oget_info(oid, ".", &oinfo1, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info(oid, &oinfo1) < 0) TEST_ERROR /* Check the number of attributes on destination dataset */ - if(H5Oget_info(oid2, ".", &oinfo2, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info(oid2, &oinfo2) < 0) TEST_ERROR if(cpy_flags & H5O_COPY_WITHOUT_ATTR_FLAG) { /* Check that the destination has no attributes */ @@ -891,8 +891,8 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts, if(obj_owner > 0) { H5O_info_t oinfo1, oinfo2; - if(H5Oget_info(obj_owner, ".", &oinfo1, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info(obj1_id, ".", &oinfo2, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info(obj_owner, &oinfo1) < 0) TEST_ERROR + if(H5Oget_info(obj1_id, &oinfo2) < 0) TEST_ERROR if(H5F_addr_eq(oinfo1.addr, oinfo2.addr)) { if(H5Oclose(obj1_id) < 0) TEST_ERROR if(H5Oclose(obj2_id) < 0) TEST_ERROR @@ -948,8 +948,8 @@ compare_data(hid_t parent1, hid_t parent2, hid_t pid, hid_t tid, size_t nelmts, if(obj_owner > 0) { H5O_info_t oinfo1, oinfo2; - if(H5Oget_info(obj_owner, ".", &oinfo1, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info(obj1_id, ".", &oinfo2, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info(obj_owner, &oinfo1) < 0) TEST_ERROR + if(H5Oget_info(obj1_id, &oinfo2) < 0) TEST_ERROR if(H5F_addr_eq(oinfo1.addr, oinfo2.addr)) { if(H5Oclose(obj1_id) < 0) TEST_ERROR if(H5Oclose(obj2_id) < 0) TEST_ERROR @@ -1281,8 +1281,8 @@ compare_groups(hid_t gid, hid_t gid2, hid_t pid, int depth, unsigned copy_flags) H5O_info_t oinfo, oinfo2; /* Object info */ /* Compare some pieces of the object info */ - if(H5Oget_info(gid, objname, &oinfo, H5P_DEFAULT) < 0) TEST_ERROR - if(H5Oget_info(gid2, objname2, &oinfo2, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name(gid, objname, &oinfo, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info_by_name(gid2, objname2, &oinfo2, H5P_DEFAULT) < 0) TEST_ERROR if(oinfo.type != oinfo2.type) TEST_ERROR if(oinfo.rc != oinfo2.rc) TEST_ERROR diff --git a/test/stab.c b/test/stab.c index 368e00e..6f5a18b 100644 --- a/test/stab.c +++ b/test/stab.c @@ -416,7 +416,7 @@ lifecycle(hid_t fapl2) if(H5G_is_new_dense_test(gid) != FALSE) TEST_ERROR /* Check that the object header is only one chunk and the space has been allocated correctly */ - if(H5Oget_info(gid, ".", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info(gid, &oinfo) < 0) TEST_ERROR if(oinfo.hdr.space.total != 151) TEST_ERROR if(oinfo.hdr.space.free != 0) TEST_ERROR if(oinfo.hdr.nmesgs != 6) TEST_ERROR @@ -438,7 +438,7 @@ lifecycle(hid_t fapl2) if(H5G_is_new_dense_test(gid) != TRUE) TEST_ERROR /* Check that the object header is still one chunk and the space has been allocated correctly */ - if(H5Oget_info(gid, ".", &oinfo, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Oget_info(gid, &oinfo) < 0) TEST_ERROR if(oinfo.hdr.space.total != 151) TEST_ERROR if(oinfo.hdr.space.free != 92) TEST_ERROR if(oinfo.hdr.nmesgs != 3) TEST_ERROR diff --git a/test/tattr.c b/test/tattr.c index c01c9ce..6d9e83d 100644 --- a/test/tattr.c +++ b/test/tattr.c @@ -410,7 +410,7 @@ test_attr_basic_read(hid_t fapl) CHECK(dataset, FAIL, "H5Dopen2"); /* Verify the correct number of attributes */ - ret = H5Oget_info(dataset, ".", &oinfo, H5P_DEFAULT); + ret = H5Oget_info(dataset, &oinfo); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, 2, "H5Oget_info"); @@ -439,7 +439,7 @@ test_attr_basic_read(hid_t fapl) CHECK(group, FAIL, "H5Gopen2"); /* Verify the correct number of attributes */ - ret = H5Oget_info(group, ".", &oinfo, H5P_DEFAULT); + ret = H5Oget_info(group, &oinfo); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, 1, "H5Oget_info"); @@ -780,7 +780,7 @@ test_attr_compound_read(hid_t fapl) CHECK(dataset, FAIL, "H5Dopen2"); /* Verify the correct number of attributes */ - ret = H5Oget_info(dataset, ".", &oinfo, H5P_DEFAULT); + ret = H5Oget_info(dataset, &oinfo); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, 1, "H5Oget_info"); @@ -983,7 +983,7 @@ test_attr_scalar_read(hid_t fapl) CHECK(dataset, FAIL, "H5Dopen2"); /* Verify the correct number of attributes */ - ret = H5Oget_info(dataset, ".", &oinfo, H5P_DEFAULT); + ret = H5Oget_info(dataset, &oinfo); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, 1, "H5Oget_info"); @@ -1185,7 +1185,7 @@ test_attr_mult_read(hid_t fapl) CHECK(dataset, FAIL, "H5Dopen2"); /* Verify the correct number of attributes */ - ret = H5Oget_info(dataset, ".", &oinfo, H5P_DEFAULT); + ret = H5Oget_info(dataset, &oinfo); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, 3, "H5Oget_info"); @@ -1442,7 +1442,7 @@ test_attr_iterate(hid_t fapl) CHECK(ret, FAIL, "H5Sclose"); /* Verify the correct number of attributes */ - ret = H5Oget_info(dataset, ".", &oinfo, H5P_DEFAULT); + ret = H5Oget_info(dataset, &oinfo); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, 0, "H5Oget_info"); @@ -1460,7 +1460,7 @@ test_attr_iterate(hid_t fapl) CHECK(dataset, FAIL, "H5Dopen2"); /* Verify the correct number of attributes */ - ret = H5Oget_info(dataset, ".", &oinfo, H5P_DEFAULT); + ret = H5Oget_info(dataset, &oinfo); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, 3, "H5Oget_info"); @@ -1507,7 +1507,7 @@ test_attr_delete(hid_t fapl) CHECK(dataset, FAIL, "H5Dopen2"); /* Verify the correct number of attributes */ - ret = H5Oget_info(dataset, ".", &oinfo, H5P_DEFAULT); + ret = H5Oget_info(dataset, &oinfo); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, 3, "H5Oget_info"); @@ -1516,7 +1516,7 @@ test_attr_delete(hid_t fapl) VERIFY(ret, FAIL, "H5Adelete"); /* Verify the correct number of attributes */ - ret = H5Oget_info(dataset, ".", &oinfo, H5P_DEFAULT); + ret = H5Oget_info(dataset, &oinfo); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, 3, "H5Oget_info"); @@ -1525,7 +1525,7 @@ test_attr_delete(hid_t fapl) CHECK(ret, FAIL, "H5Adelete"); /* Verify the correct number of attributes */ - ret = H5Oget_info(dataset, ".", &oinfo, H5P_DEFAULT); + ret = H5Oget_info(dataset, &oinfo); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, 2, "H5Oget_info"); @@ -1562,7 +1562,7 @@ test_attr_delete(hid_t fapl) CHECK(ret, FAIL, "H5Adelete"); /* Verify the correct number of attributes */ - ret = H5Oget_info(dataset, ".", &oinfo, H5P_DEFAULT); + ret = H5Oget_info(dataset, &oinfo); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, 1, "H5Oget_info"); @@ -1585,7 +1585,7 @@ test_attr_delete(hid_t fapl) CHECK(ret, FAIL, "H5Adelete"); /* Verify the correct number of attributes */ - ret = H5Oget_info(dataset, ".", &oinfo, H5P_DEFAULT); + ret = H5Oget_info(dataset, &oinfo); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, 0, "H5Oget_info"); @@ -1650,9 +1650,9 @@ test_attr_dtype_shared(hid_t fapl) CHECK(ret, FAIL, "H5Tcommit2"); /* Check reference count on named datatype */ - ret = H5Oget_info(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info"); - VERIFY(oinfo.rc, 1, "H5Oget_info"); + ret = H5Oget_info_by_name(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name"); + VERIFY(oinfo.rc, 1, "H5Oget_info_by_name"); /* Create dataspace for dataset */ space_id = H5Screate(H5S_SCALAR); @@ -1663,18 +1663,18 @@ test_attr_dtype_shared(hid_t fapl) CHECK(dset_id, FAIL, "H5Dcreate2"); /* Check reference count on named datatype */ - ret = H5Oget_info(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info"); - VERIFY(oinfo.rc, 2, "H5Oget_info"); + ret = H5Oget_info_by_name(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name"); + VERIFY(oinfo.rc, 2, "H5Oget_info_by_name"); /* Create attribute on dataset */ attr_id = H5Acreate2(dset_id, ATTR1_NAME, type_id, space_id, H5P_DEFAULT, H5P_DEFAULT); CHECK(attr_id, FAIL, "H5Acreate2"); /* Check reference count on named datatype */ - ret = H5Oget_info(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info"); - VERIFY(oinfo.rc, 3, "H5Oget_info"); + ret = H5Oget_info_by_name(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name"); + VERIFY(oinfo.rc, 3, "H5Oget_info_by_name"); /* Close attribute */ ret = H5Aclose(attr_id); @@ -1685,18 +1685,18 @@ test_attr_dtype_shared(hid_t fapl) CHECK(ret, FAIL, "H5Adelete"); /* Check reference count on named datatype */ - ret = H5Oget_info(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info"); - VERIFY(oinfo.rc, 2, "H5Adelete"); + ret = H5Oget_info_by_name(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name"); + VERIFY(oinfo.rc, 2, "H5Oget_info_by_name"); /* Create attribute on dataset */ attr_id = H5Acreate2(dset_id, ATTR1_NAME, type_id, space_id, H5P_DEFAULT, H5P_DEFAULT); CHECK(attr_id, FAIL, "H5Acreate2"); /* Check reference count on named datatype */ - ret = H5Oget_info(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info"); - VERIFY(oinfo.rc, 3, "H5Oget_info"); + ret = H5Oget_info_by_name(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name"); + VERIFY(oinfo.rc, 3, "H5Oget_info_by_name"); /* Write data into the attribute */ ret = H5Awrite(attr_id, H5T_NATIVE_INT, &data); @@ -1749,18 +1749,18 @@ test_attr_dtype_shared(hid_t fapl) CHECK(ret, FAIL, "H5Dclose"); /* Check reference count on named datatype */ - ret = H5Oget_info(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info"); - VERIFY(oinfo.rc, 3, "H5Oget_info"); + ret = H5Oget_info_by_name(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name"); + VERIFY(oinfo.rc, 3, "H5Oget_info_by_name"); /* Unlink the dataset */ ret = H5Ldelete(file_id, DSET1_NAME, H5P_DEFAULT); CHECK(ret, FAIL, "H5Ldelete"); /* Check reference count on named datatype */ - ret = H5Oget_info(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info"); - VERIFY(oinfo.rc, 1, "H5Ldelete"); + ret = H5Oget_info_by_name(file_id, TYPE1_NAME, &oinfo, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name"); + VERIFY(oinfo.rc, 1, "H5Oget_info_by_name"); /* Unlink the named datatype */ ret = H5Ldelete(file_id, TYPE1_NAME, H5P_DEFAULT); @@ -2204,7 +2204,7 @@ test_attr_dense_delete(hid_t fcpl, hid_t fapl) CHECK(ret, FAIL, "H5Aclose"); /* Check # of attributes */ - ret = H5Oget_info(dataset, ".", &oinfo, H5P_DEFAULT); + ret = H5Oget_info(dataset, &oinfo); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, (u + 1), "H5Oget_info"); } /* end for */ @@ -2386,7 +2386,7 @@ test_attr_dense_rename(hid_t fcpl, hid_t fapl) CHECK(ret, FAIL, "H5Arename_by_name"); /* Check # of attributes */ - ret = H5Oget_info(dataset, ".", &oinfo, H5P_DEFAULT); + ret = H5Oget_info(dataset, &oinfo); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, (u + 1), "H5Oget_info"); } /* end for */ @@ -2538,7 +2538,7 @@ test_attr_dense_unlink(hid_t fcpl, hid_t fapl) CHECK(ret, FAIL, "H5Aclose"); /* Check # of attributes */ - ret = H5Oget_info(dataset, ".", &oinfo, H5P_DEFAULT); + ret = H5Oget_info(dataset, &oinfo); CHECK(ret, FAIL, "H5Oget_info"); VERIFY(oinfo.num_attrs, (u + 1), "H5Oget_info"); } /* end for */ diff --git a/test/th5o.c b/test/th5o.c index 6af08e4..cd1fc77 100644 --- a/test/th5o.c +++ b/test/th5o.c @@ -410,15 +410,15 @@ test_h5o_refcount(void) CHECK(ret, FAIL, "H5Sclose"); /* Get ref counts for each object. They should all be 1, since each object has a hard link. */ - ret = H5Oget_info(fid, "group", &oinfo, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info"); - VERIFY(oinfo.rc, 1, "reference count in H5Oget_info"); - ret = H5Oget_info(fid, "datatype", &oinfo, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info"); - VERIFY(oinfo.rc, 1, "reference count in H5Oget_info"); - ret = H5Oget_info(fid, "dataset", &oinfo, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info"); - VERIFY(oinfo.rc, 1, "reference count in H5Oget_info"); + ret = H5Oget_info_by_name(fid, "group", &oinfo, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name"); + VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name"); + ret = H5Oget_info_by_name(fid, "datatype", &oinfo, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name"); + VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name"); + ret = H5Oget_info_by_name(fid, "dataset", &oinfo, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name"); + VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name"); /* Increment each object's reference count. */ ret = H5Oincr_refcount(grp); @@ -429,15 +429,15 @@ test_h5o_refcount(void) CHECK(ret, FAIL, "H5Oincr_refcount"); /* Get ref counts for each object. They should all be 2 now. */ - ret = H5Oget_info(fid, "group", &oinfo, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info"); - VERIFY(oinfo.rc, 2, "reference count in H5Oget_info"); - ret = H5Oget_info(fid, "datatype", &oinfo, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info"); - VERIFY(oinfo.rc, 2, "reference count in H5Oget_info"); - ret = H5Oget_info(fid, "dataset", &oinfo, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info"); - VERIFY(oinfo.rc, 2, "reference count in H5Oget_info"); + ret = H5Oget_info_by_name(fid, "group", &oinfo, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name"); + VERIFY(oinfo.rc, 2, "reference count in H5Oget_info_by_name"); + ret = H5Oget_info_by_name(fid, "datatype", &oinfo, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name"); + VERIFY(oinfo.rc, 2, "reference count in H5Oget_info_by_name"); + ret = H5Oget_info_by_name(fid, "dataset", &oinfo, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name"); + VERIFY(oinfo.rc, 2, "reference count in H5Oget_info_by_name"); /* Decrement the reference counts and check that they decrease back to 1. */ ret = H5Odecr_refcount(grp); @@ -447,15 +447,15 @@ test_h5o_refcount(void) ret = H5Odecr_refcount(dset); CHECK(ret, FAIL, "H5Odecr_refcount"); - ret = H5Oget_info(fid, "group", &oinfo, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info"); - VERIFY(oinfo.rc, 1, "reference count in H5Oget_info"); - ret = H5Oget_info(fid, "datatype", &oinfo, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info"); - VERIFY(oinfo.rc, 1, "reference count in H5Oget_info"); - ret = H5Oget_info(fid, "dataset", &oinfo, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info"); - VERIFY(oinfo.rc, 1, "reference count in H5Oget_info"); + ret = H5Oget_info_by_name(fid, "group", &oinfo, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name"); + VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name"); + ret = H5Oget_info_by_name(fid, "datatype", &oinfo, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name"); + VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name"); + ret = H5Oget_info_by_name(fid, "dataset", &oinfo, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name"); + VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name"); /* Increment the reference counts and then close the file to make sure the increment is permanant */ ret = H5Oincr_refcount(grp); @@ -485,15 +485,15 @@ test_h5o_refcount(void) dset = H5Dopen2(fid, "dataset", H5P_DEFAULT); CHECK(dset, FAIL, "H5Dopen2"); - ret = H5Oget_info(fid, "group", &oinfo, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info"); - VERIFY(oinfo.rc, 2, "reference count in H5Oget_info"); - ret = H5Oget_info(fid, "datatype", &oinfo, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info"); - VERIFY(oinfo.rc, 2, "reference count in H5Oget_info"); - ret = H5Oget_info(fid, "dataset", &oinfo, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info"); - VERIFY(oinfo.rc, 2, "reference count in H5Oget_info"); + ret = H5Oget_info_by_name(fid, "group", &oinfo, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name"); + VERIFY(oinfo.rc, 2, "reference count in H5Oget_info_by_name"); + ret = H5Oget_info_by_name(fid, "datatype", &oinfo, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name"); + VERIFY(oinfo.rc, 2, "reference count in H5Oget_info_by_name"); + ret = H5Oget_info_by_name(fid, "dataset", &oinfo, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name"); + VERIFY(oinfo.rc, 2, "reference count in H5Oget_info_by_name"); /* Decrement the reference counts and close the file */ ret = H5Odecr_refcount(grp); @@ -523,15 +523,15 @@ test_h5o_refcount(void) dset = H5Dopen2(fid, "dataset", H5P_DEFAULT); CHECK(dset, FAIL, "H5Dopen2"); - ret = H5Oget_info(fid, "group", &oinfo, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info"); - VERIFY(oinfo.rc, 1, "reference count in H5Oget_info"); - ret = H5Oget_info(fid, "datatype", &oinfo, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info"); - VERIFY(oinfo.rc, 1, "reference count in H5Oget_info"); - ret = H5Oget_info(fid, "dataset", &oinfo, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info"); - VERIFY(oinfo.rc, 1, "reference count in H5Oget_info"); + ret = H5Oget_info_by_name(fid, "group", &oinfo, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name"); + VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name"); + ret = H5Oget_info_by_name(fid, "datatype", &oinfo, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name"); + VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name"); + ret = H5Oget_info_by_name(fid, "dataset", &oinfo, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name"); + VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name"); /* Close the IDs */ ret = H5Gclose(grp); diff --git a/test/titerate.c b/test/titerate.c index 397e3c0..8df1563 100644 --- a/test/titerate.c +++ b/test/titerate.c @@ -554,8 +554,8 @@ liter_cb2(hid_t loc_id, const char *name, const H5L_info_t UNUSED *link_info, /* * Get type of the object and check it. */ - ret = H5Oget_info(loc_id, name, &oinfo, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info"); + ret = H5Oget_info_by_name(loc_id, name, &oinfo, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name"); if(test_info->type != oinfo.type) { TestErrPrintf("test_info->type = %d, oinfo.type = %d\n", test_info->type, (int)oinfo.type); diff --git a/test/tmisc.c b/test/tmisc.c index 08cf7ef..df950ea 100644 --- a/test/tmisc.c +++ b/test/tmisc.c @@ -638,15 +638,15 @@ test_misc4(void) CHECK(group3, FAIL, "H5Gcreate2"); /* Get the stat information for each group */ - ret = H5Oget_info(file1, MISC4_GROUP_1, &oinfo1, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info"); - ret = H5Oget_info(file1, MISC4_GROUP_2, &oinfo2, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info"); - ret = H5Oget_info(file2, MISC4_GROUP_1, &oinfo3, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info"); + ret = H5Oget_info_by_name(file1, MISC4_GROUP_1, &oinfo1, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name"); + ret = H5Oget_info_by_name(file1, MISC4_GROUP_2, &oinfo2, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name"); + ret = H5Oget_info_by_name(file2, MISC4_GROUP_1, &oinfo3, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name"); /* Verify that the fileno values are the same for groups from file1 */ - VERIFY(oinfo1.fileno, oinfo2.fileno, "H5Oget_info"); + VERIFY(oinfo1.fileno, oinfo2.fileno, "H5Oget_info_by_name"); /* Verify that the fileno values are not the same between file1 & file2 */ if(oinfo1.fileno == oinfo3.fileno) @@ -2855,26 +2855,26 @@ test_misc18(void) CHECK(did1, FAIL, "H5Dcreate2"); /* Get object information */ - ret = H5Oget_info(fid, MISC18_DSET1_NAME, &oinfo, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info"); - VERIFY(oinfo.hdr.nmesgs, 6, "H5Oget_info"); - VERIFY(oinfo.hdr.nchunks, 1, "H5Oget_info"); - VERIFY(oinfo.hdr.space.total, 272, "H5Oget_info"); - VERIFY(oinfo.hdr.space.free, 152, "H5Oget_info"); - VERIFY(oinfo.num_attrs, 0, "H5Oget_info"); + ret = H5Oget_info_by_name(fid, MISC18_DSET1_NAME, &oinfo, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name"); + VERIFY(oinfo.hdr.nmesgs, 6, "H5Oget_info_by_name"); + VERIFY(oinfo.hdr.nchunks, 1, "H5Oget_info_by_name"); + VERIFY(oinfo.hdr.space.total, 272, "H5Oget_info_by_name"); + VERIFY(oinfo.hdr.space.free, 152, "H5Oget_info_by_name"); + VERIFY(oinfo.num_attrs, 0, "H5Oget_info_by_name"); /* Create second dataset */ did2 = H5Dcreate2(fid, MISC18_DSET2_NAME, H5T_STD_U32LE, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); CHECK(did2, FAIL, "H5Dcreate2"); /* Get object information */ - ret = H5Oget_info(fid, MISC18_DSET2_NAME, &oinfo, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info"); - VERIFY(oinfo.hdr.nmesgs, 6, "H5Oget_info"); - VERIFY(oinfo.hdr.nchunks, 1, "H5Oget_info"); - VERIFY(oinfo.hdr.space.total, 272, "H5Oget_info"); - VERIFY(oinfo.hdr.space.free, 152, "H5Oget_info"); - VERIFY(oinfo.num_attrs, 0, "H5Oget_info"); + ret = H5Oget_info_by_name(fid, MISC18_DSET2_NAME, &oinfo, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name"); + VERIFY(oinfo.hdr.nmesgs, 6, "H5Oget_info_by_name"); + VERIFY(oinfo.hdr.nchunks, 1, "H5Oget_info_by_name"); + VERIFY(oinfo.hdr.space.total, 272, "H5Oget_info_by_name"); + VERIFY(oinfo.hdr.space.free, 152, "H5Oget_info_by_name"); + VERIFY(oinfo.num_attrs, 0, "H5Oget_info_by_name"); /* Loop creating attributes on each dataset, flushing them to the file each time */ for(u = 0; u < 10; u++) { @@ -2901,22 +2901,22 @@ test_misc18(void) } /* end for */ /* Get object information for dataset #1 now */ - ret = H5Oget_info(fid, MISC18_DSET1_NAME, &oinfo, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info"); - VERIFY(oinfo.hdr.nmesgs, 24, "H5Oget_info"); - VERIFY(oinfo.hdr.nchunks, 9, "H5Oget_info"); - VERIFY(oinfo.hdr.space.total, 888, "H5Oget_info"); - VERIFY(oinfo.hdr.space.free, 16, "H5Oget_info"); - VERIFY(oinfo.num_attrs, 10, "H5Oget_info"); + ret = H5Oget_info_by_name(fid, MISC18_DSET1_NAME, &oinfo, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name"); + VERIFY(oinfo.hdr.nmesgs, 24, "H5Oget_info_by_name"); + VERIFY(oinfo.hdr.nchunks, 9, "H5Oget_info_by_name"); + VERIFY(oinfo.hdr.space.total, 888, "H5Oget_info_by_name"); + VERIFY(oinfo.hdr.space.free, 16, "H5Oget_info_by_name"); + VERIFY(oinfo.num_attrs, 10, "H5Oget_info_by_name"); /* Get object information for dataset #2 now */ - ret = H5Oget_info(fid, MISC18_DSET2_NAME, &oinfo, H5P_DEFAULT); - CHECK(ret, FAIL, "H5Oget_info"); - VERIFY(oinfo.hdr.nmesgs, 24, "H5Oget_info"); - VERIFY(oinfo.hdr.nchunks, 9, "H5Oget_info"); - VERIFY(oinfo.hdr.space.total, 888, "H5Oget_info"); - VERIFY(oinfo.hdr.space.free, 16, "H5Oget_info"); - VERIFY(oinfo.num_attrs, 10, "H5Oget_info"); + ret = H5Oget_info_by_name(fid, MISC18_DSET2_NAME, &oinfo, H5P_DEFAULT); + CHECK(ret, FAIL, "H5Oget_info_by_name"); + VERIFY(oinfo.hdr.nmesgs, 24, "H5Oget_info_by_name"); + VERIFY(oinfo.hdr.nchunks, 9, "H5Oget_info_by_name"); + VERIFY(oinfo.hdr.space.total, 888, "H5Oget_info_by_name"); + VERIFY(oinfo.hdr.space.free, 16, "H5Oget_info_by_name"); + VERIFY(oinfo.num_attrs, 10, "H5Oget_info_by_name"); /* Close second dataset */ ret = H5Dclose(did2); @@ -3849,7 +3849,7 @@ test_misc23(void) tmp_id = H5Gopen2(file_id, "/A/B01", H5P_DEFAULT); CHECK(tmp_id, FAIL, "H5Gopen2"); - status = H5Oget_info(tmp_id, ".", &oinfo, H5P_DEFAULT); + status = H5Oget_info(tmp_id, &oinfo); CHECK(status, FAIL, "H5Oget_info"); VERIFY(oinfo.rc, 1, "H5Oget_info"); diff --git a/test/tsohm.c b/test/tsohm.c index 7af1362..c985493 100644 --- a/test/tsohm.c +++ b/test/tsohm.c @@ -772,8 +772,8 @@ static void test_sohm_size1(void) CHECK_I(file, "size1_helper"); /* Get the size of a dataset object header */ - ret = H5Oget_info(file, DSETNAME[0], &oinfo, H5P_DEFAULT); - CHECK_I(ret, "H5Oget_info"); + ret = H5Oget_info_by_name(file, DSETNAME[0], &oinfo, H5P_DEFAULT); + CHECK_I(ret, "H5Oget_info_by_name"); ret = H5Fclose(file); CHECK_I(ret, "H5Fclose"); norm_oh_size = oinfo.hdr.space.total; @@ -828,8 +828,8 @@ static void test_sohm_size1(void) CHECK_I(file, "size1_helper"); /* Get the size of a dataset object header */ - ret = H5Oget_info(file, DSETNAME[0], &oinfo, H5P_DEFAULT); - CHECK_I(ret, "H5Oget_info"); + ret = H5Oget_info_by_name(file, DSETNAME[0], &oinfo, H5P_DEFAULT); + CHECK_I(ret, "H5Oget_info_by_name"); ret = H5Fclose(file); CHECK_I(ret, "H5Fclose"); sohm_oh_size = oinfo.hdr.space.total; @@ -883,8 +883,8 @@ static void test_sohm_size1(void) CHECK_I(file, "size1_helper"); /* Get the size of a dataset object header */ - ret = H5Oget_info(file, DSETNAME[0], &oinfo, H5P_DEFAULT); - CHECK_I(ret, "H5Oget_info"); + ret = H5Oget_info_by_name(file, DSETNAME[0], &oinfo, H5P_DEFAULT); + CHECK_I(ret, "H5Oget_info_by_name"); ret = H5Fclose(file); CHECK_I(ret, "H5Fclose"); sohm_btree_oh_size = oinfo.hdr.space.total; @@ -920,10 +920,10 @@ static void test_sohm_size1(void) * continuation message and a NULL message. if(sohm_oh_size >= norm_oh_size) - VERIFY(sohm_oh_size, 1, "H5Oget_info"); + VERIFY(sohm_oh_size, 1, "H5Oget_info_by_name"); */ if(sohm_oh_size != sohm_btree_oh_size) - VERIFY(sohm_btree_oh_size, 1, "H5Oget_info"); + VERIFY(sohm_btree_oh_size, 1, "H5Oget_info_by_name"); /* Both sohm files should be bigger than a normal file when empty. * It's hard to say whether a B-tree with no nodes allocated should be diff --git a/test/unlink.c b/test/unlink.c index 637d14f..7ebfc35 100644 --- a/test/unlink.c +++ b/test/unlink.c @@ -451,9 +451,9 @@ check_new_move(hid_t fapl) FAIL_STACK_ERROR /* Get hard link info */ - if(H5Oget_info(file, "/group2/group_new_name", &oi_hard1, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name(file, "/group2/group_new_name", &oi_hard1, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if(H5Oget_info(file, "/group1/hard", &oi_hard2, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name(file, "/group1/hard", &oi_hard2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR /* Check hard links */ @@ -2204,7 +2204,7 @@ test_full_group_compact(hid_t fapl) /* Check reference count on objects to keep */ for(u = 0; u < FULL_GROUP_NUM_KEEP; u++) { sprintf(objname, "/keep/keep %u\n", u); - if(H5Oget_info(file_id, objname, &oi, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file_id, objname, &oi, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(oi.rc != 2) TEST_ERROR } /* end for */ @@ -2221,7 +2221,7 @@ test_full_group_compact(hid_t fapl) /* Check reference count on objects to keep */ for(u = 0; u < FULL_GROUP_NUM_KEEP; u++) { sprintf(objname, "/keep/keep %u\n", u); - if(H5Oget_info(file_id, objname, &oi, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file_id, objname, &oi, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(oi.rc != 1) TEST_ERROR } /* end for */ @@ -2350,7 +2350,7 @@ test_full_group_dense(hid_t fapl) /* Check reference count on objects to keep */ for(u = 0; u < FULL_GROUP_NUM_KEEP; u++) { sprintf(objname, "/keep/keep %u\n", u); - if(H5Oget_info(file_id, objname, &oi, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file_id, objname, &oi, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(oi.rc != 2) TEST_ERROR } /* end for */ @@ -2367,7 +2367,7 @@ test_full_group_dense(hid_t fapl) /* Check reference count on objects to keep */ for(u = 0; u < FULL_GROUP_NUM_KEEP; u++) { sprintf(objname, "/keep/keep %u\n", u); - if(H5Oget_info(file_id, objname, &oi, H5P_DEFAULT) < 0) FAIL_STACK_ERROR + if(H5Oget_info_by_name(file_id, objname, &oi, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(oi.rc != 1) TEST_ERROR } /* end for */ diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c index b713194..db17563 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -722,7 +722,7 @@ print_datatype(hid_t type,unsigned in_group) H5O_info_t oinfo; obj_t *obj; /* Found object */ - H5Oget_info(type, ".", &oinfo, H5P_DEFAULT); + H5Oget_info(type, &oinfo); obj = search_obj(type_table, oinfo.addr); if(obj) { @@ -1393,7 +1393,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void UNUSED H5O_info_t oinfo; /* Stat the object */ - if(H5Oget_info(group, name, &oinfo, H5P_DEFAULT) < 0) { + if(H5Oget_info_by_name(group, name, &oinfo, H5P_DEFAULT) < 0) { error_msg(progname, "unable to get object information for \"%s\"\n", name); d_status = EXIT_FAILURE; ret = FAIL; @@ -1906,7 +1906,7 @@ dump_group(hid_t gid, const char *name) } } /* end if */ - H5Oget_info(gid, ".", &oinfo, H5P_DEFAULT); + H5Oget_info(gid, &oinfo); if(oinfo.rc > 1) { obj_t *found_obj; /* Found object */ @@ -3252,7 +3252,7 @@ handle_datasets(hid_t fid, char *dset, void *data) } } - H5Oget_info(dsetid, ".", &oinfo, H5P_DEFAULT); + H5Oget_info(dsetid, &oinfo); if(oinfo.rc > 1) { obj_t *found_obj; /* Found object */ @@ -4489,7 +4489,7 @@ xml_print_datatype(hid_t type, unsigned in_group) obj_t *found_obj; /* Found object */ /* detect a shared datatype, output only once */ - H5Oget_info(type, ".", &oinfo, H5P_DEFAULT); + H5Oget_info(type, &oinfo); found_obj = search_obj(type_table, oinfo.addr); if(found_obj) { @@ -4850,7 +4850,7 @@ xml_dump_datatype(hid_t type) obj_t *found_obj; /* Found object */ /* Datatype is a shared or named datatype */ - H5Oget_info(type, ".", &oinfo, H5P_DEFAULT); + H5Oget_info(type, &oinfo); found_obj = search_obj(type_table, oinfo.addr); if(found_obj) { @@ -5359,7 +5359,7 @@ xml_dump_group(hid_t gid, const char *name) indentation(indent); indent += COL; - H5Oget_info(gid, ".", &oinfo, H5P_DEFAULT); + H5Oget_info(gid, &oinfo); if(oinfo.rc > 1) { obj_t *found_obj; /* Found object */ diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c index d270b0c..19cfe58 100644 --- a/tools/h5ls/h5ls.c +++ b/tools/h5ls/h5ls.c @@ -1171,7 +1171,7 @@ display_type(hid_t type, int ind) if(H5Tcommitted(type)) { H5O_info_t oi; - if(H5Oget_info(type, ".", &oi, H5P_DEFAULT) >= 0) + if(H5Oget_info(type, &oi) >= 0) printf("shared-%lu:"H5_PRINTF_HADDR_FMT" ", oi.fileno, oi.addr); else @@ -1744,7 +1744,7 @@ list(hid_t group, const char *name, const H5L_info_t *linfo, void *_iter) hid_t obj; /* Get object information */ - if(H5Oget_info(group, name, &oi, H5P_DEFAULT) < 0) { + if(H5Oget_info_by_name(group, name, &oi, H5P_DEFAULT) < 0) { puts("**NOT FOUND**"); return 0; } else if(oi.type < 0 || oi.type >= H5O_TYPE_NTYPES) { @@ -2306,7 +2306,7 @@ main(int argc, const char *argv[]) li.type = H5L_TYPE_HARD; /* Open the object and display it's information */ - if(li.type == H5L_TYPE_HARD && H5Oget_info(file, oname, &oi, H5P_DEFAULT) >= 0 && H5O_TYPE_GROUP == oi.type && !grp_literal_g) { + if(li.type == H5L_TYPE_HARD && H5Oget_info_by_name(file, oname, &oi, H5P_DEFAULT) >= 0 && H5O_TYPE_GROUP == oi.type && !grp_literal_g) { /* Specified name is a group. List the complete contents of the group. */ sym_insert(&oi, oname); iter.container = container = fix_name((show_file_name_g ? fname : ""), oname); diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c index 7edb70b..6c26cee 100644 --- a/tools/h5repack/h5repack_copy.c +++ b/tools/h5repack/h5repack_copy.c @@ -900,7 +900,7 @@ int copy_attr(hid_t loc_in, int j; unsigned u; - if(H5Oget_info(loc_in, ".", &oinfo, H5P_DEFAULT) < 0) + if(H5Oget_info(loc_in, &oinfo) < 0) goto error; /*------------------------------------------------------------------------- diff --git a/tools/h5repack/h5repack_refs.c b/tools/h5repack/h5repack_refs.c index 28828b8..64d1990 100644 --- a/tools/h5repack/h5repack_refs.c +++ b/tools/h5repack/h5repack_refs.c @@ -422,7 +422,7 @@ static int copy_refs_attr(hid_t loc_in, int j; unsigned u; - if(H5Oget_info(loc_in, ".", &oinfo, H5P_DEFAULT) < 0) + if(H5Oget_info(loc_in, &oinfo) < 0) goto error; for(u = 0; u < (unsigned)oinfo.num_attrs; u++) { @@ -664,7 +664,7 @@ static const char* MapIdToName(hid_t refobj_id, H5O_info_t ref_oinfo; /* Stat for the refobj id */ /* obtain information to identify the referenced object uniquely */ - if(H5Oget_info(refobj_id, ".", &ref_oinfo, H5P_DEFAULT) < 0) + if(H5Oget_info(refobj_id, &ref_oinfo) < 0) return NULL; if(ref_oinfo.addr == travt->objs[i].objno) diff --git a/tools/h5stat/h5stat.c b/tools/h5stat/h5stat.c index 2fe3302..c69d801 100644 --- a/tools/h5stat/h5stat.c +++ b/tools/h5stat/h5stat.c @@ -736,7 +736,7 @@ walk(hid_t group, const char *name, const H5L_info_t *linfo, void *_iter) char *s; /* Get object information */ - ret = H5Oget_info(group, name, &oi, H5P_DEFAULT); + ret = H5Oget_info_by_name(group, name, &oi, H5P_DEFAULT); assert(ret >= 0); /* If the object has already been printed then just show the object ID diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index f852a2d..6da37e2 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -2215,8 +2215,8 @@ hsize_t diff_region(hid_t obj1_id, if (nfound_b && options->m_verbose) { H5O_info_t oi1, oi2; - H5Oget_info(obj1_id, ".", &oi1, H5P_DEFAULT); - H5Oget_info(obj2_id, ".", &oi2, H5P_DEFAULT); + H5Oget_info(obj1_id, &oi1); + H5Oget_info(obj2_id, &oi2); parallel_print("Referenced dataset %lu %lu\n", (unsigned long)oi1.addr, (unsigned long)oi2.addr); diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c index 2db6d21..d3d6a66 100644 --- a/tools/lib/h5diff_attr.c +++ b/tools/lib/h5diff_attr.c @@ -71,9 +71,9 @@ hsize_t diff_attr(hid_t loc1_id, hsize_t nfound_total = 0; int cmp=1; - if(H5Oget_info(loc1_id, ".", &oinfo1, H5P_DEFAULT) < 0) + if(H5Oget_info(loc1_id, &oinfo1) < 0) goto error; - if(H5Oget_info(loc2_id, ".", &oinfo2, H5P_DEFAULT) < 0) + if(H5Oget_info(loc2_id, &oinfo2) < 0) goto error; if(oinfo1.num_attrs != oinfo2.num_attrs) diff --git a/tools/lib/h5tools_ref.c b/tools/lib/h5tools_ref.c index 69ea08d..123065b 100644 --- a/tools/lib/h5tools_ref.c +++ b/tools/lib/h5tools_ref.c @@ -134,7 +134,7 @@ ref_path_table_lookup(const char *thepath) /* Get the object info now */ /* (returns failure for dangling soft links) */ - if(H5Oget_info(thefile, thepath, &oi, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name(thefile, thepath, &oi, H5P_DEFAULT) < 0) return HADDR_UNDEF; /* All existing objects in the file had better be in the table */ @@ -300,7 +300,7 @@ fill_ref_path_table_cb(hid_t group, const char *obj_name, const H5L_info_t *linf if(linfo->type == H5L_TYPE_HARD) { H5O_info_t oinfo; - H5Oget_info(group, obj_name, &oinfo, H5P_DEFAULT); + H5Oget_info_by_name(group, obj_name, &oinfo, H5P_DEFAULT); /* Check if the object is already in the path table */ if(!ref_path_table_find(oinfo.addr)) { @@ -369,7 +369,7 @@ fill_ref_path_table(hid_t fid) root_path = HDstrdup("/"); /* Get info for root group */ - H5Oget_info(fid, root_path, &oinfo, H5P_DEFAULT); + H5Oget_info_by_name(fid, root_path, &oinfo, H5P_DEFAULT); /* Insert the root group into the path table (takes ownership of path) */ ref_path_table_put(root_path, oinfo.addr); diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index 66966d8..80839ce 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -872,7 +872,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai const char *path; obj = H5Rdereference(container, H5R_OBJECT, vp); - H5Oget_info(obj, ".", &oi, H5P_DEFAULT); + H5Oget_info(obj, &oi); /* Print object type and close object */ switch(oi.type) { diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c index fba76ad..cb38e7a 100644 --- a/tools/lib/h5tools_utils.c +++ b/tools/lib/h5tools_utils.c @@ -487,7 +487,7 @@ find_objs_cb(hid_t group, const char *name, const H5L_info_t UNUSED *linfo, void find_objs_t *info = (find_objs_t*)op_data; herr_t ret_value = 0; - if(H5Oget_info(group, name, &oinfo, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name(group, name, &oinfo, H5P_DEFAULT) < 0) ; /* keep going */ else { switch(oinfo.type) { @@ -526,7 +526,7 @@ find_objs_cb(hid_t group, const char *name, const H5L_info_t UNUSED *linfo, void type = H5Dget_type(dset); if(H5Tcommitted(type) > 0) { - H5Oget_info(type, ".", &oinfo, H5P_DEFAULT); + H5Oget_info(type, &oinfo); if(search_obj(info->type_table, oinfo.addr) == NULL) { char *type_name = HDstrdup(tmp); @@ -603,7 +603,7 @@ init_objs(hid_t fid, find_objs_t *info, table_t **group_table, info->dset_table = *dset_table; /* add the root group as an object, it may have hard links to it */ - if(H5Oget_info(fid, "/", &oinfo, H5P_DEFAULT) < 0) + if(H5Oget_info(fid, &oinfo) < 0) return FAIL; else { /* call with an empty string, it appends '/' group separator */ diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c index 14c59c4..97de021 100644 --- a/tools/lib/h5trav.c +++ b/tools/lib/h5trav.c @@ -155,7 +155,7 @@ traverse_cb(hid_t loc_id, const char *link_name, const H5L_info_t *linfo, H5O_info_t oinfo; /* Get information about the object */ - if(H5Oget_info(loc_id, link_name, &oinfo, H5P_DEFAULT) < 0) + if(H5Oget_info_by_name(loc_id, link_name, &oinfo, H5P_DEFAULT) < 0) return(H5_ITER_ERROR); /* If the object has multiple links, add it to the list of addresses @@ -224,7 +224,7 @@ traverse(hid_t file_id, const trav_visitor_t *visitor) trav_ud_traverse_t udata; /* User data for iteration callback */ /* Get info for root group */ - if(H5Oget_info(file_id, "/", &oinfo, H5P_DEFAULT) < 0) + if(H5Oget_info(file_id, &oinfo) < 0) return -1; /* Visit the root group of the file */ -- cgit v0.12