diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2018-09-19 01:48:50 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2018-09-19 01:48:50 (GMT) |
commit | ec53237fb849042b4a5b276a3e66a98ebb3710ee (patch) | |
tree | b641212c407dc89f0375c93e8b8badbdfff1554f | |
parent | 44de4ee2e54b84484b099c51c51440b61c4ee465 (diff) | |
parent | 680cf4d946fd10d50e0f7acdc5bc93f91037fb4f (diff) | |
download | hdf5-ec53237fb849042b4a5b276a3e66a98ebb3710ee.zip hdf5-ec53237fb849042b4a5b276a3e66a98ebb3710ee.tar.gz hdf5-ec53237fb849042b4a5b276a3e66a98ebb3710ee.tar.bz2 |
Merge pull request #1244 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:develop_pull_request to develop
* commit '680cf4d946fd10d50e0f7acdc5bc93f91037fb4f':
Removed 'VOL' versions of FUNC_ENTER macros as well as empty functions orginally intended to support the full SWMR feature.
43 files changed, 418 insertions, 2156 deletions
diff --git a/java/test/testfiles/JUnit-TestH5Edefault.txt b/java/test/testfiles/JUnit-TestH5Edefault.txt index 62497f9..b39dbef 100644 --- a/java/test/testfiles/JUnit-TestH5Edefault.txt +++ b/java/test/testfiles/JUnit-TestH5Edefault.txt @@ -36,25 +36,19 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): #000: (file name) line (number) in H5Fopen(): unable to open file major: File accessibilty minor: Unable to open file - #001: (file name) line (number) in H5F__open(): unable to open file - major: File accessibilty - minor: Unable to open file - #002: (file name) line (number) in H5F_open(): unable to retrieve VFL class + #001: (file name) line (number) in H5F_open(): unable to retrieve VFL class major: File accessibilty minor: Can't get value - #003: (file name) line (number) in H5FD_get_class(): can't find object for ID + #002: (file name) line (number) in H5FD_get_class(): can't find object for ID major: Object atom minor: Unable to find atom information (already closed?) HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): #000: (file name) line (number) in H5Fopen(): unable to open file major: File accessibilty minor: Unable to open file - #001: (file name) line (number) in H5F__open(): unable to open file - major: File accessibilty - minor: Unable to open file - #002: (file name) line (number) in H5F_open(): unable to retrieve VFL class + #001: (file name) line (number) in H5F_open(): unable to retrieve VFL class major: File accessibilty minor: Can't get value - #003: (file name) line (number) in H5FD_get_class(): can't find object for ID + #002: (file name) line (number) in H5FD_get_class(): can't find object for ID major: Object atom minor: Unable to find atom information (already closed?) @@ -1133,7 +1133,7 @@ H5Arename(hid_t loc_id, const char *old_name, const char *new_name) HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set collective metadata read") /* Call private attribute rename routine */ - if(H5A__rename(&loc, old_name, new_name) < 0) + if(H5O__attr_rename(loc.oloc, old_name, new_name) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTRENAME, FAIL, "can't rename attribute") } /* end if */ @@ -1379,7 +1379,7 @@ H5Adelete(hid_t loc_id, const char *name) HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set collective metadata read") /* Delete the attribute from the location */ - if(H5A__delete(&loc, name) < 0) + if(H5O__attr_remove(loc.oloc, name) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute") done: @@ -1563,7 +1563,7 @@ H5Aexists(hid_t obj_id, const char *attr_name) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name") /* Check if the attribute exists */ - if((ret_value = H5A__exists(&loc, attr_name)) < 0) + if((ret_value = H5O__attr_exists(loc.oloc, attr_name)) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to determine if attribute exists") done: diff --git a/src/H5Adeprec.c b/src/H5Adeprec.c index 9b592b0..99c1c0c 100644 --- a/src/H5Adeprec.c +++ b/src/H5Adeprec.c @@ -340,7 +340,7 @@ H5Aget_num_attrs(hid_t loc_id) } /*lint !e788 All appropriate cases are covered */ /* Look up the # of attributes for the object */ - if((ret_value = H5A__get_num_attrs(loc)) < 0) + if((ret_value = H5O__attr_count(loc)) < 0) HGOTO_ERROR(H5E_ATTR, H5E_CANTCOUNT, FAIL, "can't get attribute count for object") done: diff --git a/src/H5Aint.c b/src/H5Aint.c index 55560c7..807c67e 100644 --- a/src/H5Aint.c +++ b/src/H5Aint.c @@ -87,8 +87,6 @@ typedef struct { /* Local Prototypes */ /********************/ -static H5A_t *H5A__create_common(const H5G_loc_t *loc, const char *name, - const H5T_t *type, const H5S_t *space, hid_t acpl_id); static herr_t H5A__open_common(const H5G_loc_t *loc, H5A_t *attr); static herr_t H5A__compact_build_table_cb(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, unsigned sequence, unsigned *oh_flags_ptr, void *_udata/*in,out*/); @@ -127,7 +125,7 @@ H5FL_SEQ_DEFINE(H5A_t_ptr); /*------------------------------------------------------------------------- - * Function: H5A__create_common + * Function: H5A__create * * Purpose: This is the guts of creating an attribute. * @@ -138,8 +136,8 @@ H5FL_SEQ_DEFINE(H5A_t_ptr); * *------------------------------------------------------------------------- */ -static H5A_t * -H5A__create_common(const H5G_loc_t *loc, const char *name, const H5T_t *type, +H5A_t * +H5A__create(const H5G_loc_t *loc, const char *name, const H5T_t *type, const H5S_t *space, hid_t acpl_id) { H5A_t *attr = NULL; /* Attribute created */ @@ -148,7 +146,7 @@ H5A__create_common(const H5G_loc_t *loc, const char *name, const H5T_t *type, htri_t exists; /* Whether attribute exists */ H5A_t *ret_value = NULL; /* Return value */ - FUNC_ENTER_STATIC_TAG(loc->oloc->addr) + FUNC_ENTER_PACKAGE_TAG(loc->oloc->addr) /* Check args */ HDassert(loc); @@ -285,45 +283,6 @@ done: HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, NULL, "can't close attribute") FUNC_LEAVE_NOAPI_TAG(ret_value) -} /* H5A__create_common() */ - - -/*------------------------------------------------------------------------- - * Function: H5A__create - * - * Purpose: Entry point for creating attribute on an object - * - * Note: This routine is needed so that there's a non-API routine for - * creating attributes that can set up VOL / SWMR info - * (which need a DXPL). - * - * Return: Attribute structure on success, NULL on Failure. - * - * Programmer: Quincey Koziol - * December 6, 2017 - * - *------------------------------------------------------------------------- - */ -H5A_t * -H5A__create(const H5G_loc_t *loc, const char *name, const H5T_t *type, - const H5S_t *space, hid_t acpl_id) -{ - H5A_t *ret_value = NULL; /* Return value */ - - FUNC_ENTER_PACKAGE_VOL - - /* Check args */ - HDassert(loc); - HDassert(name); - HDassert(type); - HDassert(space); - - /* Go do the real work for attaching the attribute to the object */ - if(NULL == (ret_value = H5A__create_common(loc, name, type, space, acpl_id))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCREATE, NULL, "unable to create attribute") - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) } /* H5A__create() */ @@ -350,7 +309,7 @@ H5A__create_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr H5A_t *attr = NULL; /* Attribute from object header */ H5A_t *ret_value = NULL; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* check args */ HDassert(loc); @@ -368,8 +327,8 @@ H5A__create_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr loc_found = TRUE; /* Go do the real work for attaching the attribute to the object */ - if(NULL == (attr = H5A__create_common(&obj_loc, attr_name, type, space, acpl_id))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, NULL, "unable to create attribute") + if(NULL == (attr = H5A__create(&obj_loc, attr_name, type, space, acpl_id))) + HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, NULL, "unable to create attribute") /* Set return value */ ret_value = attr; @@ -384,7 +343,7 @@ done: if(attr && H5A__close(attr) < 0) HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, NULL, "can't close attribute") - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* H5A__create_by_name() */ @@ -450,10 +409,6 @@ done: * * Purpose: Open an attribute in an object header * - * Note: This routine is needed so that there's a non-API routine for - * creating attributes that can set up VOL / SWMR info - * (which need a DXPL). - * * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol @@ -467,7 +422,7 @@ H5A__open(const H5G_loc_t *loc, const char *attr_name) H5A_t *attr = NULL; /* Attribute from object header */ H5A_t *ret_value = NULL; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* check args */ HDassert(loc); @@ -490,7 +445,7 @@ done: if(attr && H5A__close(attr) < 0) HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, NULL, "can't close attribute") - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* H5A__open() */ @@ -517,7 +472,7 @@ H5A__open_by_idx(const H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type H5A_t *attr = NULL; /* Attribute from object header */ H5A_t *ret_value = NULL; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* check args */ HDassert(loc); @@ -554,7 +509,7 @@ done: if(attr && H5A__close(attr) < 0) HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, NULL, "can't close attribute") - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* H5A__open_by_idx() */ @@ -580,7 +535,7 @@ H5A__open_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr_n H5A_t *attr = NULL; /* Attribute from object header */ H5A_t *ret_value = NULL; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* check args */ HDassert(loc); @@ -618,7 +573,7 @@ done: if(attr && H5A__close(attr) < 0) HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, NULL, "can't close attribute") - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* H5A__open_by_name() */ @@ -652,7 +607,7 @@ H5A__read(const H5A_t *attr, const H5T_t *mem_type, void *buf) size_t buf_size; /* desired buffer size */ herr_t ret_value = SUCCEED; - FUNC_ENTER_PACKAGE_VOL_TAG(attr->oloc.addr) + FUNC_ENTER_PACKAGE_TAG(attr->oloc.addr) HDassert(attr); HDassert(mem_type); @@ -721,7 +676,7 @@ done: if(bkg_buf) bkg_buf = H5FL_BLK_FREE(attr_buf, bkg_buf); - FUNC_LEAVE_NOAPI_VOL_TAG(ret_value) + FUNC_LEAVE_NOAPI_TAG(ret_value) } /* H5A__read() */ @@ -756,7 +711,7 @@ H5A__write(H5A_t *attr, const H5T_t *mem_type, const void *buf) size_t buf_size; /* desired buffer size */ herr_t ret_value = SUCCEED; - FUNC_ENTER_PACKAGE_VOL_TAG(attr->oloc.addr) + FUNC_ENTER_PACKAGE_TAG(attr->oloc.addr) HDassert(attr); HDassert(mem_type); @@ -835,7 +790,7 @@ done: if(bkg_buf) bkg_buf = H5FL_BLK_FREE(attr_buf, bkg_buf); - FUNC_LEAVE_NOAPI_VOL_TAG(ret_value) + FUNC_LEAVE_NOAPI_TAG(ret_value) } /* H5A__write() */ @@ -939,7 +894,7 @@ H5A__get_type(H5A_t *attr) H5T_t *dt = NULL; hid_t ret_value = H5I_INVALID_HID; - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE HDassert(attr); @@ -970,7 +925,7 @@ done: if(H5I_INVALID_HID == ret_value && dt && (H5T_close(dt) < 0)) HDONE_ERROR(H5E_ATTR, H5E_CLOSEERROR, H5I_INVALID_HID, "unable to release datatype") - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5A__get_type() */ @@ -1192,7 +1147,7 @@ H5A__close_cb(H5A_t *attr) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* Sanity check */ HDassert(attr); @@ -1203,7 +1158,7 @@ H5A__close_cb(H5A_t *attr) HGOTO_ERROR(H5E_ATTR, H5E_CANTCLOSEOBJ, FAIL, "problem closing attribute") done: - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5A__close_cb() */ @@ -1355,39 +1310,6 @@ done: /*------------------------------------------------------------------------- - * Function: H5A__exists - * - * Purpose: Private version of H5Aexists - * - * Note: This routine is needed so that there's a non-API routine for - * detecting attributes that can set up VOL / SWMR info - * (which need a DXPL). - * - * Return: Success: TRUE/FALSE - * Failure: Negative - * - * Programmer: Quincey Koziol - * December 6, 2017 - * - *------------------------------------------------------------------------- - */ -htri_t -H5A__exists(const H5G_loc_t *loc, const char *name) -{ - htri_t ret_value = FAIL; /* Return value */ - - FUNC_ENTER_PACKAGE_VOL - - /* Check if the attribute exists */ - if((ret_value = H5O__attr_exists(loc->oloc, name)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "unable to determine if attribute exists") - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* H5A__exists() */ - - -/*------------------------------------------------------------------------- * Function: H5A__exists_by_name * * Purpose: Private version of H5Aexists_by_name @@ -1409,7 +1331,7 @@ H5A__exists_by_name(H5G_loc_t loc, const char *obj_name, const char *attr_name) hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */ htri_t ret_value = FAIL; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* Set up opened group location to fill in */ obj_loc.oloc = &obj_oloc; @@ -1430,7 +1352,7 @@ done: if(loc_found && H5G_loc_free(&obj_loc) < 0) HDONE_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't free location") - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* H5A__exists_by_name() */ @@ -2599,39 +2521,6 @@ done: /*------------------------------------------------------------------------- - * Function: H5A__rename - * - * Purpose: Private version of H5Arename - * - * Note: This routine is needed so that there's a non-API routine for - * renaming attributes that can set up VOL / SWMR info - * (which need a DXPL). - * - * Return: Success: Non-negative - * Failure: Negative - * - * Programmer: Quincey Koziol - * December 6, 2017 - * - *------------------------------------------------------------------------- - */ -herr_t -H5A__rename(const H5G_loc_t *loc, const char *old_name, const char *new_name) -{ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_PACKAGE_VOL - - /* Call object header attribute rename routine */ - if(H5O__attr_rename(loc->oloc, old_name, new_name) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTRENAME, FAIL, "can't rename attribute") - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* H5A__rename() */ - - -/*------------------------------------------------------------------------- * Function: H5A__rename_by_name * * Purpose: Private version of H5Arename_by_name @@ -2654,7 +2543,7 @@ H5A__rename_by_name(H5G_loc_t loc, const char *obj_name, const char *old_attr_na hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* Set up opened group location to fill in */ obj_loc.oloc = &obj_oloc; @@ -2675,44 +2564,9 @@ done: if(loc_found && H5G_loc_free(&obj_loc) < 0) HDONE_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't free location") - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* H5A__rename_by_name() */ -#ifndef H5_NO_DEPRECATED_SYMBOLS - -/*------------------------------------------------------------------------- - * Function: H5A__get_num_attrs - * - * Purpose: Private version of deprecated H5Aget_num_attrs - * - * Note: This routine is needed so that there's a non-API routine for - * querying the attribute count that can set up VOL / SWMR info - * (which need a DXPL). - * - * Return: Success: Non-negative - * Failure: Negative - * - * Programmer: Quincey Koziol - * December 6, 2017 - * - *------------------------------------------------------------------------- - */ -int -H5A__get_num_attrs(const H5O_loc_t *loc) -{ - int ret_value = FAIL; /* Return value */ - - FUNC_ENTER_PACKAGE_VOL - - /* Look up the # of attributes for the object */ - if((ret_value = H5O__attr_count(loc)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTCOUNT, FAIL, "can't get attribute count for object") - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* H5A__get_num_attrs() */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ - /*------------------------------------------------------------------------- * Function: H5A__iterate_common @@ -2755,10 +2609,6 @@ H5A__iterate_common(hid_t loc_id, H5_index_t idx_type, H5_iter_order_t order, * * Purpose: Private version of H5Aiterate2 * - * Note: This routine is needed so that there's a non-API routine for - * iterating over attributes that can set up VOL / SWMR info - * (which need a DXPL). - * * Return: Success: Non-negative * Failure: Negative * @@ -2774,7 +2624,7 @@ H5A__iterate(hid_t loc_id, H5_index_t idx_type, H5_iter_order_t order, H5A_attr_iter_op_t attr_op; /* Attribute operator */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* Build attribute operator info */ attr_op.op_type = H5A_ATTR_OP_APP2; @@ -2785,7 +2635,7 @@ H5A__iterate(hid_t loc_id, H5_index_t idx_type, H5_iter_order_t order, HGOTO_ERROR(H5E_ATTR, H5E_BADITER, FAIL, "error iterating over attributes") done: - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* H5A__iterate() */ #ifndef H5_NO_DEPRECATED_SYMBOLS @@ -2811,7 +2661,7 @@ H5A__iterate_old(hid_t loc_id, unsigned *attr_num, H5A_operator1_t op, hsize_t idx; /* Index of attribute to start iterating at */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* Build attribute operator info */ attr_op.op_type = H5A_ATTR_OP_APP; @@ -2829,7 +2679,7 @@ H5A__iterate_old(hid_t loc_id, unsigned *attr_num, H5A_operator1_t op, *attr_num = (unsigned)idx; done: - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* H5A__iterate_old() */ #endif /* H5_NO_DEPRECATED_SYMBOLS */ @@ -2839,10 +2689,6 @@ done: * * Purpose: Private version of H5Aiterate_by_name * - * Note: This routine is needed so that there's a non-API routine for - * iterating over attributes that can set up VOL / SWMR info - * (which need a DXPL). - * * Return: Success: Non-negative * Failure: Negative * @@ -2863,7 +2709,7 @@ H5A__iterate_by_name(const H5G_loc_t *loc, const char *obj_name, H5_index_t idx_ H5A_attr_iter_op_t attr_op; /* Attribute operator */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* Set up opened group location to fill in */ obj_loc.oloc = &obj_oloc; @@ -2896,44 +2742,11 @@ done: else if(loc_found && H5G_loc_free(&obj_loc) < 0) HDONE_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't free location") - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* H5A__iterate_by_name() */ /*------------------------------------------------------------------------- - * Function: H5A__delete - * - * Purpose: Private version of H5Adelete - * - * Note: This routine is needed so that there's a non-API routine for - * deleting attributes that can set up VOL / SWMR info - * (which need a DXPL). - * - * Return: Success: Non-negative - * Failure: Negative - * - * Programmer: Quincey Koziol - * December 6, 2017 - * - *------------------------------------------------------------------------- - */ -herr_t -H5A__delete(const H5G_loc_t *loc, const char *name) -{ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_PACKAGE_VOL - - /* Call object header attribute delete attribute routine */ - if(H5O__attr_remove(loc->oloc, name) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete attribute") - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* H5A__delete() */ - - -/*------------------------------------------------------------------------- * Function: H5A__delete_by_name * * Purpose: Private version of H5Adelete_by_name @@ -2955,7 +2768,7 @@ H5A__delete_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* Set up opened group location to fill in */ obj_loc.oloc = &obj_oloc; @@ -2976,7 +2789,7 @@ done: if(loc_found && H5G_loc_free(&obj_loc) < 0) HDONE_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't free location") - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* H5A__delete_by_name() */ @@ -3003,7 +2816,7 @@ H5A__delete_by_idx(const H5G_loc_t *loc, const char *obj_name, H5_index_t idx_ty hbool_t loc_found = FALSE; /* Entry at 'obj_name' found */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* Set up opened group location to fill in */ obj_loc.oloc = &obj_oloc; @@ -3024,6 +2837,6 @@ done: if(loc_found && H5G_loc_free(&obj_loc) < 0) HDONE_ERROR(H5E_ATTR, H5E_CANTRELEASE, FAIL, "can't free location") - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* H5A__delete_by_idx() */ diff --git a/src/H5Apkg.h b/src/H5Apkg.h index af16b55..0bb6d8f 100644 --- a/src/H5Apkg.h +++ b/src/H5Apkg.h @@ -200,13 +200,8 @@ H5_DLL herr_t H5A__close(H5A_t *attr); H5_DLL herr_t H5A__close_cb(H5A_t *attr); H5_DLL htri_t H5A__get_ainfo(H5F_t *f, H5O_t *oh, H5O_ainfo_t *ainfo); H5_DLL herr_t H5A__set_version(const H5F_t *f, H5A_t *attr); -H5_DLL herr_t H5A__rename(const H5G_loc_t *loc, const char *old_name, - const char *new_name); H5_DLL herr_t H5A__rename_by_name(H5G_loc_t loc, const char *obj_name, const char *old_attr_name, const char *new_attr_name); -#ifndef H5_NO_DEPRECATED_SYMBOLS -H5_DLL int H5A__get_num_attrs(const H5O_loc_t *loc); -#endif /* H5_NO_DEPRECATED_SYMBOLS */ H5_DLL herr_t H5A__iterate(hid_t loc_id, H5_index_t idx_type, H5_iter_order_t order, hsize_t *idx, H5A_operator2_t op, void *op_data); H5_DLL herr_t H5A__iterate_by_name(const H5G_loc_t *loc, const char *obj_name, @@ -216,12 +211,10 @@ H5_DLL herr_t H5A__iterate_by_name(const H5G_loc_t *loc, const char *obj_name, H5_DLL herr_t H5A__iterate_old(hid_t loc_id, unsigned *attr_num, H5A_operator1_t op, void *op_data); #endif /* H5_NO_DEPRECATED_SYMBOLS */ -H5_DLL herr_t H5A__delete(const H5G_loc_t *loc, const char *name); H5_DLL herr_t H5A__delete_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr_name); H5_DLL herr_t H5A__delete_by_idx(const H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n); -H5_DLL htri_t H5A__exists(const H5G_loc_t *loc, const char *name); H5_DLL htri_t H5A__exists_by_name(H5G_loc_t loc, const char *obj_name, const char *attr_name); H5_DLL herr_t H5A__write(H5A_t *attr, const H5T_t *mem_type, const void *buf); H5_DLL herr_t H5A__read(const H5A_t *attr, const H5T_t *mem_type, void *buf); @@ -220,8 +220,8 @@ H5Dcreate_anon(hid_t loc_id, hid_t type_id, hid_t space_id, hid_t dcpl_id, HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info") /* build and open the new dataset */ - if(NULL == (dset = H5D__create_anon(loc.oloc->file, type_id, space, dcpl_id, dapl_id))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create dataset") + if(NULL == (dset = H5D__create(loc.oloc->file, type_id, space, dcpl_id, dapl_id))) + HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create dataset") /* Register the new dataset to get an ID for it */ if((ret_value = H5I_register(H5I_DATASET, dset, TRUE)) < 0) @@ -481,8 +481,8 @@ H5Dget_create_plist(hid_t dset_id) if(NULL == (dataset = (H5D_t *)H5I_object_verify(dset_id, H5I_DATASET))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a dataset") - if((ret_value = H5D__get_create_plist(dataset)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, H5I_INVALID_HID, "Can't get creation plist") + if((ret_value = H5D_get_create_plist(dataset)) < 0) + HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, H5I_INVALID_HID, "Can't get creation plist") done: FUNC_LEAVE_API(ret_value) diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index 4906f3c..16d7530 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -495,7 +495,7 @@ H5D__chunk_direct_read(const H5D_t *dset, hsize_t *offset, uint32_t* filters, hsize_t scaled[H5S_MAX_RANK]; /* Scaled coordinates for this chunk */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE_VOL_TAG(dset->oloc.addr) + FUNC_ENTER_PACKAGE_TAG(dset->oloc.addr) /* Check args */ HDassert(dset && H5D_CHUNKED == layout->type); @@ -565,7 +565,7 @@ H5D__chunk_direct_read(const H5D_t *dset, hsize_t *offset, uint32_t* filters, *filters = udata.filter_mask; done: - FUNC_LEAVE_NOAPI_VOL_TAG(ret_value) + FUNC_LEAVE_NOAPI_TAG(ret_value) } /* end H5D__chunk_direct_read() */ @@ -590,7 +590,7 @@ H5D__get_chunk_storage_size(H5D_t *dset, const hsize_t *offset, hsize_t *storage H5D_chunk_ud_t udata; /* User data for querying chunk info */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE_VOL_TAG(dset->oloc.addr) + FUNC_ENTER_PACKAGE_TAG(dset->oloc.addr) /* Check args */ HDassert(dset && H5D_CHUNKED == layout->type); @@ -663,7 +663,7 @@ H5D__get_chunk_storage_size(H5D_t *dset, const hsize_t *offset, hsize_t *storage *storage_size = dset->shared->layout.u.chunk.size; done: - FUNC_LEAVE_NOAPI_VOL_TAG(ret_value) + FUNC_LEAVE_NOAPI_TAG(ret_value) } /* H5D__get_chunk_storage_size */ diff --git a/src/H5Dint.c b/src/H5Dint.c index e8874a2..2d4985e 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -58,7 +58,6 @@ static herr_t H5D__build_file_prefix(const H5D_t *dset, hid_t dapl_id, static herr_t H5D__open_oid(H5D_t *dataset, hid_t dapl_id); static herr_t H5D__init_storage(const H5D_io_info_t *io_info, hbool_t full_overwrite, hsize_t old_dim[]); -static herr_t H5D__get_storage_size_real(const H5D_t *dset, hsize_t *storage_size); static herr_t H5D__append_flush_setup(H5D_t *dset, hid_t dapl_id); static herr_t H5D__close_cb(H5D_t *dataset); @@ -299,7 +298,7 @@ H5D__create_named(const H5G_loc_t *loc, const char *name, hid_t type_id, H5D_obj_create_t dcrt_info; /* Information for dataset creation */ H5D_t *ret_value = NULL; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* Check arguments */ HDassert(loc); @@ -330,52 +329,11 @@ H5D__create_named(const H5G_loc_t *loc, const char *name, hid_t type_id, ret_value = (H5D_t *)ocrt_info.new_obj; done: - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__create_named() */ /*------------------------------------------------------------------------- - * Function: H5D__create_anon - * - * Purpose: Internal routine to create a new anonymous dataset. - * - * Note: This routine is needed so that there's a non-API routine for - * creating datasets that can set up VOL / SWMR info - * (which need a DXPL). - * - * Return: Success: Non-NULL, pointer to new dataset object. - * Failure: NULL - * - * Programmer: Quincey Koziol - * December 9, 2017 - * - *------------------------------------------------------------------------- - */ -H5D_t * -H5D__create_anon(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id, - hid_t dapl_id) -{ - H5D_t *ret_value = NULL; /* Return value */ - - FUNC_ENTER_PACKAGE_VOL - - /* Check arguments */ - HDassert(file); - HDassert(type_id != H5P_DEFAULT); - HDassert(space); - HDassert(dcpl_id != H5P_DEFAULT); - HDassert(dapl_id != H5P_DEFAULT); - - /* Build and open the dataset */ - if(NULL == (ret_value = H5D__create(file, type_id, space, dcpl_id, dapl_id))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to create dataset") - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* end H5D__create_anon() */ - - -/*------------------------------------------------------------------------- * Function: H5D__get_space_status * * Purpose: Returns the status of dataspace allocation. @@ -390,7 +348,7 @@ H5D__get_space_status(const H5D_t *dset, H5D_space_status_t *allocation) { herr_t ret_value = SUCCEED; - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE HDassert(dset); @@ -423,7 +381,7 @@ H5D__get_space_status(const H5D_t *dset, H5D_space_status_t *allocation) HGOTO_ERROR(H5E_DATASET, H5E_OVERFLOW, FAIL, "size of dataset's storage overflowed") /* Difficult to error check, since the error value is 0 and 0 is a valid value... :-/ */ - if(H5D__get_storage_size_real(dset, &space_allocated) < 0) + if(H5D__get_storage_size(dset, &space_allocated) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get size of dataset's storage") /* Decide on how much of the space is allocated */ @@ -444,7 +402,7 @@ H5D__get_space_status(const H5D_t *dset, H5D_space_status_t *allocation) } /* end else */ done: - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__get_space_status() */ @@ -1189,7 +1147,7 @@ H5D__open_name(const H5G_loc_t *loc, const char *name, hid_t dapl_id) hbool_t loc_found = FALSE; /* Location at 'name' found */ H5D_t *ret_value = NULL; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* Check args */ HDassert(loc); @@ -1223,7 +1181,7 @@ done: if(loc_found && H5G_loc_free(&dset_loc) < 0) HDONE_ERROR(H5E_DATASET, H5E_CANTRELEASE, NULL, "can't free location") - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__open_name() */ @@ -1617,7 +1575,7 @@ H5D__close_cb(H5D_t *dataset) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_STATIC_VOL + FUNC_ENTER_STATIC /* check args */ HDassert(dataset && dataset->oloc.file && dataset->shared); @@ -1628,7 +1586,7 @@ H5D__close_cb(H5D_t *dataset) HGOTO_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "can't close dataset"); done: - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__close_cb() */ @@ -2262,7 +2220,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5D__get_storage_size_real + * Function: H5D__get_storage_size * * Purpose: Determines how much space has been reserved to store the raw * data of a dataset. @@ -2270,8 +2228,8 @@ done: * Return: Non-negative on success, negative on failure *------------------------------------------------------------------------- */ -static herr_t -H5D__get_storage_size_real(const H5D_t *dset, hsize_t *storage_size) +herr_t +H5D__get_storage_size(const H5D_t *dset, hsize_t *storage_size) { herr_t ret_value = SUCCEED; /* Return value */ @@ -2313,35 +2271,6 @@ H5D__get_storage_size_real(const H5D_t *dset, hsize_t *storage_size) done: FUNC_LEAVE_NOAPI_TAG(ret_value) -} /* end H5D__get_storage_size_real() */ - - -/*------------------------------------------------------------------------- - * Function: H5D__get_storage_size - * - * Purpose: Determines how much space has been reserved to store the raw - * data of a dataset. - * - * Note: This routine is needed so that there's a non-API routine for - * creating attributes that can set up VOL / SWMR info - * (which need a DXPL). - * - * Return: Non-negative on success, negative on failure - *------------------------------------------------------------------------- - */ -herr_t -H5D__get_storage_size(const H5D_t *dset, hsize_t *storage_size) -{ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_PACKAGE_VOL - - /* Difficult to error check, since the error value is 0 and 0 is a valid value... :-/ */ - if(H5D__get_storage_size_real(dset, storage_size) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get size of dataset's storage") - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) } /* end H5D__get_storage_size() */ @@ -2586,7 +2515,7 @@ H5D__set_extent(H5D_t *dset, const hsize_t *size) unsigned dim_idx; /* Dimension index */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE_VOL_TAG(dset->oloc.addr) + FUNC_ENTER_PACKAGE_TAG(dset->oloc.addr) /* Check args */ HDassert(dset); @@ -2747,7 +2676,7 @@ H5D__set_extent(H5D_t *dset, const hsize_t *size) } /* end if */ done: - FUNC_LEAVE_NOAPI_VOL_TAG(ret_value) + FUNC_LEAVE_NOAPI_TAG(ret_value) } /* end H5D__set_extent() */ @@ -2833,7 +2762,7 @@ H5D__flush(H5D_t *dset, hid_t dset_id) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* Check args */ HDassert(dset); @@ -2848,7 +2777,7 @@ H5D__flush(H5D_t *dset, hid_t dset_id) HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to flush dataset and object flush callback") done: - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__flush() */ @@ -2873,7 +2802,7 @@ H5D__format_convert(H5D_t *dataset) hbool_t add_new_layout = FALSE; /* Indicate that the new layout message is added */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE_VOL_TAG(dataset->oloc.addr) + FUNC_ENTER_PACKAGE_TAG(dataset->oloc.addr) /* Check args */ HDassert(dataset); @@ -2999,7 +2928,7 @@ done: if(newlayout != NULL) newlayout = (H5O_layout_t *)H5MM_xfree(newlayout); - FUNC_LEAVE_NOAPI_VOL_TAG(ret_value) + FUNC_LEAVE_NOAPI_TAG(ret_value) } /* end H5D__format_convert() */ @@ -3126,44 +3055,6 @@ done: /*------------------------------------------------------------------------- - * Function: H5D__get_create_plist - * - * Purpose: Internal routine to retrieve a dataset's creation property list. - * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * - * Return: Success: ID for a copy of the dataset creation property - * list. The property list ID should be released - * by calling H5Pclose(). - * - * Failure: FAIL - * - * Programmer: Quincey Koziol - * December 18, 2017 - * - *------------------------------------------------------------------------- - */ -hid_t -H5D__get_create_plist(const H5D_t *dset) -{ - hid_t ret_value = FAIL; /* Return value */ - - FUNC_ENTER_PACKAGE_VOL - - /* Check arguments */ - HDassert(dset); - - /* Retrieve the DCPL */ - if((ret_value = H5D_get_create_plist(dset)) < 0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get dataset's creation property list") - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* end H5D__get_create_plist() */ - - -/*------------------------------------------------------------------------- * Function: H5D_get_create_plist * * Purpose: Private function for H5Dget_create_plist @@ -3422,7 +3313,7 @@ H5D__get_space(const H5D_t *dset) H5S_t *space = NULL; hid_t ret_value = H5I_INVALID_HID; - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* If the layout is virtual, update the extent */ if(dset->shared->layout.type == H5D_VIRTUAL) @@ -3443,7 +3334,7 @@ done: if(H5S_close(space) < 0) HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release dataspace") - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__get_space() */ @@ -3508,7 +3399,7 @@ H5D__refresh(hid_t dset_id, H5D_t *dset) hbool_t virt_dsets_held = FALSE; /* Whether virtual datasets' files are held open */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* Sanity check */ HDassert(dset); @@ -3536,6 +3427,6 @@ done: if(H5D__virtual_release_source_dset_files(head) < 0) HDONE_ERROR(H5E_DATASET, H5E_CANTDEC, FAIL, "can't release VDS source files held open") - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__refresh() */ diff --git a/src/H5Dio.c b/src/H5Dio.c index 5fea91f..ed384ca 100644 --- a/src/H5Dio.c +++ b/src/H5Dio.c @@ -449,7 +449,7 @@ H5D__read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space, char fake_char; /* Temporary variable for NULL buffer pointers */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE_VOL_TAG(dataset->oloc.addr) + FUNC_ENTER_PACKAGE_TAG(dataset->oloc.addr) /* check args */ HDassert(dataset && dataset->oloc.file); @@ -616,7 +616,7 @@ done: if(H5S_close(projected_mem_space) < 0) HDONE_ERROR(H5E_DATASET, H5E_CANTCLOSEOBJ, FAIL, "unable to shut down projected memory dataspace") - FUNC_LEAVE_NOAPI_VOL_TAG(ret_value) + FUNC_LEAVE_NOAPI_TAG(ret_value) } /* end H5D__read() */ diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h index b887b87..1217c48 100644 --- a/src/H5Dpkg.h +++ b/src/H5Dpkg.h @@ -555,8 +555,6 @@ H5_DLL H5D_t *H5D__create(H5F_t *file, hid_t type_id, const H5S_t *space, H5_DLL H5D_t *H5D__create_named(const H5G_loc_t *loc, const char *name, hid_t type_id, const H5S_t *space, hid_t lcpl_id, hid_t dcpl_id, hid_t dapl_id); -H5_DLL H5D_t *H5D__create_anon(H5F_t *file, hid_t type_id, const H5S_t *space, - hid_t dcpl_id, hid_t dapl_id); H5_DLL H5D_t *H5D__open_name(const H5G_loc_t *loc, const char *name, hid_t dapl_id); H5_DLL hid_t H5D__get_space(const H5D_t *dset); H5_DLL hid_t H5D__get_type(const H5D_t *dset); @@ -575,7 +573,6 @@ H5_DLL herr_t H5D__set_extent(H5D_t *dataset, const hsize_t *size); H5_DLL herr_t H5D__flush_sieve_buf(H5D_t *dataset); H5_DLL herr_t H5D__flush_real(H5D_t *dataset); H5_DLL herr_t H5D__flush(H5D_t *dset, hid_t dset_id); -H5_DLL hid_t H5D__get_create_plist(const H5D_t *dset); H5_DLL herr_t H5D__mark(const H5D_t *dataset, unsigned flags); H5_DLL herr_t H5D__refresh(hid_t dset_id, H5D_t *dataset); @@ -440,7 +440,7 @@ H5Fcreate(const char *filename, unsigned flags, hid_t fcpl_id, hid_t fapl_id) flags |= H5F_ACC_RDWR | H5F_ACC_CREAT; /* Create a new file or truncate an existing file. */ - if (NULL == (new_file = H5F__create(filename, flags, fcpl_id, fapl_id))) + if(NULL == (new_file = H5F_open(filename, flags, fcpl_id, fapl_id))) HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, H5I_INVALID_HID, "unable to create file") /* Get an atom for the file */ @@ -505,7 +505,7 @@ H5Fopen(const char *filename, unsigned flags, hid_t fapl_id) HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info") /* Open the file */ - if(NULL == (new_file = H5F__open(filename, flags, H5P_FILE_CREATE_DEFAULT, fapl_id))) + if(NULL == (new_file = H5F_open(filename, flags, H5P_FILE_CREATE_DEFAULT, fapl_id))) HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, H5I_INVALID_HID, "unable to open file") /* Get an atom for the file */ @@ -621,15 +621,22 @@ H5Fflush(hid_t object_id, H5F_scope_t scope) * to be flushed. */ if(H5F_ACC_RDWR & H5F_INTENT(f)) { - hid_t fapl_id = H5P_DEFAULT; /* FAPL to use */ + hid_t fapl_id = H5P_DEFAULT; /* FAPL to use */ /* Verify access property list and set up collective metadata if appropriate */ if(H5CX_set_apl(&fapl_id, H5P_CLS_FACC, object_id, TRUE) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set access property list info") - /* Flush the file */ - if(H5F__flush(f, scope) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush file's cached information") + /* Flush other files, depending on scope */ + if(H5F_SCOPE_GLOBAL == scope) { + /* Call the flush routine for mounted file hierarchies */ + if(H5F_flush_mounts(f) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush mounted file hierarchy") + } /* end if */ + else + /* Call the flush routine, for this file */ + if(H5F__flush(f) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush file's cached information") } /* end if */ done: @@ -796,9 +803,9 @@ H5Fget_freespace(hid_t file_id) if(NULL == (file = (H5F_t *)H5I_object_verify(file_id, H5I_FILE))) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID") - /* Get the free space in the file */ - if(H5F__get_freespace(file, &tot_space) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to check free space for file") + /* Go get the actual amount of free space in the file */ + if(H5MF_get_freespace(file, &tot_space, NULL) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get free space for file") ret_value = (hssize_t)tot_space; @@ -1273,7 +1280,7 @@ H5Fget_free_sections(hid_t file_id, H5F_mem_t type, size_t nsects, HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "nsects must be > 0") /* Get the free-space section information in the file */ - if((ret_value = H5F__get_free_sections(file, type, nsects, sect_info)) < 0) + if((ret_value = H5MF_get_free_sections(file, type, nsects, sect_info)) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to check free space for file") done: diff --git a/src/H5Fefc.c b/src/H5Fefc.c index 07bb644..a394071 100644 --- a/src/H5Fefc.c +++ b/src/H5Fefc.c @@ -481,7 +481,7 @@ H5F__efc_release(H5F_efc_t *efc) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* Sanity checks */ HDassert(efc); @@ -491,7 +491,7 @@ H5F__efc_release(H5F_efc_t *efc) HGOTO_ERROR(H5E_FILE, H5E_CANTRELEASE, FAIL, "can't remove entry from external file cache") done: - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5F_efc_release() */ diff --git a/src/H5Fint.c b/src/H5Fint.c index abc638a..432cd8e 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -795,7 +795,7 @@ H5F__is_hdf5(const char *name) haddr_t sig_addr; /* Addess of hdf5 file signature */ htri_t ret_value = FAIL; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* Open the file at the virtual file layer */ if(NULL == (file = H5FD_open(name, H5F_ACC_RDONLY, H5P_FILE_ACCESS_DEFAULT, HADDR_UNDEF))) @@ -812,7 +812,7 @@ done: if(H5FD_close(file) < 0 && ret_value >= 0) HDONE_ERROR(H5E_IO, H5E_CANTCLOSEFILE, FAIL, "unable to close file") - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5F__is_hdf5() */ @@ -1333,78 +1333,6 @@ H5F__dest(H5F_t *f, hbool_t flush) /*------------------------------------------------------------------------- - * Function: H5F__create - * - * Purpose: Internal routine to create a file. - * - * Note: This routine is needed so that there's a non-API routine for - * creating files that can set up VOL / SWMR info - * (which need a DXPL). - * - * Return: Success: Non-NULL, pointer to new file object. - * Failure: NULL - * - * Programmer: Quincey Koziol - * December 13, 2017 - * - *------------------------------------------------------------------------- - */ -H5F_t * -H5F__create(const char *filename, unsigned flags, hid_t fcpl_id, hid_t fapl_id) -{ - H5F_t *ret_value = NULL; /* Return value */ - - FUNC_ENTER_PACKAGE_VOL - - /* Sanity check */ - HDassert(filename); - - /* Create a new file or truncate an existing file. */ - if(NULL == (ret_value = H5F_open(filename, flags, fcpl_id, fapl_id))) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file") - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* end H5F__create() */ - - -/*------------------------------------------------------------------------- - * Function: H5F__open - * - * Purpose: Internal routine to open a file. - * - * Note: This routine is needed so that there's a non-API routine for - * opening files that can set up VOL / SWMR info - * (which need a DXPL). - * - * Return: Success: Non-NULL, pointer to new file object. - * Failure: NULL - * - * Programmer: Quincey Koziol - * December 13, 2017 - * - *------------------------------------------------------------------------- - */ -H5F_t * -H5F__open(const char *filename, unsigned flags, hid_t fcpl_id, hid_t fapl_id) -{ - H5F_t *ret_value = NULL; /* Return value */ - - FUNC_ENTER_PACKAGE_VOL - - /* Sanity check */ - HDassert(filename); - - /* Open the file */ - if(NULL == (ret_value = H5F_open(filename, flags, fcpl_id, fapl_id))) - HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open file") - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* end H5F__open() */ - - -/*------------------------------------------------------------------------- * Function: H5F_open * * Purpose: Opens (or creates) a file. This function understands the @@ -1926,7 +1854,7 @@ H5F__flush_phase2(H5F_t *f, hbool_t closing) /*------------------------------------------------------------------------- - * Function: H5F__flush_real + * Function: H5F__flush * * Purpose: Flushes cached data. * @@ -1934,7 +1862,7 @@ H5F__flush_phase2(H5F_t *f, hbool_t closing) *------------------------------------------------------------------------- */ herr_t -H5F__flush_real(H5F_t *f) +H5F__flush(H5F_t *f) { herr_t ret_value = SUCCEED; /* Return value */ @@ -1954,49 +1882,6 @@ H5F__flush_real(H5F_t *f) HDONE_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush file data") FUNC_LEAVE_NOAPI(ret_value) -} /* end H5F__flush_real() */ - - -/*------------------------------------------------------------------------- - * Function: H5F__flush - * - * Purpose: Internal routine to flush a file. - * - * Note: This routine is needed so that there's a non-API routine for - * flushing files that can set up VOL / SWMR info - * (which need a DXPL). - * - * Return: Non-negative on success / Negative on failure - * - * Programmer: Quincey Koziol - * December 13, 2017 - * - *------------------------------------------------------------------------- - */ -herr_t -H5F__flush(H5F_t *f, H5F_scope_t scope) -{ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_PACKAGE_VOL - - /* Sanity check */ - HDassert(f); - HDassert(f->shared); - - /* Flush other files, depending on scope */ - if(H5F_SCOPE_GLOBAL == scope) { - /* Call the flush routine for mounted file hierarchies */ - if(H5F_flush_mounts(f) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush mounted file hierarchy") - } /* end if */ - else - /* Call the flush routine, for this file */ - if(H5F__flush_real(f) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush file's cached information") - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) } /* end H5F__flush() */ @@ -2005,10 +1890,6 @@ done: * * Purpose: Internal routine to close a file. * - * Note: This routine is needed so that there's a non-API routine for - * closing files that can set up VOL / SWMR info - * (which need a DXPL). - * * Return: Non-negative on success / Negative on failure * * Programmer: Quincey Koziol @@ -2022,7 +1903,7 @@ H5F__close(hid_t file_id) H5F_t *f; /* File pointer */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* Flush file if this is the last reference to this id and we have write * intent, unless it will be flushed by the "shared" file being closed. @@ -2037,7 +1918,7 @@ H5F__close(hid_t file_id) if((nref = H5I_get_ref(file_id, FALSE)) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get ID ref count") if(nref == 1) - if(H5F__flush_real(f) < 0) + if(H5F__flush(f) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush cache") } /* end if */ @@ -2047,7 +1928,7 @@ H5F__close(hid_t file_id) HGOTO_ERROR(H5E_FILE, H5E_CANTDEC, FAIL, "decrementing file ID failed") done: - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5F__close() */ @@ -2073,7 +1954,7 @@ H5F__close_cb(H5F_t *f) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* Sanity check */ HDassert(f); @@ -2105,7 +1986,7 @@ H5F__close_cb(H5F_t *f) HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "can't close file") done: - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5F__close_cb() */ @@ -2780,7 +2661,7 @@ H5F__set_libver_bounds(H5F_t *f, H5F_libver_t low, H5F_libver_t high) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* Sanity checks */ HDassert(f); @@ -2808,7 +2689,7 @@ H5F__set_libver_bounds(H5F_t *f, H5F_libver_t low, H5F_libver_t high) * * QAK - April, 2018 */ - if(H5F__flush_real(f) < 0) + if(H5F__flush(f) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush file's cached information") /* Set the new bounds */ @@ -2822,45 +2703,10 @@ done: /*------------------------------------------------------------------------- - * Function: H5F__get_freespace - * - * Purpose: Private version of H5Fget_freespace - * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * - * Return: Success: SUCCEED - * Failure: FAIL - *------------------------------------------------------------------------- - */ -herr_t -H5F__get_freespace(H5F_t *f, hsize_t *tot_space) -{ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_PACKAGE_VOL - - /* Sanity check */ - HDassert(f); - HDassert(f->shared); - - /* Go get the actual amount of free space in the file */ - if(H5MF_get_freespace(f, tot_space, NULL) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to check free space for file") - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* H5F__get_freespace() */ - - -/*------------------------------------------------------------------------- * Function: H5F__get_file_image * * Purpose: Private version of H5Fget_file_image * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * * Return: Success: Bytes copied / number of bytes needed. * Failure: negative value *------------------------------------------------------------------------- @@ -2872,7 +2718,7 @@ H5F__get_file_image(H5F_t *file, void *buf_ptr, size_t buf_len) haddr_t eoa; /* End of file address */ ssize_t ret_value = -1; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* Check args */ if(!file || !file->shared || !file->shared->lf) @@ -2959,7 +2805,7 @@ H5F__get_file_image(H5F_t *file, void *buf_ptr, size_t buf_len) } /* end if */ done: - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* H5F__get_file_image() */ @@ -2968,9 +2814,6 @@ done: * * Purpose: Private version of H5Fget_info * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * * Return: Success: SUCCEED * Failure: FAIL *------------------------------------------------------------------------- @@ -2980,7 +2823,7 @@ H5F__get_info(H5F_t *f, H5F_info2_t *finfo) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* Sanity check */ HDassert(f); @@ -3009,7 +2852,7 @@ H5F__get_info(H5F_t *f, H5F_info2_t *finfo) finfo->free.version = HDF5_FREESPACE_VERSION; done: - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* H5F__get_info() */ @@ -3098,39 +2941,6 @@ H5F_set_retries(H5F_t *f) /*------------------------------------------------------------------------- - * Function: H5F__get_free_sections - * - * Purpose: Private version of H5Fget_free_sections - * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * - * Return: Success: non-negative, the total # of free space sections - * Failure: negative - *------------------------------------------------------------------------- - */ -ssize_t -H5F__get_free_sections(H5F_t *f, H5FD_mem_t type, size_t nsects, - H5F_sect_info_t *sect_info) -{ - ssize_t ret_value = -1; /* Return value */ - - FUNC_ENTER_PACKAGE_VOL - - /* Sanity check */ - HDassert(f); - HDassert(f->shared); - - /* Go get the actual amount of free space in the file */ - if((ret_value = H5MF_get_free_sections(f, type, nsects, sect_info)) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get free space sections for file") - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* H5F__get_free_sections() */ - - -/*------------------------------------------------------------------------- * Function: H5F_object_flush_cb * * Purpose: To invoke the callback function for object flush that is set @@ -3426,9 +3236,6 @@ done: * set up flush dependency/proxy even for file opened without * SWMR to resolve issues with opened objects. * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * * Return: Success: SUCCEED * Failure: FAIL *------------------------------------------------------------------------- @@ -3448,7 +3255,7 @@ H5F__start_swmr_write(H5F_t *f) hbool_t setup = FALSE; /* Boolean flag to indicate whether SWMR setting is enabled */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* Sanity check */ HDassert(f); @@ -3481,7 +3288,7 @@ H5F__start_swmr_write(H5F_t *f) HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush superblock extension") /* Flush data buffers */ - if(H5F__flush_real(f) < 0) + if(H5F__flush(f) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush f's cached information") /* Get the # of opened named datatypes and attributes */ @@ -3617,7 +3424,7 @@ done: if(obj_paths) H5MM_xfree(obj_paths); - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* H5F__start_swmr_write() */ @@ -3626,9 +3433,6 @@ done: * * Purpose: Private version of H5Fformat_convert * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * * Return: Success: SUCCEED * Failure: FAIL *------------------------------------------------------------------------- @@ -3639,7 +3443,7 @@ H5F__format_convert(H5F_t *f) hbool_t mark_dirty = FALSE; /* Whether to mark the file's superblock dirty */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* Sanity check */ HDassert(f); @@ -3682,6 +3486,6 @@ H5F__format_convert(H5F_t *f) HGOTO_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, FAIL, "unable to mark superblock as dirty") done: - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* H5F__format_convert() */ diff --git a/src/H5Fmount.c b/src/H5Fmount.c index 4cd1edf..b04bd3a 100644 --- a/src/H5Fmount.c +++ b/src/H5Fmount.c @@ -112,7 +112,7 @@ H5F__mount(H5G_loc_t *loc, const char *name, H5F_t *child, hid_t H5_ATTR_UNUSED H5G_loc_t root_loc; /* Group location of root of file to mount */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE HDassert(loc); HDassert(name && *name); @@ -240,7 +240,7 @@ done: } } - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5F__mount() */ @@ -277,7 +277,7 @@ H5F__unmount(H5G_loc_t *loc, const char *name) int child_idx; /* Index of child in parent's mtab */ herr_t ret_value = SUCCEED; /*return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE HDassert(loc); HDassert(name && *name); @@ -390,7 +390,7 @@ done: if(mp_loc_setup) H5G_loc_free(&mp_loc); - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5F__unmount() */ @@ -651,7 +651,7 @@ H5F_flush_mounts_recurse(H5F_t *f) nerrors++; /* Call the "real" flush routine, for this file */ - if(H5F__flush_real(f) < 0) + if(H5F__flush(f) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTFLUSH, FAIL, "unable to flush file's cached information") /* Check flush errors for children - errors are already on the stack */ diff --git a/src/H5Fpkg.h b/src/H5Fpkg.h index 2ab41de..2e8a793 100644 --- a/src/H5Fpkg.h +++ b/src/H5Fpkg.h @@ -396,16 +396,11 @@ H5FL_EXTERN(H5F_file_t); /* General routines */ H5_DLL H5F_t *H5F__new(H5F_file_t *shared, unsigned flags, hid_t fcpl_id, hid_t fapl_id, H5FD_t *lf); H5_DLL herr_t H5F__dest(H5F_t *f, hbool_t flush); -H5_DLL H5F_t *H5F__create(const char *filename, unsigned flags, hid_t fcpl_id, hid_t fapl_id); -H5_DLL H5F_t *H5F__open(const char *filename, unsigned flags, hid_t fcpl_id, hid_t fapl_id); -H5_DLL herr_t H5F__flush(H5F_t *f, H5F_scope_t scope); -H5_DLL herr_t H5F__flush_real(H5F_t *f); +H5_DLL herr_t H5F__flush(H5F_t *f); H5_DLL htri_t H5F__is_hdf5(const char *name); H5_DLL herr_t H5F_get_objects(const H5F_t *f, unsigned types, size_t max_index, hid_t *obj_id_list, hbool_t app_ref, size_t *obj_id_count_ptr); -H5_DLL herr_t H5F__get_freespace(H5F_t *f, hsize_t *tot_space); H5_DLL ssize_t H5F__get_file_image(H5F_t *f, void *buf_ptr, size_t buf_len); H5_DLL herr_t H5F__get_info(H5F_t *f, H5F_info2_t *finfo); -H5_DLL ssize_t H5F__get_free_sections(H5F_t *f, H5FD_mem_t type, size_t nsects, H5F_sect_info_t *sect_info); H5_DLL herr_t H5F__get_metadata_read_retry_info(H5F_t *file, H5F_retry_info_t *info); H5_DLL herr_t H5F__format_convert(H5F_t *f); H5_DLL herr_t H5F__start_swmr_write(H5F_t *f); @@ -400,10 +400,10 @@ H5Gcreate_anon(hid_t loc_id, hid_t gcpl_id, hid_t gapl_id) HDmemset(&gcrt_info.cache, 0, sizeof(gcrt_info.cache)); /* Create the new group & get its ID */ - if(NULL == (grp = H5G__create_anon(loc.oloc->file, &gcrt_info))) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, H5I_INVALID_HID, "unable to create group") + if(NULL == (grp = H5G__create(loc.oloc->file, &gcrt_info))) + HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, H5I_INVALID_HID, "unable to create group") if((ret_value = H5I_register(H5I_GROUP, grp, TRUE)) < 0) - HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register group") + HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register group") done: /* Release the group's object header, if it was created */ @@ -509,10 +509,11 @@ H5Gget_create_plist(hid_t group_id) /* Check args */ if(NULL == (group = (H5G_t *)H5I_object_verify(group_id, H5I_GROUP))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a group") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a group") - if((ret_value = H5G__get_create_plist(group)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5I_INVALID_HID, "can't get group's creation property list") + /* Retrieve the GCPL */ + if((ret_value = H5G_get_create_plist(group)) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5I_INVALID_HID, "can't get group's creation property list") done: FUNC_LEAVE_API(ret_value) @@ -554,7 +555,7 @@ H5Gget_info(hid_t grp_id, H5G_info_t *grp_info) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location") /* Retrieve the group's information */ - if(H5G__get_info(&loc, grp_info/*out*/) < 0) + if(H5G__obj_info(loc.oloc, grp_info) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info") done: @@ -722,9 +723,9 @@ H5Gflush(hid_t group_id) if(H5CX_set_loc(group_id) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set collective metadata read info") - /* Flush group's metadata to file */ - if(H5G__flush(grp, group_id) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTFLUSH, FAIL, "unable to flush group") + /* Flush metadata to file */ + if(H5O_flush_common(&grp->oloc, group_id) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTFLUSH, FAIL, "unable to flush group and object flush callback") done: FUNC_LEAVE_API(ret_value) @@ -761,7 +762,7 @@ H5Grefresh(hid_t group_id) HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set collective metadata read info") /* Call private function to refresh group object */ - if((H5G__refresh(grp, group_id)) < 0) + if((H5O_refresh_metadata(group_id, grp->oloc)) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, FAIL, "unable to refresh group") done: diff --git a/src/H5Gdeprec.c b/src/H5Gdeprec.c index f6c6d8f..57bbcd9 100644 --- a/src/H5Gdeprec.c +++ b/src/H5Gdeprec.c @@ -76,24 +76,11 @@ static herr_t H5G__link(hid_t cur_loc_id, const char *cur_name, H5G_link_t type, hid_t new_loc_id, const char *new_name, hid_t lcpl_id); static herr_t H5G__move(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *dst_name, hid_t lcpl_id); -static herr_t H5G__unlink(H5G_loc_t *loc, const char *name); -static herr_t H5G__get_linkval(const H5G_loc_t *loc, const char *name, size_t size, - char *buf/*out*/); -static herr_t H5G__set_comment(const H5G_loc_t *loc, const char *name, - const char *comment); -static int H5G__get_comment(const H5G_loc_t *loc, const char *name, char *buf, - size_t bufsize); -static herr_t H5G__iterate(hid_t loc_id, const char *name, H5_index_t idx_type, - H5_iter_order_t order, hsize_t idx, hsize_t *last_lnk, - const H5G_link_iterate_t *lnk_op, void *op_data); -static herr_t H5G__get_num_objs(const H5O_loc_t *oloc, H5G_info_t *grp_info); static herr_t H5G__get_objinfo_cb(H5G_loc_t *grp_loc/*in*/, const char *name, const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/, H5G_own_loc_t *own_loc/*out*/); static herr_t H5G__get_objinfo(const H5G_loc_t *loc, const char *name, hbool_t follow_link, H5G_stat_t *statbuf/*out*/); -static ssize_t H5G__get_objname_by_idx(const H5O_loc_t *oloc, H5_index_t idx_type, - H5_iter_order_t order, hsize_t idx, char *name, size_t size); static H5G_obj_t H5G__obj_get_type_by_idx(H5O_loc_t *oloc, hsize_t idx); #endif /* H5_NO_DEPRECATED_SYMBOLS */ @@ -197,9 +184,9 @@ H5Gcreate1(hid_t loc_id, const char *name, size_t size_hint) /* Check arguments */ if(H5G_loc(loc_id, &loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location") if(!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name given") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name given") /* Check if we need to create a non-standard GCPL */ if(size_hint > 0) { @@ -238,7 +225,7 @@ H5Gcreate1(hid_t loc_id, const char *name, size_t size_hint) if(NULL == (grp = H5G__create_named(&loc, name, H5P_LINK_CREATE_DEFAULT, tmp_gcpl))) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group") if((ret_value = H5I_register(H5I_GROUP, grp, TRUE)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTREGISTER, FAIL, "unable to register group") + HGOTO_ERROR(H5E_SYM, H5E_CANTREGISTER, FAIL, "unable to register group") done: if(tmp_gcpl > 0 && tmp_gcpl != H5P_GROUP_CREATE_DEFAULT) @@ -321,9 +308,9 @@ H5Glink(hid_t cur_loc_id, H5G_link_t type, const char *cur_name, const char *new /* Check arguments */ if(!cur_name || !*cur_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no current name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no current name specified") if(!new_name || !*new_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no new name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no new name specified") /* Set up collective metadata if appropriate */ if(H5CX_set_loc(cur_loc_id) < 0) @@ -357,9 +344,9 @@ H5Glink2(hid_t cur_loc_id, const char *cur_name, H5G_link_t type, /* Check arguments */ if(!cur_name || !*cur_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no current name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no current name specified") if(!new_name || !*new_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no new name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no new name specified") /* Set up collective metadata if appropriate */ if(H5CX_set_loc(cur_loc_id) < 0) @@ -393,7 +380,7 @@ H5G__link(hid_t cur_loc_id, const char *cur_name, H5G_link_t type, H5G_loc_t new_loc; /* Information about new link's group */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_STATIC_VOL + FUNC_ENTER_STATIC /* Create the appropriate kind of link */ if(type == H5L_TYPE_HARD) { @@ -441,7 +428,7 @@ H5G__link(hid_t cur_loc_id, const char *cur_name, H5G_link_t type, HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "Not a valid link type") done: - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5G__link() */ @@ -531,7 +518,7 @@ H5G__move(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, H5G_loc_t dst_loc, *dst_loc_p; /* Group info for destination location */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_STATIC_VOL + FUNC_ENTER_STATIC /* Check arguments */ if(src_loc_id != H5L_SAME_LOC && H5G_loc(src_loc_id, &src_loc) < 0) @@ -553,10 +540,10 @@ H5G__move(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, /* Move the link */ if(H5L_move(src_loc_p, src_name, dst_loc_p, dst_name, FALSE, lcpl_id) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTMOVE, FAIL, "unable to move link") + HGOTO_ERROR(H5E_SYM, H5E_CANTMOVE, FAIL, "unable to move link") done: - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5G__move() */ @@ -578,16 +565,16 @@ H5Gunlink(hid_t loc_id, const char *name) /* Check arguments */ if(H5G_loc(loc_id, &loc) < 0) - HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, FAIL, "not a location") + HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, FAIL, "not a location") if(!name || !*name) - HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "no name") + HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "no name") /* Set up collective metadata if appropriate */ if(H5CX_set_loc(loc_id) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set collective metadata read info") - /* Call internal routine */ - if(H5G__unlink(&loc, name) < 0) + /* Call H5L routine... */ + if(H5L_delete(&loc, name) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "couldn't delete link") done: @@ -596,37 +583,6 @@ done: /*------------------------------------------------------------------------- - * Function: H5G__unlink - * - * Purpose: Internal version of H5Gunlink. - * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * - * Return: Non-negative on success / Negative on failure - * - * Programmer: Quincey Koziol - * Saturday, December 23, 2017 - * - *------------------------------------------------------------------------- - */ -static herr_t -H5G__unlink(H5G_loc_t *loc, const char *name) -{ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_STATIC_VOL - - /* Call H5L routine... */ - if(H5L_delete(loc, name) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "couldn't delete link") - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* end H5G__unlink() */ - - -/*------------------------------------------------------------------------- * Function: H5Gget_linkval * * Purpose: Retrieve's a soft link's data. The new API is @@ -645,53 +601,21 @@ H5Gget_linkval(hid_t loc_id, const char *name, size_t size, char *buf/*out*/) /* Check arguments */ if(H5G_loc(loc_id, &loc)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location") if(!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified") /* Set up collective metadata if appropriate */ if(H5CX_set_loc(loc_id) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set collective metadata read info") - /* Call internal routine */ - if(H5G__get_linkval(&loc, name, size, buf) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "couldn't delete link") - -done: - FUNC_LEAVE_API(ret_value) -} /* end H5Gget_linkval() */ - - -/*------------------------------------------------------------------------- - * Function: H5G__get_linkval - * - * Purpose: Internal version of H5Gget_linkval. - * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * - * Return: Non-negative on success / Negative on failure - * - * Programmer: Quincey Koziol - * Saturday, December 23, 2017 - * - *------------------------------------------------------------------------- - */ -static herr_t -H5G__get_linkval(const H5G_loc_t *loc, const char *name, size_t size, - char *buf/*out*/) -{ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_STATIC_VOL - /* Call the link routine which provides this capability */ - if(H5L_get_val(loc, name, buf, size) < 0) + if(H5L_get_val(&loc, name, buf, size) < 0) HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "couldn't get link info") done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* end H5G__get_linkval() */ + FUNC_LEAVE_API(ret_value) +} /* end H5Gget_linkval() */ /*------------------------------------------------------------------------- @@ -721,17 +645,17 @@ H5Gset_comment(hid_t loc_id, const char *name, const char *comment) H5TRACE3("e", "i*s*s", loc_id, name, comment); if(H5G_loc(loc_id, &loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location") if(!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified") /* Set up collective metadata if appropriate */ if(H5CX_set_loc(loc_id) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set collective metadata read info") - /* Call internal routine */ - if(H5G__set_comment(&loc, name, comment) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "unable to set comment value") + /* Call the common routine which provides this capability */ + if(H5G_loc_set_comment(&loc, name, comment) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "unable to set comment value") done: FUNC_LEAVE_API(ret_value) @@ -739,37 +663,6 @@ done: /*------------------------------------------------------------------------- - * Function: H5G__set_comment - * - * Purpose: Internal version of H5Gset_comment. - * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * - * Return: Non-negative on success / Negative on failure - * - * Programmer: Quincey Koziol - * Saturday, December 23, 2017 - * - *------------------------------------------------------------------------- - */ -static herr_t -H5G__set_comment(const H5G_loc_t *loc, const char *name, const char *comment) -{ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_STATIC_VOL - - /* Call the common routine which provides this capability */ - if(H5G_loc_set_comment(loc, name, comment) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "unable to set comment value") - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* end H5G__set_comment() */ - - -/*------------------------------------------------------------------------- * Function: H5Gget_comment * * Purpose: Return at most BUFSIZE characters of the comment for the @@ -802,19 +695,19 @@ H5Gget_comment(hid_t loc_id, const char *name, size_t bufsize, char *buf) H5TRACE4("Is", "i*sz*s", loc_id, name, bufsize, buf); if(H5G_loc(loc_id, &loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location") if(!name || !*name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified") if(bufsize > 0 && !buf) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no buffer specified") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no buffer specified") /* Set up collective metadata if appropriate */ if(H5CX_set_loc(loc_id) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTSET, FAIL, "can't set collective metadata read info") - /* Call internal routine */ - if((ret_value = H5G__get_comment(&loc, name, buf, bufsize)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get comment value") + /* Call the common routine which provides this capability */ + if((ret_value = (int)H5G_loc_get_comment(&loc, name, buf, bufsize)) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get comment value") done: FUNC_LEAVE_API(ret_value) @@ -822,38 +715,6 @@ done: /*------------------------------------------------------------------------- - * Function: H5G__get_comment - * - * Purpose: Internal version of H5Gget_comment. - * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * - * Return: Non-negative on success / Negative on failure - * - * Programmer: Quincey Koziol - * Saturday, December 23, 2017 - * - *------------------------------------------------------------------------- - */ -static int -H5G__get_comment(const H5G_loc_t *loc, const char *name, char *buf, - size_t bufsize) -{ - int ret_value = FAIL; /* Return value */ - - FUNC_ENTER_STATIC_VOL - - /* Call the common routine which provides this capability */ - if((ret_value = (int)H5G_loc_get_comment(loc, name, buf, bufsize)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get comment value") - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* end H5G__get_comment() */ - - -/*------------------------------------------------------------------------- * Function: H5Giterate * * Purpose: Iterates over the entries of a group. The LOC_ID and NAME @@ -905,8 +766,8 @@ H5Giterate(hid_t loc_id, const char *name, int *idx_p, H5G_iterate_t op, lnk_op.op_type = H5G_LINK_OP_OLD; lnk_op.op_func.op_old = op; - /* Call private function. */ - if((ret_value = H5G__iterate(loc_id, name, H5_INDEX_NAME, H5_ITER_INC, idx, &last_obj, &lnk_op, op_data)) < 0) + /* Call the common routine which provides this capability */ + if((ret_value = H5G_iterate(loc_id, name, H5_INDEX_NAME, H5_ITER_INC, idx, &last_obj, &lnk_op, op_data)) < 0) HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "group iteration failed") /* Set the index we stopped at */ @@ -919,39 +780,6 @@ done: /*------------------------------------------------------------------------- - * Function: H5G__iterate - * - * Purpose: Internal version of H5Giterate. - * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * - * Return: Non-negative on success / Negative on failure - * - * Programmer: Quincey Koziol - * Saturday, December 23, 2017 - * - *------------------------------------------------------------------------- - */ -static herr_t -H5G__iterate(hid_t loc_id, const char *name, H5_index_t idx_type, - H5_iter_order_t order, hsize_t idx, hsize_t *last_lnk, - const H5G_link_iterate_t *lnk_op, void *op_data) -{ - herr_t ret_value = FAIL; /* Return value */ - - FUNC_ENTER_STATIC_VOL - - /* Call the common routine which provides this capability */ - if((ret_value = H5G_iterate(loc_id, name, idx_type, order, idx, last_lnk, lnk_op, op_data)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "group iteration failed") - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* end H5G__iterate() */ - - -/*------------------------------------------------------------------------- * Function: H5Gget_num_objs * * Purpose: Returns the number of objects in the group. It iterates @@ -970,22 +798,27 @@ done: herr_t H5Gget_num_objs(hid_t loc_id, hsize_t *num_objs) { - H5G_loc_t loc; /* Location of object */ - H5G_info_t grp_info; /* Group information */ - herr_t ret_value = SUCCEED; + H5G_loc_t loc; /* Location of object */ + H5G_info_t grp_info; /* Group information */ + H5O_type_t obj_type; /* Type of object at location */ + herr_t ret_value = SUCCEED; FUNC_ENTER_API(FAIL) H5TRACE2("e", "i*h", loc_id, num_objs); /* Check args */ if(H5G_loc(loc_id, &loc) < 0) - HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, FAIL, "not a location ID") + HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, FAIL, "not a location ID") + if(H5O_obj_type(loc.oloc, &obj_type) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get object type") + if(obj_type != H5O_TYPE_GROUP) + HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, FAIL, "not a group") if(!num_objs) - HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "bad pointer to # of objects") + HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "bad pointer to # of objects") - /* Call the internal routine */ - if(H5G__get_num_objs(loc.oloc, &grp_info) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTCOUNT, FAIL, "can't determine") + /* Retrieve information about the group */ + if(H5G__obj_info(loc.oloc, &grp_info) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTCOUNT, FAIL, "can't determine # of objects") /* Set the number of objects [sic: links] in the group */ *num_objs = grp_info.nlinks; @@ -996,44 +829,6 @@ done: /*------------------------------------------------------------------------- - * Function: H5G__get_num_objs - * - * Purpose: Internal version of H5Gget_num_objs. - * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * - * Return: Non-negative on success / Negative on failure - * - * Programmer: Quincey Koziol - * Saturday, December 23, 2017 - * - *------------------------------------------------------------------------- - */ -static herr_t -H5G__get_num_objs(const H5O_loc_t *oloc, H5G_info_t *grp_info) -{ - H5O_type_t obj_type; /* Type of object at location */ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_STATIC_VOL - - /* Check args */ - if(H5O_obj_type(oloc, &obj_type) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get object type") - if(obj_type != H5O_TYPE_GROUP) - HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, FAIL, "not a group") - - /* Retrieve information about the group */ - if(H5G__obj_info(oloc, grp_info) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTCOUNT, FAIL, "can't determine # of objects") - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* end H5G__get_num_objs() */ - - -/*------------------------------------------------------------------------- * Function: H5Gget_objinfo * * Purpose: Returns information about an object. If FOLLOW_LINK is @@ -1062,13 +857,13 @@ H5Gget_objinfo(hid_t loc_id, const char *name, hbool_t follow_link, /* Check arguments */ if(H5G_loc(loc_id, &loc) < 0) - HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, FAIL, "not a location") + HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, FAIL, "not a location") if(!name || !*name) - HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "no name specified") + HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "no name specified") /* Get info */ if(H5G__get_objinfo(&loc, name, follow_link, statbuf) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "cannot stat object") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "cannot stat object") done: FUNC_LEAVE_API(ret_value) @@ -1177,7 +972,7 @@ H5G__get_objinfo(const H5G_loc_t *loc, const char *name, hbool_t follow_link, H5G_trav_goi_t udata; /* User data for callback */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_STATIC_VOL + FUNC_ENTER_STATIC /* Sanity checks */ HDassert(loc); @@ -1220,7 +1015,7 @@ H5G__get_objinfo(const H5G_loc_t *loc, const char *name, hbool_t follow_link, } /* end if */ done: - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5G__get_objinfo() */ @@ -1250,62 +1045,28 @@ done: ssize_t H5Gget_objname_by_idx(hid_t loc_id, hsize_t idx, char *name, size_t size) { - H5G_loc_t loc; /* Object location */ - ssize_t ret_value; + H5G_loc_t loc; /* Object location */ + H5O_type_t obj_type; /* Type of object at location */ + ssize_t ret_value; FUNC_ENTER_API(FAIL) H5TRACE4("Zs", "ih*sz", loc_id, idx, name, size); /* Check args */ if(H5G_loc(loc_id, &loc) < 0) - HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, FAIL, "not a location ID") - - /* Call internal function */ - if((ret_value = H5G__get_objname_by_idx(loc.oloc, H5_INDEX_NAME, H5_ITER_INC, idx, name, size)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, FAIL, "can't get object name") - -done: - FUNC_LEAVE_API(ret_value) -} /* end H5Gget_objname_by_idx() */ - - -/*------------------------------------------------------------------------- - * Function: H5G__get_objname_by_idx - * - * Purpose: Internal version of H5Gget_objname_by_idx. - * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * - * Return: Non-negative on success / Negative on failure - * - * Programmer: Quincey Koziol - * Saturday, December 23, 2017 - * - *------------------------------------------------------------------------- - */ -static ssize_t -H5G__get_objname_by_idx(const H5O_loc_t *oloc, H5_index_t idx_type, - H5_iter_order_t order, hsize_t idx, char *name, size_t size) -{ - H5O_type_t obj_type; /* Type of object at location */ - ssize_t ret_value = FAIL; /* Return value */ - - FUNC_ENTER_STATIC_VOL - - /* Check args */ - if(H5O_obj_type(oloc, &obj_type) < 0) + HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, FAIL, "not a location ID") + if(H5O_obj_type(loc.oloc, &obj_type) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get object type") if(obj_type != H5O_TYPE_GROUP) HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, FAIL, "not a group") /* Call common routine */ - if((ret_value = H5G_obj_get_name_by_idx(oloc, idx_type, order, idx, name, size)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get object name") + if((ret_value = H5G_obj_get_name_by_idx(loc.oloc, H5_INDEX_NAME, H5_ITER_INC, idx, name, size)) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get object name") done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* end H5G__get_objname_by_idx() */ + FUNC_LEAVE_API(ret_value) +} /* end H5Gget_objname_by_idx() */ /*------------------------------------------------------------------------- @@ -1334,11 +1095,11 @@ H5Gget_objtype_by_idx(hid_t loc_id, hsize_t idx) /* Check args */ if(H5G_loc(loc_id, &loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5G_UNKNOWN, "not a location ID") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5G_UNKNOWN, "not a location ID") /* Call internal function*/ if(H5G_UNKNOWN == (ret_value = H5G__obj_get_type_by_idx(loc.oloc, idx))) - HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, H5G_UNKNOWN, "can't get object type") + HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, H5G_UNKNOWN, "can't get object type") done: FUNC_LEAVE_API(ret_value) @@ -1368,7 +1129,7 @@ H5G__obj_get_type_by_idx(H5O_loc_t *oloc, hsize_t idx) H5O_type_t obj_type; /* Type of object at location */ H5G_obj_t ret_value = H5G_UNKNOWN; /* Return value */ - FUNC_ENTER_STATIC_VOL_TAG(oloc->addr) + FUNC_ENTER_STATIC_TAG(oloc->addr) /* Sanity check */ HDassert(oloc); @@ -1401,7 +1162,7 @@ H5G__obj_get_type_by_idx(H5O_loc_t *oloc, hsize_t idx) } /* end else */ done: - FUNC_LEAVE_NOAPI_VOL_TAG(ret_value) + FUNC_LEAVE_NOAPI_TAG(ret_value) } /* end H5G__obj_get_type_by_idx() */ #endif /* H5_NO_DEPRECATED_SYMBOLS */ diff --git a/src/H5Gint.c b/src/H5Gint.c index 3b5de44..8fd7514 100644 --- a/src/H5Gint.c +++ b/src/H5Gint.c @@ -134,7 +134,7 @@ H5G__create_named(const H5G_loc_t *loc, const char *name, hid_t lcpl_id, H5G_obj_create_t gcrt_info; /* Information for group creation */ H5G_t *ret_value = NULL; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* Check arguments */ HDassert(loc); @@ -161,48 +161,11 @@ H5G__create_named(const H5G_loc_t *loc, const char *name, hid_t lcpl_id, ret_value = (H5G_t *)ocrt_info.new_obj; done: - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5G__create_named() */ /*------------------------------------------------------------------------- - * Function: H5G__create_anon - * - * Purpose: Internal routine to create a new anonymous group. - * - * Note: This routine is needed so that there's a non-API routine for - * creating groups that can set up VOL / SWMR info - * (which need a DXPL). - * - * Return: Success: Non-NULL, pointer to new group object. - * Failure: NULL - * - * Programmer: Quincey Koziol - * December 17, 2017 - * - *------------------------------------------------------------------------- - */ -H5G_t * -H5G__create_anon(H5F_t *file, H5G_obj_create_t *gcrt_info) -{ - H5G_t *ret_value = NULL; /* Return value */ - - FUNC_ENTER_PACKAGE_VOL - - /* Check arguments */ - HDassert(file); - HDassert(gcrt_info); - - /* Create the new group & get its ID */ - if(NULL == (ret_value = H5G__create(file, gcrt_info))) - HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, NULL, "unable to create group") - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* end H5G__create_anon() */ - - -/*------------------------------------------------------------------------- * Function: H5G__create * * Purpose: Creates a new empty group with the specified name. The name @@ -302,7 +265,7 @@ H5G__open_name(const H5G_loc_t *loc, const char *name) H5O_type_t obj_type; /* Type of object at location */ H5G_t *ret_value = NULL; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* Check args */ HDassert(loc); @@ -336,7 +299,7 @@ done: if(loc_found && H5G_loc_free(&grp_loc) < 0) HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, NULL, "can't free location") - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5G__open_name() */ @@ -502,7 +465,7 @@ H5G__close_cb(H5G_t *grp) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* Check args */ HDassert(grp && grp->shared); @@ -513,7 +476,7 @@ H5G__close_cb(H5G_t *grp) HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEOBJ, FAIL, "problem closing group") done: - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5G__close_cb() */ @@ -1239,44 +1202,6 @@ done: /*------------------------------------------------------------------------- - * Function: H5G__get_create_plist - * - * Purpose: Internal routine to retrieve a group's creation property list. - * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * - * Return: Success: ID for a copy of the group creation property - * list. The property list ID should be released - * by calling H5Pclose(). - * - * Failure: H5I_INVALID_HID - * - * Programmer: Quincey Koziol - * December 17, 2017 - * - *------------------------------------------------------------------------- - */ -hid_t -H5G__get_create_plist(const H5G_t *grp) -{ - hid_t ret_value = H5I_INVALID_HID; /* Return value */ - - FUNC_ENTER_PACKAGE_VOL - - /* Check arguments */ - HDassert(grp); - - /* Retrieve the GCPL */ - if((ret_value = H5G_get_create_plist(grp)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5I_INVALID_HID, "can't get group's creation property list") - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* end H5G__get_create_plist() */ - - -/*------------------------------------------------------------------------- * Function: H5G_get_create_plist * * Purpose: Private function for H5Gget_create_plist @@ -1372,51 +1297,11 @@ done: /*------------------------------------------------------------------------- - * Function: H5G__get_info - * - * Purpose: Internal routine to retrieve the info for a group. - * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * - * Return: Success: Non-negative - * Failure: Negative - * - * Programmer: Quincey Koziol - * December 18, 2017 - * - *------------------------------------------------------------------------- - */ -herr_t -H5G__get_info(const H5G_loc_t *loc, H5G_info_t *grp_info) -{ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_PACKAGE_VOL - - /* Check arguments */ - HDassert(loc); - HDassert(grp_info); - - /* Retrieve the group's information */ - if(H5G__obj_info(loc->oloc, grp_info) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info") - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* end H5G__get_info() */ - - -/*------------------------------------------------------------------------- * Function: H5G__get_info_by_name * * Purpose: Internal routine to retrieve the info for a group, by name. * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * - * Return: Success: Non-negative - * Failure: Negative + * Return: SUCCEED/FAIL * * Programmer: Quincey Koziol * December 18, 2017 @@ -1432,7 +1317,7 @@ H5G__get_info_by_name(const H5G_loc_t *loc, const char *name, H5G_info_t *grp_in hbool_t loc_found = FALSE; /* Location at 'name' found */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* Check arguments */ HDassert(loc); @@ -1457,7 +1342,7 @@ done: if(loc_found && H5G_loc_free(&grp_loc) < 0) HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't free location") - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5G__get_info_by_name() */ @@ -1466,11 +1351,7 @@ done: * * Purpose: Internal routine to retrieve the info for a group, by index. * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * - * Return: Success: Non-negative - * Failure: Negative + * Return: SUCCEED/FAIL * * Programmer: Quincey Koziol * December 18, 2017 @@ -1487,7 +1368,7 @@ H5G__get_info_by_idx(const H5G_loc_t *loc, const char *group_name, hbool_t loc_found = FALSE; /* Location at 'name' found */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* Check arguments */ HDassert(loc); @@ -1512,76 +1393,6 @@ done: if(loc_found && H5G_loc_free(&grp_loc) < 0) HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't free location") - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5G__get_info_by_idx() */ - -/*------------------------------------------------------------------------- - * Function: H5G__flush - * - * Purpose: Internal routine to flushes a group to disk. - * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * - * Return: Success: Non-negative - * Failure: Negative - * - * Programmer: Quincey Koziol - * December 18, 2017 - * - *------------------------------------------------------------------------- - */ -herr_t -H5G__flush(H5G_t *grp, hid_t group_id) -{ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_PACKAGE_VOL - - /* Sanity check */ - HDassert(grp); - - /* Flush metadata to file */ - if(H5O_flush_common(&grp->oloc, group_id) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTFLUSH, FAIL, "unable to flush group and object flush callback") - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* H5G__flush */ - - -/*------------------------------------------------------------------------- - * Function: H5G__refresh - * - * Purpose: Internal routine to refresh a group. - * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * - * Return: Success: Non-negative - * Failure: Negative - * - * Programmer: Quincey Koziol - * December 18, 2017 - * - *------------------------------------------------------------------------- - */ -herr_t -H5G__refresh(H5G_t *grp, hid_t group_id) -{ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_PACKAGE_VOL - - /* Sanity check */ - HDassert(grp); - - /* Call private function to refresh group object */ - if((H5O_refresh_metadata(group_id, grp->oloc)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, FAIL, "unable to refresh group") - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* H5G__refresh */ - diff --git a/src/H5Gpkg.h b/src/H5Gpkg.h index f0a9aea..b89777d 100644 --- a/src/H5Gpkg.h +++ b/src/H5Gpkg.h @@ -331,16 +331,11 @@ H5FL_EXTERN(H5G_shared_t); H5_DLL H5G_t *H5G__create(H5F_t *file, H5G_obj_create_t *gcrt_info); H5_DLL H5G_t *H5G__create_named(const H5G_loc_t *loc, const char *name, hid_t lcpl_id, hid_t gcpl_id); -H5_DLL H5G_t *H5G__create_anon(H5F_t *file, H5G_obj_create_t *gcrt_info); H5_DLL H5G_t *H5G__open_name(const H5G_loc_t *loc, const char *name); -H5_DLL hid_t H5G__get_create_plist(const H5G_t *grp); -H5_DLL herr_t H5G__get_info(const H5G_loc_t *loc, H5G_info_t *grp_info); H5_DLL herr_t H5G__get_info_by_name(const H5G_loc_t *loc, const char *name, H5G_info_t *grp_info); H5_DLL herr_t H5G__get_info_by_idx(const H5G_loc_t *loc, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5G_info_t *grp_info); -H5_DLL herr_t H5G__flush(H5G_t *grp, hid_t group_id); -H5_DLL herr_t H5G__refresh(H5G_t *grp, hid_t group_id); H5_DLL herr_t H5G__close_cb(H5G_t *grp); /* @@ -128,7 +128,6 @@ static int H5I__inc_type_ref(H5I_type_t type); static int H5I__get_type_ref(H5I_type_t type); static int H5I__search_cb(void *obj, hid_t id, void *_udata); static H5I_id_info_t *H5I__find_id(hid_t id); -static ssize_t H5I__get_name(const H5G_loc_t *loc, char *name, size_t size); #ifdef H5I_DEBUG_OUTPUT static int H5I__debug_cb(void *_item, void *_key, void *_udata); static herr_t H5I__debug(H5I_type_t type); @@ -2021,8 +2020,8 @@ H5Iget_name(hid_t id, char *name/*out*/, size_t size) if(H5G_loc(id, &loc) < 0) HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, (-1), "can't retrieve object location") - /* Call internal routine to retrieve object's name */ - if((ret_value = H5I__get_name(&loc, name, size)) < 0) + /* Retrieve object's name */ + if((ret_value = H5G_get_name(&loc, name, size, NULL)) < 0) HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, (-1), "can't retrieve object name") done: @@ -2031,41 +2030,6 @@ done: /*------------------------------------------------------------------------- - * Function: H5I__get_name - * - * Purpose: Internal routine to retrieve the name for an object - * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * - * Return: Success: The length of the name - * Failure: -1 - * - * Programmer: Quincey Koziol - * January 9, 2018 - * - *------------------------------------------------------------------------- - */ -static ssize_t -H5I__get_name(const H5G_loc_t *loc, char *name, size_t size) -{ - ssize_t ret_value = -1; /* Return value */ - - FUNC_ENTER_STATIC_VOL - - /* Check arguments */ - HDassert(loc); - - /* Retrieve object's name */ - if((ret_value = H5G_get_name(loc, name, size, NULL)) < 0) - HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, (-1), "can't retrieve object name") - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* end H5I__get_name() */ - - -/*------------------------------------------------------------------------- * Function: H5Iget_file_id * * Purpose: The public version of H5I_get_file_id(), obtains the file @@ -102,16 +102,10 @@ static herr_t H5L__link_cb(H5G_loc_t *grp_loc/*in*/, const char *name, static herr_t H5L__create_real(const H5G_loc_t *link_loc, const char *link_name, H5G_name_t *obj_path, H5F_t *obj_file, H5O_link_t *lnk, H5O_obj_create_t *ocrt_info, hid_t lcpl_id); -static herr_t H5L__create_hard(H5G_loc_t *cur_loc, const char *cur_name, - const H5G_loc_t *link_loc, const char *link_name, hid_t lcpl_id); -static herr_t H5L__create_soft(const char *target_path, const H5G_loc_t *link_loc, - const char *link_name, hid_t lcpl_id); static herr_t H5L__get_val_real(const H5O_link_t *lnk, void *buf, size_t size); static herr_t H5L__get_val_cb(H5G_loc_t *grp_loc/*in*/, const char *name, const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/, H5G_own_loc_t *own_loc/*out*/); -static herr_t H5L__get_val(const H5G_loc_t *loc, const char *name, - void *buf/*out*/, size_t size); static herr_t H5L__get_val_by_idx_cb(H5G_loc_t *grp_loc/*in*/, const char *name, const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/, H5G_own_loc_t *own_loc/*out*/); @@ -121,7 +115,6 @@ static herr_t H5L__get_val_by_idx(const H5G_loc_t *loc, const char *name, static herr_t H5L__delete_cb(H5G_loc_t *grp_loc/*in*/, const char *name, const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/, H5G_own_loc_t *own_loc/*out*/); -static herr_t H5L__delete(const H5G_loc_t *loc, const char *name); static herr_t H5L__delete_by_idx_cb(H5G_loc_t *grp_loc/*in*/, const char *name, const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/, H5G_own_loc_t *own_loc/*out*/); @@ -133,8 +126,6 @@ static herr_t H5L__move_cb(H5G_loc_t *grp_loc/*in*/, const char *name, static herr_t H5L__move_dest_cb(H5G_loc_t *grp_loc/*in*/, const char *name, const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/, H5G_own_loc_t *own_loc/*out*/); -static herr_t H5L__move(const H5G_loc_t *src_loc, const char *src_name, - H5G_loc_t *dst_loc, const char *dst_name, hbool_t copy_flag, hid_t lcpl_id); static herr_t H5L__exists_final_cb(H5G_loc_t *grp_loc/*in*/, const char *name, const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/, H5G_own_loc_t *own_loc/*out*/); @@ -145,8 +136,6 @@ static htri_t H5L__exists(const H5G_loc_t *loc, const char *name); static herr_t H5L__get_info_cb(H5G_loc_t *grp_loc/*in*/, const char *name, const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/, H5G_own_loc_t *own_loc/*out*/); -static herr_t H5L__get_info(const H5G_loc_t *loc, const char *name, - H5L_info_t *linfo/*out*/); static herr_t H5L__get_info_by_idx_cb(H5G_loc_t *grp_loc/*in*/, const char *name, const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/, H5G_own_loc_t *own_loc/*out*/); @@ -162,10 +151,6 @@ static ssize_t H5L__get_name_by_idx(const H5G_loc_t *loc, const char *group_name static herr_t H5L__iterate(hid_t grp_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t *idx_p, H5L_iterate_t op, void *op_data); -static herr_t H5L__visit(hid_t grp_id, const char *group_name, - H5_index_t idx_type, H5_iter_order_t order, H5L_iterate_t op, - void *op_data); - /*********************/ /* Package Variables */ @@ -338,8 +323,8 @@ H5Lmove(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, dst_loc_p = src_loc_p; /* Move the link */ - if(H5L__move(src_loc_p, src_name, dst_loc_p, dst_name, FALSE, lcpl_id) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTMOVE, FAIL, "unable to move link") + if(H5L_move(src_loc_p, src_name, dst_loc_p, dst_name, FALSE, lcpl_id) < 0) + HGOTO_ERROR(H5E_LINK, H5E_CANTMOVE, FAIL, "unable to move link") done: FUNC_LEAVE_API(ret_value) @@ -400,8 +385,8 @@ H5Lcopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, dst_loc_p = src_loc_p; /* Copy the link */ - if(H5L__move(src_loc_p, src_name, dst_loc_p, dst_name, TRUE, lcpl_id) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTMOVE, FAIL, "unable to move link") + if(H5L_move(src_loc_p, src_name, dst_loc_p, dst_name, TRUE, lcpl_id) < 0) + HGOTO_ERROR(H5E_LINK, H5E_CANTMOVE, FAIL, "unable to move link") done: FUNC_LEAVE_API(ret_value) @@ -451,8 +436,8 @@ H5Lcreate_soft(const char *link_target, hid_t link_loc_id, HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info") /* Create the link */ - if(H5L__create_soft(link_target, &link_loc, link_name, lcpl_id) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTCREATE, FAIL, "unable to create link") + if(H5L_create_soft(link_target, &link_loc, link_name, lcpl_id) < 0) + HGOTO_ERROR(H5E_LINK, H5E_CANTCREATE, FAIL, "unable to create link") done: FUNC_LEAVE_API(ret_value) @@ -516,8 +501,8 @@ H5Lcreate_hard(hid_t cur_loc_id, const char *cur_name, HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "source and destination should be in the same file.") /* Create the link */ - if(H5L__create_hard(cur_loc_p, cur_name, new_loc_p, new_name, lcpl_id) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTCREATE, FAIL, "unable to create link") + if(H5L_create_hard(cur_loc_p, cur_name, new_loc_p, new_name, lcpl_id) < 0) + HGOTO_ERROR(H5E_LINK, H5E_CANTCREATE, FAIL, "unable to create link") done: FUNC_LEAVE_API(ret_value) @@ -617,8 +602,8 @@ H5Ldelete(hid_t loc_id, const char *name, hid_t lapl_id) HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info") /* Unlink */ - if(H5L__delete(&loc, name) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "unable to delete link") + if(H5L_delete(&loc, name) < 0) + HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "unable to delete link") done: FUNC_LEAVE_API(ret_value) @@ -670,7 +655,7 @@ H5Ldelete_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, /* Delete the link */ if(H5L__delete_by_idx(&loc, group_name, idx_type, order, n) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "unable to delete link") + HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "unable to delete link") done: FUNC_LEAVE_API(ret_value) @@ -717,8 +702,8 @@ H5Lget_val(hid_t loc_id, const char *name, void *buf/*out*/, size_t size, HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info") /* Get the link value */ - if(H5L__get_val(&loc, name, buf, size) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get link value for '%s'", name) + if(H5L_get_val(&loc, name, buf, size) < 0) + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get link value for '%s'", name) done: FUNC_LEAVE_API(ret_value) @@ -854,8 +839,8 @@ H5Lget_info(hid_t loc_id, const char *name, H5L_info_t *linfo /*out*/, HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info") /* Get the link information */ - if(H5L__get_info(&loc, name, linfo) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get link info") + if(H5L_get_info(&loc, name, linfo) < 0) + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get link info") done: FUNC_LEAVE_API(ret_value) @@ -904,7 +889,7 @@ H5Lget_info_by_idx(hid_t loc_id, const char *group_name, /* Get the link information */ if(H5L__get_info_by_idx(&loc, group_name, idx_type, order, n, linfo) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get link info") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get link info") done: FUNC_LEAVE_API(ret_value) @@ -1087,7 +1072,7 @@ H5Lget_name_by_idx(hid_t loc_id, const char *group_name, /* Get the link information */ if((ret_value = H5L__get_name_by_idx(&loc, group_name, idx_type, order, n, name, size)) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get link name") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get link name") done: FUNC_LEAVE_API(ret_value) @@ -1135,7 +1120,7 @@ H5Literate(hid_t grp_id, H5_index_t idx_type, H5_iter_order_t order, /* Iterate over the links */ if((ret_value = H5L__iterate(grp_id, ".", idx_type, order, idx_p, op, op_data)) < 0) - HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "link iteration failed") + HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "link iteration failed") done: FUNC_LEAVE_API(ret_value) @@ -1191,7 +1176,7 @@ H5Literate_by_name(hid_t loc_id, const char *group_name, /* Iterate over the links */ if((ret_value = H5L__iterate(loc_id, group_name, idx_type, order, idx_p, op, op_data)) < 0) - HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "link iteration failed") + HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "link iteration failed") done: FUNC_LEAVE_API(ret_value) @@ -1248,8 +1233,8 @@ H5Lvisit(hid_t grp_id, H5_index_t idx_type, H5_iter_order_t order, HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no callback operator specified") /* Call internal routine */ - if((ret_value = H5L__visit(grp_id, ".", idx_type, order, op, op_data)) < 0) - HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "link visitation failed") + if((ret_value = H5G_visit(grp_id, ".", idx_type, order, op, op_data)) < 0) + HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "link visitation failed") done: FUNC_LEAVE_API(ret_value) @@ -1309,8 +1294,8 @@ H5Lvisit_by_name(hid_t loc_id, const char *group_name, H5_index_t idx_type, HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info") /* Call internal routine */ - if((ret_value = H5L__visit(loc_id, group_name, idx_type, order, op, op_data)) < 0) - HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "link visitation failed") + if((ret_value = H5G_visit(loc_id, group_name, idx_type, order, op, op_data)) < 0) + HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "link visitation failed") done: FUNC_LEAVE_API(ret_value) @@ -1895,45 +1880,6 @@ done: /*------------------------------------------------------------------------- - * Function: H5L__create_hard - * - * Purpose: Internal routine to create a hard link - * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * - * Return: Success: Non-negative - * Failure: Negative - * - * Programmer: Quincey Koziol - * December 25, 2017 - * - *------------------------------------------------------------------------- - */ -static herr_t -H5L__create_hard(H5G_loc_t *cur_loc, const char *cur_name, - const H5G_loc_t *link_loc, const char *link_name, hid_t lcpl_id) -{ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_STATIC_VOL - - /* Check arguments */ - HDassert(cur_loc); - HDassert(cur_name); - HDassert(link_loc); - HDassert(link_name); - - /* Create the link */ - if(H5L_create_hard(cur_loc, cur_name, link_loc, link_name, lcpl_id) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTCREATE, FAIL, "unable to create link") - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* end H5L__create_hard() */ - - -/*------------------------------------------------------------------------- * Function: H5L_create_soft * * Purpose: Creates a soft link from LINK_NAME to TARGET_PATH. @@ -1982,44 +1928,6 @@ done: /*------------------------------------------------------------------------- - * Function: H5L__create_soft - * - * Purpose: Internal routine to create a soft link - * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * - * Return: Success: Non-negative - * Failure: Negative - * - * Programmer: Quincey Koziol - * December 25, 2017 - * - *------------------------------------------------------------------------- - */ -static herr_t -H5L__create_soft(const char *target_path, const H5G_loc_t *link_loc, - const char *link_name, hid_t lcpl_id) -{ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_STATIC_VOL - - /* Check arguments */ - HDassert(target_path); - HDassert(link_loc); - HDassert(link_name); - - /* Create the link */ - if(H5L_create_soft(target_path, link_loc, link_name, lcpl_id) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTCREATE, FAIL, "unable to create link") - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* end H5L__create_soft() */ - - -/*------------------------------------------------------------------------- * Function: H5L__create_ud * * Purpose: Creates a user-defined link. See H5Lcreate_ud for @@ -2039,7 +1947,7 @@ H5L__create_ud(const H5G_loc_t *link_loc, const char *link_name, H5O_link_t lnk; /* Link to insert */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* Check args */ HDassert(type >= H5L_TYPE_UD_MIN && type <= H5L_TYPE_MAX); @@ -2073,7 +1981,7 @@ done: /* Free the link's udata buffer if it's been allocated */ H5MM_xfree(lnk.u.ud.udata); - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5L__create_ud() */ @@ -2216,42 +2124,6 @@ done: /*------------------------------------------------------------------------- - * Function: H5L__get_val - * - * Purpose: Internal routine to query a link value - * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * - * Return: Success: Non-negative - * Failure: Negative - * - * Programmer: Quincey Koziol - * December 27, 2017 - * - *------------------------------------------------------------------------- - */ -static herr_t -H5L__get_val(const H5G_loc_t *loc, const char *name, void *buf/*out*/, size_t size) -{ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_STATIC_VOL - - /* Check arguments */ - HDassert(loc); - HDassert(name && *name); - - /* Get the link value */ - if(H5L_get_val(loc, name, buf, size) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get link value for '%s'", name) - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* end H5L__get_val() */ - - -/*------------------------------------------------------------------------- * Function: H5L__get_val_by_idx_cb * * Purpose: Callback for retrieving a link's value according to an @@ -2308,9 +2180,6 @@ done: * Purpose: Internal routine to query a link value according to the * index within a group * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * * Return: Success: Non-negative * Failure: Negative * @@ -2326,7 +2195,7 @@ H5L__get_val_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type, H5L_trav_gvbi_t udata; /* User data for callback */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_STATIC_VOL + FUNC_ENTER_STATIC /* Check arguments */ HDassert(loc); @@ -2344,7 +2213,7 @@ H5L__get_val_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type, HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "can't get link info for index: %llu", (unsigned long long)n) done: - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5L__get_val_by_idx() */ @@ -2439,42 +2308,6 @@ done: /*------------------------------------------------------------------------- - * Function: H5L__delete - * - * Purpose: Internal routine to delete a link - * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * - * Return: Success: Non-negative - * Failure: Negative - * - * Programmer: Quincey Koziol - * December 27, 2017 - * - *------------------------------------------------------------------------- - */ -static herr_t -H5L__delete(const H5G_loc_t *loc, const char *name) -{ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_STATIC_VOL - - /* Check arguments */ - HDassert(loc); - HDassert(name && *name); - - /* Delete the link */ - if(H5L_delete(loc, name) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "unable to delete link: %s", name) - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* end H5L__delete() */ - - -/*------------------------------------------------------------------------- * Function: H5L__delete_by_idx_cb * * Purpose: Callback for removing a link according to an index's order. @@ -2519,9 +2352,6 @@ done: * Purpose: Internal routine to delete a link according to its index * within a group. * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * * Return: Success: Non-negative * Failure: Negative * @@ -2537,7 +2367,7 @@ H5L__delete_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type, H5L_trav_rmbi_t udata; /* User data for callback */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_STATIC_VOL + FUNC_ENTER_STATIC /* Check arguments */ HDassert(loc); @@ -2553,8 +2383,8 @@ H5L__delete_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type, HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "link doesn't exist") done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* end H5L__delete() */ + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5L__delete_by_idx() */ /*------------------------------------------------------------------------- @@ -2864,45 +2694,6 @@ done: /*------------------------------------------------------------------------- - * Function: H5L__move - * - * Purpose: Internal routine to move / copy a link - * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * - * Return: Success: Non-negative - * Failure: Negative - * - * Programmer: Quincey Koziol - * December 25, 2017 - * - *------------------------------------------------------------------------- - */ -static herr_t -H5L__move(const H5G_loc_t *src_loc, const char *src_name, H5G_loc_t *dst_loc, - const char *dst_name, hbool_t copy_flag, hid_t lcpl_id) -{ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_STATIC_VOL - - /* Check arguments */ - HDassert(src_loc); - HDassert(src_name); - HDassert(dst_loc); - HDassert(dst_name); - - /* Move the link */ - if(H5L_move(src_loc, src_name, dst_loc, dst_name, copy_flag, lcpl_id) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTMOVE, FAIL, "unable to move link") - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* end H5L__move() */ - - -/*------------------------------------------------------------------------- * Function: H5L__exists_final_cb * * Purpose: Callback for checking whether a link exists, as the final @@ -3083,7 +2874,7 @@ H5L__exists(const H5G_loc_t *loc, const char *name) H5L_trav_le_t udata; /* User data for traversal */ htri_t ret_value = FAIL; /* Return value */ - FUNC_ENTER_STATIC_VOL + FUNC_ENTER_STATIC /* A path of "/" will always exist in a file */ if(0 == HDstrcmp(name, "/")) @@ -3098,7 +2889,7 @@ H5L__exists(const H5G_loc_t *loc, const char *name) ret_value = (htri_t)udata.exists; done: - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* H5L__exists() */ @@ -3173,42 +2964,6 @@ done: /*------------------------------------------------------------------------- - * Function: H5L__get_info - * - * Purpose: Internal routine to retrieve link info - * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * - * Return: Success: Non-negative - * Failure: Negative - * - * Programmer: Quincey Koziol - * December 27, 2017 - * - *------------------------------------------------------------------------- - */ -static herr_t -H5L__get_info(const H5G_loc_t *loc, const char *name, H5L_info_t *linfo/*out*/) -{ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_STATIC_VOL - - /* Check arguments */ - HDassert(loc); - HDassert(name && *name); - - /* Get the link information */ - if(H5L_get_info(loc, name, linfo) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get link info for: '%s'", name) - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* end H5L__get_info() */ - - -/*------------------------------------------------------------------------- * Function: H5L__get_info_by_idx_cb * * Purpose: Callback for retrieving a link's metadata according to an @@ -3265,9 +3020,6 @@ done: * Purpose: Internal routine to retrieve link info according to an * index's order. * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * * Return: Success: Non-negative * Failure: Negative * @@ -3283,7 +3035,7 @@ H5L__get_info_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type H5L_trav_gibi_t udata; /* User data for callback */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_STATIC_VOL + FUNC_ENTER_STATIC /* Check arguments */ HDassert(loc); @@ -3298,10 +3050,10 @@ H5L__get_info_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type /* Traverse the group hierarchy to locate the object to get info about */ if(H5G_traverse(loc, name, H5G_TARGET_SLINK | H5G_TARGET_UDLINK, H5L__get_info_by_idx_cb, &udata) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get link info") + HGOTO_ERROR(H5E_LINK, H5E_CANTGET, FAIL, "unable to get link info") done: - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5L__get_info_by_idx() */ @@ -3351,9 +3103,6 @@ done: * Purpose: Internal routine to retrieve link name according to an * index's order. * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * * Return: Success: Non-negative * Failure: Negative * @@ -3370,7 +3119,7 @@ H5L__get_name_by_idx(const H5G_loc_t *loc, const char *group_name, H5L_trav_gnbi_t udata; /* User data for callback */ ssize_t ret_value = FAIL; /* Return value */ - FUNC_ENTER_STATIC_VOL + FUNC_ENTER_STATIC /* Check arguments */ HDassert(loc); @@ -3392,7 +3141,7 @@ H5L__get_name_by_idx(const H5G_loc_t *loc, const char *group_name, ret_value = udata.name_len; done: - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5L__get_name_by_idx() */ @@ -3401,9 +3150,6 @@ done: * * Purpose: Internal routine to iterate over links * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * * Return: Success: Non-negative * Failure: Negative * @@ -3421,7 +3167,7 @@ H5L__iterate(hid_t grp_id, const char *group_name, H5_index_t idx_type, hsize_t idx; /* Internal location to hold index */ herr_t ret_value = FAIL; /* Return value */ - FUNC_ENTER_STATIC_VOL + FUNC_ENTER_STATIC /* Check arguments */ HDassert(group_name); @@ -3444,48 +3190,11 @@ H5L__iterate(hid_t grp_id, const char *group_name, H5_index_t idx_type, *idx_p = last_lnk; done: - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5L__iterate() */ /*------------------------------------------------------------------------- - * Function: H5L__visit - * - * Purpose: Internal routine to visit links - * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * - * Return: Success: Non-negative - * Failure: Negative - * - * Programmer: Quincey Koziol - * December 28, 2017 - * - *------------------------------------------------------------------------- - */ -static herr_t -H5L__visit(hid_t grp_id, const char *group_name, H5_index_t idx_type, - H5_iter_order_t order, H5L_iterate_t op, void *op_data) -{ - herr_t ret_value = FAIL; /* Return value */ - - FUNC_ENTER_STATIC_VOL - - /* Check arguments */ - HDassert(group_name); - HDassert(op); - - /* Call internal group visitation routine */ - if((ret_value = H5G_visit(grp_id, group_name, idx_type, order, op, op_data)) < 0) - HGOTO_ERROR(H5E_LINK, H5E_BADITER, FAIL, "link visitation failed") - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* end H5L__visit() */ - - -/*------------------------------------------------------------------------- * Function: H5L__link_copy_file * * Purpose: Copy a link and the object it points to from one file to @@ -116,7 +116,7 @@ H5Oopen(hid_t loc_id, const char *name, hid_t lapl_id) HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info") /* Open the object */ - if((ret_value = H5O__open_name(&loc, name)) < 0) + if((ret_value = H5O_open_name(&loc, name, TRUE)) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open object") done: @@ -292,9 +292,9 @@ H5Olink(hid_t obj_id, hid_t new_loc_id, const char *new_name, hid_t lcpl_id, if(H5CX_set_apl(&lapl_id, H5P_CLS_LACC, obj_id, TRUE) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info") - /* Create a link to the object */ - if(H5O__create_link(&new_loc, new_name, &obj_loc, lcpl_id) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to create link") + /* Link to the object */ + if(H5L_link(&new_loc, new_name, &obj_loc, lcpl_id) < 0) + HGOTO_ERROR(H5E_OHDR, H5E_CANTCREATE, FAIL, "unable to create link") done: FUNC_LEAVE_API(ret_value) @@ -339,7 +339,7 @@ H5Oincr_refcount(hid_t object_id) HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info") /* Change the object's refcount */ - if(H5O__link(oloc, 1) < 0) + if(H5O_link(oloc, 1) < 0) HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "modifying object link count failed") done: @@ -385,7 +385,7 @@ H5Odecr_refcount(hid_t object_id) HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info") /* Change the object's refcount */ - if(H5O__link(oloc, -1) < 0) + if(H5O_link(oloc, -1) < 0) HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "modifying object link count failed") done: @@ -426,7 +426,7 @@ H5Oexists_by_name(hid_t loc_id, const char *name, hid_t lapl_id) HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info") /* Check if the object exists */ - if((ret_value = H5O__exists_by_name(&loc, name)) < 0) + if((ret_value = H5G_loc_exists(&loc, name)) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to determine if '%s' exists", name) done: @@ -467,7 +467,7 @@ H5Oget_info2(hid_t loc_id, H5O_info_t *oinfo, unsigned fields) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fields") /* Retrieve the object's information */ - if(H5O__get_info_by_name(&loc, ".", oinfo/*out*/, fields) < 0) + if(H5G_loc_info(&loc, ".", oinfo/*out*/, fields) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get info for object") done: @@ -515,7 +515,7 @@ H5Oget_info_by_name2(hid_t loc_id, const char *name, H5O_info_t *oinfo, HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info") /* Retrieve the object's information */ - if(H5O__get_info_by_name(&loc, name, oinfo/*out*/, fields) < 0) + if(H5G_loc_info(&loc, name, oinfo/*out*/, fields) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get info for object: '%s'", name) done: @@ -612,7 +612,7 @@ H5Oset_comment(hid_t obj_id, const char *comment) HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set collective metadata read info") /* (Re)set the object's comment */ - if(H5O__set_comment_by_name(&loc, ".", comment) < 0) + if(H5G_loc_set_comment(&loc, ".", comment) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set comment for object") done: @@ -658,7 +658,7 @@ H5Oset_comment_by_name(hid_t loc_id, const char *name, const char *comment, HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info") /* (Re)set the object's comment */ - if(H5O__set_comment_by_name(&loc, name, comment) < 0) + if(H5G_loc_set_comment(&loc, name, comment) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set comment for object: '%s'", name) done: @@ -696,7 +696,7 @@ H5Oget_comment(hid_t obj_id, char *comment, size_t bufsize) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location") /* Retrieve the object's comment */ - if((ret_value = H5O__get_comment_by_name(&loc, ".", comment/*out*/, bufsize)) < 0) + if((ret_value = H5G_loc_get_comment(&loc, ".", comment/*out*/, bufsize)) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get comment for object") done: @@ -741,7 +741,7 @@ H5Oget_comment_by_name(hid_t loc_id, const char *name, char *comment, size_t buf HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info") /* Retrieve the object's comment */ - if((ret_value = H5O__get_comment_by_name(&loc, name, comment/*out*/, bufsize)) < 0) + if((ret_value = H5G_loc_get_comment(&loc, name, comment/*out*/, bufsize)) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get comment for object: '%s'", name) done: diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c index 2e628f4..b57eaf6 100644 --- a/src/H5Ocopy.c +++ b/src/H5Ocopy.c @@ -242,9 +242,6 @@ done: * * Purpose: Internal routine to copy an object * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * * Return: Success: Non-negative * Failure: Negative * @@ -265,7 +262,7 @@ H5O__copy(const H5G_loc_t *loc, const char *src_name, H5G_loc_t *dst_loc, hbool_t obj_open = FALSE; /* Entry at 'name' found */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_STATIC_VOL + FUNC_ENTER_STATIC /* Check arguments */ HDassert(loc); @@ -322,7 +319,7 @@ done: if(obj_open && H5O_close(&src_oloc, NULL) < 0) HDONE_ERROR(H5E_OHDR, H5E_CLOSEERROR, FAIL, "unable to release object header") - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5O__copy() */ diff --git a/src/H5Odeprec.c b/src/H5Odeprec.c index 876579d..c73529e 100644 --- a/src/H5Odeprec.c +++ b/src/H5Odeprec.c @@ -31,9 +31,10 @@ /***********/ /* Headers */ /***********/ -#include "H5private.h" /* Generic Functions */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5Opkg.h" /* Object headers */ +#include "H5private.h" /* Generic Functions */ +#include "H5CXprivate.h" /* API Contexts */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Opkg.h" /* Object headers */ /****************/ @@ -100,8 +101,8 @@ H5Oget_info1(hid_t loc_id, H5O_info_t *oinfo) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no info struct") /* Retrieve the object's information */ - if(H5O__get_info_by_name(&loc, ".", oinfo/*out*/, H5O_INFO_ALL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get info for object") + if(H5G_loc_info(&loc, ".", oinfo/*out*/, H5O_INFO_ALL) < 0) + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve object info") done: FUNC_LEAVE_API(ret_value) @@ -140,7 +141,7 @@ H5Oget_info_by_name1(hid_t loc_id, const char *name, H5O_info_t *oinfo, hid_t la HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set access property list info") /* Retrieve the object's information */ - if(H5O__get_info_by_name(&loc, name, oinfo/*out*/, H5O_INFO_ALL) < 0) + if(H5G_loc_info(&loc, name, oinfo/*out*/, H5O_INFO_ALL) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get info for object: '%s'", name) done: diff --git a/src/H5Oflush.c b/src/H5Oflush.c index e8e077e..d8c9530 100644 --- a/src/H5Oflush.c +++ b/src/H5Oflush.c @@ -49,7 +49,6 @@ static herr_t H5O__flush(hid_t obj_id); static herr_t H5O__oh_tag(const H5O_loc_t *oloc, haddr_t *tag); static herr_t H5O__refresh_metadata_close(hid_t oid, H5O_loc_t oloc, H5G_loc_t *obj_loc); -static herr_t H5O__refresh(hid_t obj_id); /*************/ @@ -133,9 +132,6 @@ done: * * Purpose: Internal routine to flush an object * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * * Return: Success: Non-negative * Failure: Negative * @@ -152,7 +148,7 @@ H5O__flush(hid_t obj_id) const H5O_obj_class_t *obj_class; /* Class of object */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_STATIC_VOL + FUNC_ENTER_STATIC /* Check args */ if(NULL == (oloc = H5O_get_loc(obj_id))) @@ -175,7 +171,7 @@ H5O__flush(hid_t obj_id) HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to flush object and object flush callback") done: - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5O__flush() */ @@ -235,17 +231,22 @@ done: herr_t H5Orefresh(hid_t oid) { - herr_t ret_value = SUCCEED; /* Return value */ + H5O_loc_t *oloc; /* object location */ + herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_API(FAIL) H5TRACE1("e", "i", oid); + /* Check args */ + if(NULL == (oloc = H5O_get_loc(oid))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an object") + /* Set up collective metadata if appropriate */ if(H5CX_set_loc(oid) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set access property list info") /* Call internal routine */ - if(H5O__refresh(oid) < 0) + if(H5O_refresh_metadata(oid, *oloc) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to refresh object") done: @@ -460,40 +461,3 @@ done: FUNC_LEAVE_NOAPI(ret_value); } /* end H5O_refresh_metadata_reopen() */ - -/*------------------------------------------------------------------------- - * Function: H5O__refresh - * - * Purpose: Internal routine to refresh an object - * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * - * Return: Success: Non-negative - * Failure: Negative - * - * Programmer: Quincey Koziol - * December 29, 2017 - * - *------------------------------------------------------------------------- - */ -static herr_t -H5O__refresh(hid_t obj_id) -{ - H5O_loc_t *oloc; /* Object location */ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_STATIC_VOL - - /* Check args */ - if(NULL == (oloc = H5O_get_loc(obj_id))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an object") - - /* Private function */ - if(H5O_refresh_metadata(obj_id, *oloc) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to refresh object") - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* end H5O__refresh() */ - diff --git a/src/H5Oint.c b/src/H5Oint.c index 2752a25..49d7835 100644 --- a/src/H5Oint.c +++ b/src/H5Oint.c @@ -565,49 +565,10 @@ done: /*------------------------------------------------------------------------- - * Function: H5O__open_name - * - * Purpose: Internal routine to open an object by name - * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * - * Return: Success: Non-negative - * Failure: Negative - * - * Programmer: Quincey Koziol - * December 28, 2017 - * - *------------------------------------------------------------------------- - */ -hid_t -H5O__open_name(const H5G_loc_t *loc, const char *name) -{ - hid_t ret_value = H5I_INVALID_HID; /* Return value */ - - FUNC_ENTER_PACKAGE_VOL - - /* Check arguments */ - HDassert(loc); - HDassert(name); - - /* Open the object */ - if((ret_value = H5O_open_name(loc, name, TRUE)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object") - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* end H5O__open_name() */ - - -/*------------------------------------------------------------------------- * Function: H5O__open_by_idx * * Purpose: Internal routine to open an object by index within group * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * * Return: Success: Non-negative * Failure: Negative * @@ -626,7 +587,7 @@ H5O__open_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type, hbool_t loc_found = FALSE; /* Entry at 'name' found */ hid_t ret_value = H5I_INVALID_HID; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* Check arguments */ HDassert(loc); @@ -651,7 +612,7 @@ done: if(H5G_loc_free(&obj_loc) < 0) HDONE_ERROR(H5E_OHDR, H5E_CANTRELEASE, H5I_INVALID_HID, "can't free location") - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5O__open_by_idx() */ @@ -660,9 +621,6 @@ done: * * Purpose: Internal routine to open an object by its address * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * * Return: Success: Non-negative * Failure: Negative * @@ -679,7 +637,7 @@ H5O__open_by_addr(const H5G_loc_t *loc, haddr_t addr) H5O_loc_t obj_oloc; /* Opened object object location */ hid_t ret_value = H5I_INVALID_HID; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* Check arguments */ HDassert(loc); @@ -697,7 +655,7 @@ H5O__open_by_addr(const H5G_loc_t *loc, haddr_t addr) HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open object") done: - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5O__open_by_addr() */ @@ -739,44 +697,6 @@ done: /*------------------------------------------------------------------------- - * Function: H5O__create_link - * - * Purpose: Internal routine to create a link from a group to an object - * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * - * Return: Success: Non-negative - * Failure: Negative - * - * Programmer: Quincey Koziol - * December 28, 2017 - * - *------------------------------------------------------------------------- - */ -herr_t -H5O__create_link(const H5G_loc_t *new_loc, const char *new_name, - H5G_loc_t *obj_loc, hid_t lcpl_id) -{ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_PACKAGE_VOL - - /* Check arguments */ - HDassert(new_loc); - HDassert(new_name && *new_name); - HDassert(obj_loc); - - /* Link to the object */ - if(H5L_link(new_loc, new_name, obj_loc, lcpl_id) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCREATE, FAIL, "unable to create link") - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* end H5O__create_link() */ - - -/*------------------------------------------------------------------------- * Function: H5O_close * * Purpose: Closes an object header that was previously open. @@ -1004,41 +924,6 @@ done: /*------------------------------------------------------------------------- - * Function: H5O__link - * - * Purpose: Internal routine to change the refcount for an object - * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * - * Return: Success: Non-negative - * Failure: Negative - * - * Programmer: Quincey Koziol - * December 28, 2017 - * - *------------------------------------------------------------------------- - */ -herr_t -H5O__link(const H5O_loc_t *oloc, int adjust) -{ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_PACKAGE_VOL - - /* Check arguments */ - HDassert(oloc); - - /* Change the object's refcount */ - if(H5O_link(oloc, adjust) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "modifying object link count failed") - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* end H5O__link() */ - - -/*------------------------------------------------------------------------- * Function: H5O_protect * * Purpose: Wrapper around H5AC_protect for use during a H5O_protect-> @@ -2051,42 +1936,6 @@ done: /*------------------------------------------------------------------------- - * Function: H5O__exists_by_name - * - * Purpose: Internal routine to check if an object exists - * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * - * Return: Success: Non-negative - * Failure: Negative - * - * Programmer: Quincey Koziol - * December 28, 2017 - * - *------------------------------------------------------------------------- - */ -htri_t -H5O__exists_by_name(const H5G_loc_t *loc, const char *name) -{ - htri_t ret_value = FAIL; /* Return value */ - - FUNC_ENTER_PACKAGE_VOL - - /* Check arguments */ - HDassert(loc); - HDassert(name && *name); - - /* Check if the object exists */ - if((ret_value = H5G_loc_exists(loc, name)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to determine if '%s' exists", name) - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* end H5O__exists_by_name() */ - - -/*------------------------------------------------------------------------- * Function: H5O_get_hdr_info * * Purpose: Retrieve the object header information for an object @@ -2342,52 +2191,11 @@ done: /*------------------------------------------------------------------------- - * Function: H5O__get_info_by_name - * - * Purpose: Internal routine to retrieve an object's info - * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * - * Note: Add a parameter "fields" to indicate selection of object info. - * - * Return: Success: Non-negative - * Failure: Negative - * - * Programmer: Quincey Koziol - * December 28, 2017 - * - *------------------------------------------------------------------------- - */ -herr_t -H5O__get_info_by_name(const H5G_loc_t *loc, const char *name, H5O_info_t *oinfo, unsigned fields) -{ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_PACKAGE_VOL - - /* Check arguments */ - HDassert(loc); - HDassert(name && *name); - HDassert(oinfo); - - /* Retrieve the object's information */ - if(H5G_loc_info(loc, name, oinfo/*out*/, fields) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't retrieve object info") - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* end H5O__get_info_by_name() */ - - -/*------------------------------------------------------------------------- * Function: H5O__get_info_by_idx * * Purpose: Internal routine to retrieve an object's info according to * an index within a group. * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). * * Note: Add a parameter "fields" to indicate selection of object info. * @@ -2409,7 +2217,7 @@ H5O__get_info_by_idx(const H5G_loc_t *loc, const char *group_name, H5_index_t id hbool_t loc_found = FALSE; /* Entry at 'name' found */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* Check arguments */ HDassert(loc); @@ -2435,85 +2243,11 @@ done: if(loc_found && H5G_loc_free(&obj_loc) < 0) HDONE_ERROR(H5E_OHDR, H5E_CANTRELEASE, FAIL, "can't free location") - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5O__get_info_by_idx() */ /*------------------------------------------------------------------------- - * Function: H5O__set_comment_by_name - * - * Purpose: Internal routine to set an object's "comment" - * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * - * Return: Success: Non-negative - * Failure: Negative - * - * Programmer: Quincey Koziol - * December 28, 2017 - * - *------------------------------------------------------------------------- - */ -herr_t -H5O__set_comment_by_name(const H5G_loc_t *loc, const char *name, - const char *comment) -{ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_PACKAGE_VOL - - /* Check arguments */ - HDassert(loc); - HDassert(name && *name); - - /* (Re)set the object's comment */ - if(H5G_loc_set_comment(loc, name, comment) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't set comment for object") - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* end H5O__set_comment_by_name() */ - - -/*------------------------------------------------------------------------- - * Function: H5O__get_comment_by_name - * - * Purpose: Internal routine to retrieve an object's "comment" - * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * - * Return: Success: Non-negative - * Failure: Negative - * - * Programmer: Quincey Koziol - * December 28, 2017 - * - *------------------------------------------------------------------------- - */ -ssize_t -H5O__get_comment_by_name(const H5G_loc_t *loc, const char *name, - char *comment, size_t bufsize) -{ - ssize_t ret_value = FAIL; /* Return value */ - - FUNC_ENTER_PACKAGE_VOL - - /* Check arguments */ - HDassert(loc); - HDassert(name && *name); - - /* Retrieve the object's comment */ - if((ret_value = H5G_loc_get_comment(loc, name, comment/*out*/, bufsize)) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't get comment for object") - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* end H5O__get_comment_by_name() */ - - -/*------------------------------------------------------------------------- * Function: H5O_get_create_plist * * Purpose: Retrieve the object creation properties for an object @@ -2893,7 +2627,7 @@ H5O__visit(hid_t loc_id, const char *obj_name, H5_index_t idx_type, hid_t obj_id = (-1); /* ID of object */ herr_t ret_value = FAIL; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* Portably initialize user data struct to zeros */ HDmemset(&udata, 0, sizeof(udata)); @@ -2981,7 +2715,7 @@ done: if(udata.visited) H5SL_destroy(udata.visited, H5O__free_visit_visited, NULL); - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5O__visit() */ diff --git a/src/H5Opkg.h b/src/H5Opkg.h index 616f96b..19d90c5 100644 --- a/src/H5Opkg.h +++ b/src/H5Opkg.h @@ -555,25 +555,14 @@ H5_DLLVAR const H5O_obj_class_t H5O_OBJ_DATASET[1]; H5_DLLVAR const H5O_obj_class_t H5O_OBJ_DATATYPE[1]; /* Package-local function prototypes */ -H5_DLL hid_t H5O__open_name(const H5G_loc_t *loc, const char *name); H5_DLL hid_t H5O__open_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n); H5_DLL hid_t H5O__open_by_addr(const H5G_loc_t *loc, haddr_t addr); H5_DLL hid_t H5O__open_by_loc(const H5G_loc_t *obj_loc, hbool_t app_ref); -H5_DLL herr_t H5O__create_link(const H5G_loc_t *new_loc, const char *new_name, - H5G_loc_t *obj_loc, hid_t lcpl_id); H5_DLL const H5O_obj_class_t *H5O__obj_class(const H5O_loc_t *loc); H5_DLL int H5O__link_oh(H5F_t *f, int adjust, H5O_t *oh, hbool_t *deleted); -H5_DLL herr_t H5O__link(const H5O_loc_t *loc, int adjust); -H5_DLL htri_t H5O__exists_by_name(const H5G_loc_t *loc, const char *name); -H5_DLL herr_t H5O__get_info_by_name(const H5G_loc_t *loc, const char *name, - H5O_info_t *oinfo, unsigned fields); H5_DLL herr_t H5O__get_info_by_idx(const H5G_loc_t *loc, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5O_info_t *oinfo, unsigned fields); -H5_DLL herr_t H5O__set_comment_by_name(const H5G_loc_t *loc, const char *name, - const char *comment); -H5_DLL ssize_t H5O__get_comment_by_name(const H5G_loc_t *loc, const char *name, - char *comment, size_t bufsize); H5_DLL herr_t H5O__visit(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order, H5O_iterate_t op, void *op_data, unsigned fields); H5_DLL herr_t H5O__inc_rc(H5O_t *oh); diff --git a/src/H5Rint.c b/src/H5Rint.c index acf6b56..d2f315b 100644 --- a/src/H5Rint.c +++ b/src/H5Rint.c @@ -230,7 +230,7 @@ H5R__create(void *_ref, H5G_loc_t *loc, const char *name, H5R_type_t ref_type, hbool_t obj_found = FALSE; /* Object location found */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE HDassert(_ref); HDassert(loc); @@ -335,7 +335,7 @@ done: if (obj_found) H5G_loc_free(&obj_loc); - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5R__create() */ @@ -381,7 +381,7 @@ H5R__dereference(H5F_t *file, hid_t oapl_id, H5R_type_t ref_type, H5O_type_t obj_type; /* Type of object */ hid_t ret_value = H5I_INVALID_HID; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE HDassert(_ref); HDassert(ref_type > H5R_BADTYPE && ref_type < H5R_MAXTYPE); @@ -504,7 +504,7 @@ H5R__dereference(H5F_t *file, hid_t oapl_id, H5R_type_t ref_type, } /* end switch */ done: - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5R__dereference() */ @@ -538,7 +538,7 @@ H5R__get_region(H5F_t *file, const void *_ref) uint8_t *buf = NULL; /* Buffer to store serialized selection in */ H5S_t *ret_value; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE HDassert(_ref); HDassert(file); @@ -573,7 +573,7 @@ done: if(buf) H5MM_xfree(buf); - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5R__get_region() */ @@ -607,7 +607,7 @@ H5R__get_obj_type(H5F_t *file, H5R_type_t ref_type, const void *_ref, unsigned rc; /* Reference count of object */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE HDassert(file); HDassert(_ref); @@ -662,7 +662,7 @@ H5R__get_obj_type(H5F_t *file, H5R_type_t ref_type, const void *_ref, HGOTO_ERROR(H5E_REFERENCE, H5E_LINKCOUNT, FAIL, "dereferencing deleted object") done: - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5R__get_obj_type() */ @@ -701,7 +701,7 @@ H5R__get_name(H5F_t *f, hid_t id, H5R_type_t ref_type, const void *_ref, H5O_loc_t oloc; /* Object location describing object for reference */ ssize_t ret_value = -1; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* Check args */ HDassert(f); @@ -763,6 +763,6 @@ done: if (file_id > 0 && H5I_dec_ref(file_id) < 0) HDONE_ERROR(H5E_REFERENCE, H5E_CANTDEC, (-1), "can't decrement ref count of temp ID") - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5R__get_name() */ @@ -3714,7 +3714,7 @@ H5T__close_cb(H5T_t *dt) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_STATIC_VOL + FUNC_ENTER_STATIC /* check args */ HDassert(dt && dt->shared); @@ -3724,7 +3724,7 @@ H5T__close_cb(H5T_t *dt) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTCLOSEOBJ, FAIL, "can't close datatype"); done: - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__close_cb() */ diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c index 1719f8f..649bd2e 100644 --- a/src/H5Tcommit.c +++ b/src/H5Tcommit.c @@ -59,8 +59,6 @@ static herr_t H5T__commit_anon(H5F_t *file, H5T_t *type, hid_t tcpl_id); static hid_t H5T__get_create_plist(const H5T_t *type); static H5T_t *H5T__open_oid(const H5G_loc_t *loc); -static herr_t H5T__flush(H5T_t *dt, hid_t type_id); -static herr_t H5T__refresh(H5T_t *dt, hid_t type_id); /*********************/ @@ -165,7 +163,7 @@ H5T__commit_named(const H5G_loc_t *loc, const char *name, H5T_t *dt, H5T_state_t old_state; /* The state of the datatype before H5T__commit. */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* Sanity checks */ HDassert(loc); @@ -219,7 +217,7 @@ done: } /* end if */ } /* end if */ - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__commit_named() */ @@ -296,7 +294,7 @@ H5T__commit_anon(H5F_t *file, H5T_t *type, hid_t tcpl_id) H5O_loc_t *oloc; /* Object location for datatype */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_STATIC_VOL + FUNC_ENTER_STATIC /* Sanity checks */ HDassert(file); @@ -318,7 +316,7 @@ H5T__commit_anon(H5F_t *file, H5T_t *type, hid_t tcpl_id) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTDEC, FAIL, "unable to decrement refcount on newly created object") done: - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* H5T__commit_anon() */ @@ -667,8 +665,8 @@ H5Tflush(hid_t type_id) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set access property list info") /* Flush metadata for named datatype */ - if(H5T__flush(dt, type_id) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFLUSH, FAIL, "unable to flush datatype") + if(H5O_flush_common(&dt->oloc, type_id) < 0) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFLUSH, FAIL, "unable to flush datatype and object flush callback") done: FUNC_LEAVE_API(ret_value) @@ -707,7 +705,7 @@ H5Trefresh(hid_t type_id) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set access property list info") /* Call private function to refresh datatype object */ - if((H5T__refresh(dt, type_id)) < 0) + if((H5O_refresh_metadata(type_id, dt->oloc)) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTLOAD, FAIL, "unable to refresh datatype") done: @@ -742,7 +740,7 @@ H5T__get_create_plist(const H5T_t *type) hid_t new_tcpl_id = FAIL; /* New datatype creation property list */ hid_t ret_value = FAIL; /* Return value */ - FUNC_ENTER_STATIC_VOL + FUNC_ENTER_STATIC /* Sanity check */ HDassert(type); @@ -770,7 +768,7 @@ done: if(H5I_dec_app_ref(new_tcpl_id) < 0) HDONE_ERROR(H5E_DATATYPE, H5E_CANTDEC, FAIL, "unable to close temporary object") - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__get_create_plist() */ @@ -798,7 +796,7 @@ H5T__open_name(const H5G_loc_t *loc, const char *name) hbool_t obj_found = FALSE; /* Object at 'name' found */ H5T_t *ret_value = NULL; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE /* Sanity check */ HDassert(loc); @@ -836,7 +834,7 @@ done: if(H5G_loc_free(&type_loc) < 0) HDONE_ERROR(H5E_DATATYPE, H5E_CANTRELEASE, NULL, "can't free location") - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__open_name() */ @@ -1040,73 +1038,3 @@ H5T_update_shared(H5T_t *dt) FUNC_LEAVE_NOAPI(SUCCEED) } /* H5T_update_shared() */ - -/*------------------------------------------------------------------------- - * Function: H5T__flush - * - * Purpose: Internal routine to flushes a named datatype to disk. - * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * - * Return: Success: Non-negative - * Failure: Negative - * - * Programmer: Quincey Koziol - * December 18, 2017 - * - *------------------------------------------------------------------------- - */ -static herr_t -H5T__flush(H5T_t *dt, hid_t type_id) -{ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_STATIC_VOL - - /* Sanity check */ - HDassert(dt); - - /* To flush metadata and invoke flush callback if there is */ - if(H5O_flush_common(&dt->oloc, type_id) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFLUSH, FAIL, "unable to flush datatype and object flush callback") - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* H5T__flush */ - - -/*------------------------------------------------------------------------- - * Function: H5T__refresh - * - * Purpose: Internal routine to refresh a named datatype. - * - * Note: This routine is needed so that there's a non-API routine - * that can set up VOL / SWMR info (which need a DXPL). - * - * Return: Success: Non-negative - * Failure: Negative - * - * Programmer: Quincey Koziol - * December 18, 2017 - * - *------------------------------------------------------------------------- - */ -static herr_t -H5T__refresh(H5T_t *dt, hid_t type_id) -{ - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_STATIC_VOL - - /* Sanity check */ - HDassert(dt); - - /* Call private function to refresh datatype object */ - if((H5O_refresh_metadata(type_id, dt->oloc)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTLOAD, FAIL, "unable to refresh datatype") - -done: - FUNC_LEAVE_NOAPI_VOL(ret_value) -} /* H5T__refresh */ - @@ -387,9 +387,9 @@ H5Z__unregister(H5Z_filter_t filter_id) H5Z_object_t object; /* Object to pass to callbacks */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_PACKAGE_VOL + FUNC_ENTER_PACKAGE - HDassert(filter_id>=0 && filter_id<=H5Z_FILTER_MAX); + HDassert(filter_id >= 0 && filter_id <= H5Z_FILTER_MAX); /* Is the filter already registered? */ for (filter_index = 0; filter_index < H5Z_table_used_g; filter_index++) @@ -434,7 +434,7 @@ H5Z__unregister(H5Z_filter_t filter_id) H5Z_table_used_g--; done: - FUNC_LEAVE_NOAPI_VOL(ret_value) + FUNC_LEAVE_NOAPI(ret_value) } /* end H5Z__unregister() */ diff --git a/src/H5private.h b/src/H5private.h index 8974e46..196d001 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -2199,12 +2199,6 @@ H5_DLL herr_t H5CX_pop(void); H5_PUSH_FUNC \ if(H5_PKG_INIT_VAR || !H5_TERM_GLOBAL) { -/* Use this macro for all package-level functions that are VOL entry-points */ -#define FUNC_ENTER_PACKAGE_VOL { \ - FUNC_ENTER_COMMON(H5_IS_PKG(FUNC)); \ - H5_PUSH_FUNC \ - if(H5_PKG_INIT_VAR || !H5_TERM_GLOBAL) { - /* Use this macro for package-level functions which propgate errors, but don't issue them */ #define FUNC_ENTER_PACKAGE_NOERR { \ FUNC_ENTER_COMMON_NOERR(H5_IS_PKG(FUNC)); \ @@ -2221,29 +2215,12 @@ H5_DLL herr_t H5CX_pop(void); H5_PUSH_FUNC \ if(H5_PKG_INIT_VAR || !H5_TERM_GLOBAL) { -/* Use the following macro as replacement for the FUNC_ENTER_PACKAGE - * macro when the function needs to set up a metadata tag and is also a - * VOL entry-point. */ -#define FUNC_ENTER_PACKAGE_VOL_TAG(tag) { \ - haddr_t prev_tag = HADDR_UNDEF; \ - \ - FUNC_ENTER_COMMON(H5_IS_PKG(FUNC)); \ - H5AC_tag(tag, &prev_tag); \ - H5_PUSH_FUNC \ - if(H5_PKG_INIT_VAR || !H5_TERM_GLOBAL) { - /* Use this macro for all "normal" staticly-scoped functions */ #define FUNC_ENTER_STATIC { \ FUNC_ENTER_COMMON(H5_IS_PKG(FUNC)); \ H5_PUSH_FUNC \ if(H5_PKG_INIT_VAR || !H5_TERM_GLOBAL) { -/* Use this macro for all "normal" staticly-scoped functions that are VOL entry-points */ -#define FUNC_ENTER_STATIC_VOL { \ - FUNC_ENTER_COMMON(H5_IS_PKG(FUNC)); \ - H5_PUSH_FUNC \ - if(H5_PKG_INIT_VAR || !H5_TERM_GLOBAL) { - /* Use this macro for staticly-scoped functions which propgate errors, but don't issue them */ #define FUNC_ENTER_STATIC_NOERR { \ FUNC_ENTER_COMMON_NOERR(H5_IS_PKG(FUNC)); \ @@ -2266,17 +2243,6 @@ H5_DLL herr_t H5CX_pop(void); H5_PUSH_FUNC \ if(H5_PKG_INIT_VAR || !H5_TERM_GLOBAL) { -/* Use the following macro as replacement for the FUNC_ENTER_STATIC - * macro when the function needs to set up a metadata tag and is a VOL - * entry-point. */ -#define FUNC_ENTER_STATIC_VOL_TAG(tag) { \ - haddr_t prev_tag = HADDR_UNDEF; \ - \ - FUNC_ENTER_COMMON(H5_IS_PKG(FUNC)); \ - H5AC_tag(tag, &prev_tag); \ - H5_PUSH_FUNC \ - if(H5_PKG_INIT_VAR || !H5_TERM_GLOBAL) { - /*------------------------------------------------------------------------- * Purpose: Register function exit for code profiling. This should be @@ -2331,13 +2297,6 @@ H5_DLL herr_t H5CX_pop(void); return(ret_value); \ } /*end scope from beginning of FUNC_ENTER*/ -#define FUNC_LEAVE_NOAPI_VOL(ret_value) \ - ; \ - } /*end scope from end of FUNC_ENTER*/ \ - H5_POP_FUNC \ - return(ret_value); \ -} /*end scope from beginning of FUNC_ENTER*/ - #define FUNC_LEAVE_NOAPI_VOID \ ; \ } /*end scope from end of FUNC_ENTER*/ \ @@ -2365,15 +2324,6 @@ H5_DLL herr_t H5CX_pop(void); return(ret_value); \ } /*end scope from beginning of FUNC_ENTER*/ -/* Use this macro when exiting a VOL entry-point function that set up a metadata tag */ -#define FUNC_LEAVE_NOAPI_VOL_TAG(ret_value) \ - ; \ - } /*end scope from end of FUNC_ENTER*/ \ - H5AC_tag(prev_tag, NULL); \ - H5_POP_FUNC \ - return(ret_value); \ -} /*end scope from beginning of FUNC_ENTER*/ - /****************************************/ /* Revisions to FUNC_ENTER/LEAVE Macros */ diff --git a/tools/test/h5dump/errfiles/tall-1.err b/tools/test/h5dump/errfiles/tall-1.err index 9733453..f4c2d91 100644 --- a/tools/test/h5dump/errfiles/tall-1.err +++ b/tools/test/h5dump/errfiles/tall-1.err @@ -2,30 +2,27 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): #000: (file name) line (number) in H5Oopen(): unable to open object major: Object header minor: Can't open object - #001: (file name) line (number) in H5O__open_name(): unable to open object - major: Object header - minor: Can't open object - #002: (file name) line (number) in H5O_open_name(): object not found + #001: (file name) line (number) in H5O_open_name(): object not found major: Object header minor: Object not found - #003: (file name) line (number) in H5G_loc_find(): can't find object + #002: (file name) line (number) in H5G_loc_find(): can't find object major: Symbol table minor: Object not found - #004: (file name) line (number) in H5G_traverse(): internal path traversal failed + #003: (file name) line (number) in H5G_traverse(): internal path traversal failed major: Symbol table minor: Object not found - #005: (file name) line (number) in H5G__traverse_real(): special link traversal failed + #004: (file name) line (number) in H5G__traverse_real(): special link traversal failed major: Links minor: Link traversal failure - #006: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed + #005: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed major: Links minor: Link traversal failure - #007: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID + #006: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID major: Symbol table minor: Unable to find atom information (already closed?) - #008: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'somefile' + #007: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'somefile' major: Links minor: Unable to open file - #009: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'somefile', temp_file_name = 'somefile' + #008: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'somefile', temp_file_name = 'somefile' major: File accessibilty minor: Unable to open file diff --git a/tools/test/h5dump/errfiles/tall-2A.err b/tools/test/h5dump/errfiles/tall-2A.err index 9733453..f4c2d91 100644 --- a/tools/test/h5dump/errfiles/tall-2A.err +++ b/tools/test/h5dump/errfiles/tall-2A.err @@ -2,30 +2,27 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): #000: (file name) line (number) in H5Oopen(): unable to open object major: Object header minor: Can't open object - #001: (file name) line (number) in H5O__open_name(): unable to open object - major: Object header - minor: Can't open object - #002: (file name) line (number) in H5O_open_name(): object not found + #001: (file name) line (number) in H5O_open_name(): object not found major: Object header minor: Object not found - #003: (file name) line (number) in H5G_loc_find(): can't find object + #002: (file name) line (number) in H5G_loc_find(): can't find object major: Symbol table minor: Object not found - #004: (file name) line (number) in H5G_traverse(): internal path traversal failed + #003: (file name) line (number) in H5G_traverse(): internal path traversal failed major: Symbol table minor: Object not found - #005: (file name) line (number) in H5G__traverse_real(): special link traversal failed + #004: (file name) line (number) in H5G__traverse_real(): special link traversal failed major: Links minor: Link traversal failure - #006: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed + #005: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed major: Links minor: Link traversal failure - #007: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID + #006: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID major: Symbol table minor: Unable to find atom information (already closed?) - #008: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'somefile' + #007: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'somefile' major: Links minor: Unable to open file - #009: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'somefile', temp_file_name = 'somefile' + #008: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'somefile', temp_file_name = 'somefile' major: File accessibilty minor: Unable to open file diff --git a/tools/test/h5dump/errfiles/tall-2A0.err b/tools/test/h5dump/errfiles/tall-2A0.err index 9733453..f4c2d91 100644 --- a/tools/test/h5dump/errfiles/tall-2A0.err +++ b/tools/test/h5dump/errfiles/tall-2A0.err @@ -2,30 +2,27 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): #000: (file name) line (number) in H5Oopen(): unable to open object major: Object header minor: Can't open object - #001: (file name) line (number) in H5O__open_name(): unable to open object - major: Object header - minor: Can't open object - #002: (file name) line (number) in H5O_open_name(): object not found + #001: (file name) line (number) in H5O_open_name(): object not found major: Object header minor: Object not found - #003: (file name) line (number) in H5G_loc_find(): can't find object + #002: (file name) line (number) in H5G_loc_find(): can't find object major: Symbol table minor: Object not found - #004: (file name) line (number) in H5G_traverse(): internal path traversal failed + #003: (file name) line (number) in H5G_traverse(): internal path traversal failed major: Symbol table minor: Object not found - #005: (file name) line (number) in H5G__traverse_real(): special link traversal failed + #004: (file name) line (number) in H5G__traverse_real(): special link traversal failed major: Links minor: Link traversal failure - #006: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed + #005: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed major: Links minor: Link traversal failure - #007: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID + #006: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID major: Symbol table minor: Unable to find atom information (already closed?) - #008: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'somefile' + #007: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'somefile' major: Links minor: Unable to open file - #009: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'somefile', temp_file_name = 'somefile' + #008: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'somefile', temp_file_name = 'somefile' major: File accessibilty minor: Unable to open file diff --git a/tools/test/h5dump/errfiles/tall-2B.err b/tools/test/h5dump/errfiles/tall-2B.err index 9733453..f4c2d91 100644 --- a/tools/test/h5dump/errfiles/tall-2B.err +++ b/tools/test/h5dump/errfiles/tall-2B.err @@ -2,30 +2,27 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): #000: (file name) line (number) in H5Oopen(): unable to open object major: Object header minor: Can't open object - #001: (file name) line (number) in H5O__open_name(): unable to open object - major: Object header - minor: Can't open object - #002: (file name) line (number) in H5O_open_name(): object not found + #001: (file name) line (number) in H5O_open_name(): object not found major: Object header minor: Object not found - #003: (file name) line (number) in H5G_loc_find(): can't find object + #002: (file name) line (number) in H5G_loc_find(): can't find object major: Symbol table minor: Object not found - #004: (file name) line (number) in H5G_traverse(): internal path traversal failed + #003: (file name) line (number) in H5G_traverse(): internal path traversal failed major: Symbol table minor: Object not found - #005: (file name) line (number) in H5G__traverse_real(): special link traversal failed + #004: (file name) line (number) in H5G__traverse_real(): special link traversal failed major: Links minor: Link traversal failure - #006: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed + #005: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed major: Links minor: Link traversal failure - #007: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID + #006: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID major: Symbol table minor: Unable to find atom information (already closed?) - #008: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'somefile' + #007: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'somefile' major: Links minor: Unable to open file - #009: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'somefile', temp_file_name = 'somefile' + #008: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'somefile', temp_file_name = 'somefile' major: File accessibilty minor: Unable to open file diff --git a/tools/test/h5dump/errfiles/tdset-2.err b/tools/test/h5dump/errfiles/tdset-2.err index d00a92b..e61966f 100644 --- a/tools/test/h5dump/errfiles/tdset-2.err +++ b/tools/test/h5dump/errfiles/tdset-2.err @@ -21,19 +21,16 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): #000: (file name) line (number) in H5Lget_info(): unable to get link info major: Links minor: Can't get value - #001: (file name) line (number) in H5L__get_info(): unable to get link info for: 'dset3' - major: Links - minor: Can't get value - #002: (file name) line (number) in H5L_get_info(): name doesn't exist + #001: (file name) line (number) in H5L_get_info(): name doesn't exist major: Links minor: Object already exists - #003: (file name) line (number) in H5G_traverse(): internal path traversal failed + #002: (file name) line (number) in H5G_traverse(): internal path traversal failed major: Symbol table minor: Object not found - #004: (file name) line (number) in H5G__traverse_real(): traversal operator failed + #003: (file name) line (number) in H5G__traverse_real(): traversal operator failed major: Symbol table minor: Callback failed - #005: (file name) line (number) in H5L__get_info_cb(): name doesn't exist + #004: (file name) line (number) in H5L__get_info_cb(): name doesn't exist major: Links minor: Object not found h5dump error: unable to get link info from "dset3" diff --git a/tools/test/h5dump/errfiles/textlink.err b/tools/test/h5dump/errfiles/textlink.err index 99e8530..4a5f545 100644 --- a/tools/test/h5dump/errfiles/textlink.err +++ b/tools/test/h5dump/errfiles/textlink.err @@ -2,61 +2,55 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): #000: (file name) line (number) in H5Oopen(): unable to open object major: Object header minor: Can't open object - #001: (file name) line (number) in H5O__open_name(): unable to open object - major: Object header - minor: Can't open object - #002: (file name) line (number) in H5O_open_name(): object not found + #001: (file name) line (number) in H5O_open_name(): object not found major: Object header minor: Object not found - #003: (file name) line (number) in H5G_loc_find(): can't find object + #002: (file name) line (number) in H5G_loc_find(): can't find object major: Symbol table minor: Object not found - #004: (file name) line (number) in H5G_traverse(): internal path traversal failed + #003: (file name) line (number) in H5G_traverse(): internal path traversal failed major: Symbol table minor: Object not found - #005: (file name) line (number) in H5G__traverse_real(): special link traversal failed + #004: (file name) line (number) in H5G__traverse_real(): special link traversal failed major: Links minor: Link traversal failure - #006: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed + #005: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed major: Links minor: Link traversal failure - #007: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID + #006: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID major: Symbol table minor: Unable to find atom information (already closed?) - #008: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'filename' + #007: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'filename' major: Links minor: Unable to open file - #009: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'filename', temp_file_name = 'filename' + #008: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'filename', temp_file_name = 'filename' major: File accessibilty minor: Unable to open file HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): #000: (file name) line (number) in H5Oopen(): unable to open object major: Object header minor: Can't open object - #001: (file name) line (number) in H5O__open_name(): unable to open object - major: Object header - minor: Can't open object - #002: (file name) line (number) in H5O_open_name(): object not found + #001: (file name) line (number) in H5O_open_name(): object not found major: Object header minor: Object not found - #003: (file name) line (number) in H5G_loc_find(): can't find object + #002: (file name) line (number) in H5G_loc_find(): can't find object major: Symbol table minor: Object not found - #004: (file name) line (number) in H5G_traverse(): internal path traversal failed + #003: (file name) line (number) in H5G_traverse(): internal path traversal failed major: Symbol table minor: Object not found - #005: (file name) line (number) in H5G__traverse_real(): special link traversal failed + #004: (file name) line (number) in H5G__traverse_real(): special link traversal failed major: Links minor: Link traversal failure - #006: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed + #005: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed major: Links minor: Link traversal failure - #007: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID + #006: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID major: Symbol table minor: Unable to find atom information (already closed?) - #008: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'anotherfile' + #007: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'anotherfile' major: Links minor: Unable to open file - #009: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'anotherfile', temp_file_name = 'anotherfile' + #008: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'anotherfile', temp_file_name = 'anotherfile' major: File accessibilty minor: Unable to open file diff --git a/tools/test/h5dump/errfiles/textlinkfar.err b/tools/test/h5dump/errfiles/textlinkfar.err index a888ba9..1f9241a 100644 --- a/tools/test/h5dump/errfiles/textlinkfar.err +++ b/tools/test/h5dump/errfiles/textlinkfar.err @@ -2,52 +2,49 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): #000: (file name) line (number) in H5Oopen(): unable to open object major: Object header minor: Can't open object - #001: (file name) line (number) in H5O__open_name(): unable to open object - major: Object header - minor: Can't open object - #002: (file name) line (number) in H5O_open_name(): object not found + #001: (file name) line (number) in H5O_open_name(): object not found major: Object header minor: Object not found - #003: (file name) line (number) in H5G_loc_find(): can't find object + #002: (file name) line (number) in H5G_loc_find(): can't find object major: Symbol table minor: Object not found - #004: (file name) line (number) in H5G_traverse(): internal path traversal failed + #003: (file name) line (number) in H5G_traverse(): internal path traversal failed major: Symbol table minor: Object not found - #005: (file name) line (number) in H5G__traverse_real(): special link traversal failed + #004: (file name) line (number) in H5G__traverse_real(): special link traversal failed major: Links minor: Link traversal failure - #006: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed + #005: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed major: Links minor: Link traversal failure - #007: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID + #006: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID major: Symbol table minor: Unable to find atom information (already closed?) - #008: (file name) line (number) in H5L__extern_traverse(): unable to open object + #007: (file name) line (number) in H5L__extern_traverse(): unable to open object major: Links minor: Can't open object - #009: (file name) line (number) in H5O_open_name(): object not found + #008: (file name) line (number) in H5O_open_name(): object not found major: Object header minor: Object not found - #010: (file name) line (number) in H5G_loc_find(): can't find object + #009: (file name) line (number) in H5G_loc_find(): can't find object major: Symbol table minor: Object not found - #011: (file name) line (number) in H5G_traverse(): internal path traversal failed + #010: (file name) line (number) in H5G_traverse(): internal path traversal failed major: Symbol table minor: Object not found - #012: (file name) line (number) in H5G__traverse_real(): special link traversal failed + #011: (file name) line (number) in H5G__traverse_real(): special link traversal failed major: Links minor: Link traversal failure - #013: (file name) line (number) in H5G__traverse_special(): symbolic link traversal failed + #012: (file name) line (number) in H5G__traverse_special(): symbolic link traversal failed major: Links minor: Link traversal failure - #014: (file name) line (number) in H5G__traverse_slink(): unable to follow symbolic link + #013: (file name) line (number) in H5G__traverse_slink(): unable to follow symbolic link major: Symbol table minor: Object not found - #015: (file name) line (number) in H5G__traverse_real(): traversal operator failed + #014: (file name) line (number) in H5G__traverse_real(): traversal operator failed major: Symbol table minor: Callback failed - #016: (file name) line (number) in H5G__traverse_slink_cb(): component not found + #015: (file name) line (number) in H5G__traverse_slink_cb(): component not found major: Symbol table minor: Object not found HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): diff --git a/tools/test/h5dump/errfiles/textlinksrc.err b/tools/test/h5dump/errfiles/textlinksrc.err index a888ba9..1f9241a 100644 --- a/tools/test/h5dump/errfiles/textlinksrc.err +++ b/tools/test/h5dump/errfiles/textlinksrc.err @@ -2,52 +2,49 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): #000: (file name) line (number) in H5Oopen(): unable to open object major: Object header minor: Can't open object - #001: (file name) line (number) in H5O__open_name(): unable to open object - major: Object header - minor: Can't open object - #002: (file name) line (number) in H5O_open_name(): object not found + #001: (file name) line (number) in H5O_open_name(): object not found major: Object header minor: Object not found - #003: (file name) line (number) in H5G_loc_find(): can't find object + #002: (file name) line (number) in H5G_loc_find(): can't find object major: Symbol table minor: Object not found - #004: (file name) line (number) in H5G_traverse(): internal path traversal failed + #003: (file name) line (number) in H5G_traverse(): internal path traversal failed major: Symbol table minor: Object not found - #005: (file name) line (number) in H5G__traverse_real(): special link traversal failed + #004: (file name) line (number) in H5G__traverse_real(): special link traversal failed major: Links minor: Link traversal failure - #006: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed + #005: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed major: Links minor: Link traversal failure - #007: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID + #006: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID major: Symbol table minor: Unable to find atom information (already closed?) - #008: (file name) line (number) in H5L__extern_traverse(): unable to open object + #007: (file name) line (number) in H5L__extern_traverse(): unable to open object major: Links minor: Can't open object - #009: (file name) line (number) in H5O_open_name(): object not found + #008: (file name) line (number) in H5O_open_name(): object not found major: Object header minor: Object not found - #010: (file name) line (number) in H5G_loc_find(): can't find object + #009: (file name) line (number) in H5G_loc_find(): can't find object major: Symbol table minor: Object not found - #011: (file name) line (number) in H5G_traverse(): internal path traversal failed + #010: (file name) line (number) in H5G_traverse(): internal path traversal failed major: Symbol table minor: Object not found - #012: (file name) line (number) in H5G__traverse_real(): special link traversal failed + #011: (file name) line (number) in H5G__traverse_real(): special link traversal failed major: Links minor: Link traversal failure - #013: (file name) line (number) in H5G__traverse_special(): symbolic link traversal failed + #012: (file name) line (number) in H5G__traverse_special(): symbolic link traversal failed major: Links minor: Link traversal failure - #014: (file name) line (number) in H5G__traverse_slink(): unable to follow symbolic link + #013: (file name) line (number) in H5G__traverse_slink(): unable to follow symbolic link major: Symbol table minor: Object not found - #015: (file name) line (number) in H5G__traverse_real(): traversal operator failed + #014: (file name) line (number) in H5G__traverse_real(): traversal operator failed major: Symbol table minor: Callback failed - #016: (file name) line (number) in H5G__traverse_slink_cb(): component not found + #015: (file name) line (number) in H5G__traverse_slink_cb(): component not found major: Symbol table minor: Object not found HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): diff --git a/tools/test/h5dump/errfiles/torderlinks1.err b/tools/test/h5dump/errfiles/torderlinks1.err index 22b4318..648906b 100644 --- a/tools/test/h5dump/errfiles/torderlinks1.err +++ b/tools/test/h5dump/errfiles/torderlinks1.err @@ -2,30 +2,27 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): #000: (file name) line (number) in H5Oopen(): unable to open object major: Object header minor: Can't open object - #001: (file name) line (number) in H5O__open_name(): unable to open object - major: Object header - minor: Can't open object - #002: (file name) line (number) in H5O_open_name(): object not found + #001: (file name) line (number) in H5O_open_name(): object not found major: Object header minor: Object not found - #003: (file name) line (number) in H5G_loc_find(): can't find object + #002: (file name) line (number) in H5G_loc_find(): can't find object major: Symbol table minor: Object not found - #004: (file name) line (number) in H5G_traverse(): internal path traversal failed + #003: (file name) line (number) in H5G_traverse(): internal path traversal failed major: Symbol table minor: Object not found - #005: (file name) line (number) in H5G__traverse_real(): special link traversal failed + #004: (file name) line (number) in H5G__traverse_real(): special link traversal failed major: Links minor: Link traversal failure - #006: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed + #005: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed major: Links minor: Link traversal failure - #007: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID + #006: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID major: Symbol table minor: Unable to find atom information (already closed?) - #008: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'fname' + #007: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'fname' major: Links minor: Unable to open file - #009: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'fname', temp_file_name = 'fname' + #008: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'fname', temp_file_name = 'fname' major: File accessibilty minor: Unable to open file diff --git a/tools/test/h5dump/errfiles/torderlinks2.err b/tools/test/h5dump/errfiles/torderlinks2.err index 22b4318..648906b 100644 --- a/tools/test/h5dump/errfiles/torderlinks2.err +++ b/tools/test/h5dump/errfiles/torderlinks2.err @@ -2,30 +2,27 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): #000: (file name) line (number) in H5Oopen(): unable to open object major: Object header minor: Can't open object - #001: (file name) line (number) in H5O__open_name(): unable to open object - major: Object header - minor: Can't open object - #002: (file name) line (number) in H5O_open_name(): object not found + #001: (file name) line (number) in H5O_open_name(): object not found major: Object header minor: Object not found - #003: (file name) line (number) in H5G_loc_find(): can't find object + #002: (file name) line (number) in H5G_loc_find(): can't find object major: Symbol table minor: Object not found - #004: (file name) line (number) in H5G_traverse(): internal path traversal failed + #003: (file name) line (number) in H5G_traverse(): internal path traversal failed major: Symbol table minor: Object not found - #005: (file name) line (number) in H5G__traverse_real(): special link traversal failed + #004: (file name) line (number) in H5G__traverse_real(): special link traversal failed major: Links minor: Link traversal failure - #006: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed + #005: (file name) line (number) in H5G__traverse_special(): user-defined link traversal failed major: Links minor: Link traversal failure - #007: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID + #006: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID major: Symbol table minor: Unable to find atom information (already closed?) - #008: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'fname' + #007: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'fname' major: Links minor: Unable to open file - #009: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'fname', temp_file_name = 'fname' + #008: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'fname', temp_file_name = 'fname' major: File accessibilty minor: Unable to open file diff --git a/tools/test/h5dump/errfiles/tperror.err b/tools/test/h5dump/errfiles/tperror.err index 55aeb4a..733b652 100644 --- a/tools/test/h5dump/errfiles/tperror.err +++ b/tools/test/h5dump/errfiles/tperror.err @@ -21,19 +21,16 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs): #000: (file name) line (number) in H5Lget_info(): unable to get link info major: Links minor: Can't get value - #001: (file name) line (number) in H5L__get_info(): unable to get link info for: 'bogus' - major: Links - minor: Can't get value - #002: (file name) line (number) in H5L_get_info(): name doesn't exist + #001: (file name) line (number) in H5L_get_info(): name doesn't exist major: Links minor: Object already exists - #003: (file name) line (number) in H5G_traverse(): internal path traversal failed + #002: (file name) line (number) in H5G_traverse(): internal path traversal failed major: Symbol table minor: Object not found - #004: (file name) line (number) in H5G__traverse_real(): traversal operator failed + #003: (file name) line (number) in H5G__traverse_real(): traversal operator failed major: Symbol table minor: Callback failed - #005: (file name) line (number) in H5L__get_info_cb(): name doesn't exist + #004: (file name) line (number) in H5L__get_info_cb(): name doesn't exist major: Links minor: Object not found h5dump error: unable to get link info from "bogus" |