Prevent H5Pset* routines from modifying default plists (#5172)

* Prevent H5Pset_vol from changing default VOL
* Prevent public routines from modifying default plists
* Allow default backing FAPL for onion VFD
* Require FAPL in H5Pset_vol()
* Merge into existing H5P tests
This commit is contained in:
Matt L 2024-12-17 07:52:46 -06:00 committed by GitHub
parent f0cffc90ac
commit 914640e123
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
41 changed files with 362 additions and 236 deletions

View File

@ -406,7 +406,17 @@ New Features
There is no API compatibility wrapper for this change.
Fixes GitHub issue #3506
- H5Pset* routines now fail when used on default property lists
Modifying default property lists was never fully supported and could produce
inconsistent and unexpected behavior.
- H5Pset_vol() now fails when used on a non-file-access property list
Similar to the above. Setting the connector on a non-FAPL had no effect on
library behavior, and the connector ID and information could not be read back
from that plist later.
Parallel Library:
-----------------

View File

@ -508,7 +508,7 @@ H5Pset_core_write_tracking(hid_t plist_id, hbool_t is_enabled, size_t page_size)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "page_size cannot be zero");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, false)))
HGOTO_ERROR(H5E_PLIST, H5E_BADID, FAIL, "can't find object for ID");
if (H5FD_CORE != H5P_peek_driver(plist))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver");
@ -550,7 +550,7 @@ H5Pget_core_write_tracking(hid_t plist_id, hbool_t *is_enabled /*out*/, size_t *
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_PLIST, H5E_BADID, FAIL, "can't find object for ID");
if (H5FD_CORE != H5P_peek_driver(plist))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver");
@ -588,7 +588,7 @@ H5Pset_fapl_core(hid_t fapl_id, size_t increment, hbool_t backing_store)
FUNC_ENTER_API(FAIL)
/* Check argument */
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
/* Set VFD info values */
@ -624,7 +624,7 @@ H5Pget_fapl_core(hid_t fapl_id, size_t *increment /*out*/, hbool_t *backing_stor
FUNC_ENTER_API(FAIL)
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
if (H5FD_CORE != H5P_peek_driver(plist))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver");

View File

@ -222,7 +222,7 @@ H5Pset_fapl_direct(hid_t fapl_id, size_t boundary, size_t block_size, size_t cbu
FUNC_ENTER_API(FAIL)
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
if (H5FD__direct_populate_config(boundary, block_size, cbuf_size, &fa) < 0)
@ -256,7 +256,7 @@ H5Pget_fapl_direct(hid_t fapl_id, size_t *boundary /*out*/, size_t *block_size /
FUNC_ENTER_API(FAIL)
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list");
if (H5FD_DIRECT != H5P_peek_driver(plist))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver");
@ -443,7 +443,7 @@ H5FD__direct_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "unable to allocate file struct");
/* Get the driver specific information */
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list");
if (NULL == (fa = (const H5FD_direct_fapl_t *)H5P_peek_driver_info(plist))) {
if (H5FD__direct_populate_config(0, 0, 0, &default_fa) < 0)

View File

@ -378,7 +378,7 @@ H5Pget_fapl_family(hid_t fapl_id, hsize_t *msize /*out*/, hid_t *memb_fapl_id /*
FUNC_ENTER_API(FAIL)
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list");
if (H5FD_FAMILY != H5P_peek_driver(plist))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver");
@ -1118,7 +1118,7 @@ H5FD__family_get_handle(H5FD_t *_file, hid_t fapl, void **file_handle)
FUNC_ENTER_PACKAGE
/* Get the plist structure and family offset */
if (NULL == (plist = H5P_object_verify(fapl, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_VFL, H5E_BADID, FAIL, "can't find object for ID");
if (H5P_get(plist, H5F_ACS_FAMILY_OFFSET_NAME, &offset) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "can't get offset for family driver");

View File

@ -582,7 +582,7 @@ H5Pset_fapl_hdfs(hid_t fapl_id, H5FD_hdfs_fapl_t *fa)
fprintf(stdout, "called %s.\n", __func__);
#endif
plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS);
plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false);
if (plist == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
if (FAIL == H5FD__hdfs_validate_config(fa))
@ -621,7 +621,7 @@ H5Pget_fapl_hdfs(hid_t fapl_id, H5FD_hdfs_fapl_t *fa_dst /*out*/)
if (fa_dst == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "fa_dst ptr is NULL");
plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS);
plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true);
if (plist == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list");

View File

@ -270,7 +270,7 @@ H5Pset_fapl_log(hid_t fapl_id, const char *logfile, unsigned long long flags, si
memset(&fa, 0, sizeof(H5FD_log_fapl_t));
/* Check arguments */
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
/* Duplicate the log file string
@ -446,7 +446,7 @@ H5FD__log_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
o_flags |= O_EXCL;
/* Get the driver specific information */
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list");
if (NULL == (fa = (const H5FD_log_fapl_t *)H5P_peek_driver_info(plist))) {
/* Use default driver configuration*/

View File

@ -1247,7 +1247,7 @@ H5Pget_fapl_mirror(hid_t fapl_id, H5FD_mirror_fapl_t *fa_dst /*out*/)
if (NULL == fa_dst)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "fa_dst is NULL");
plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS);
plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true);
if (NULL == plist)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
if (H5P_peek_driver(plist) != H5FD_MIRROR)
@ -1284,7 +1284,7 @@ H5Pset_fapl_mirror(hid_t fapl_id, H5FD_mirror_fapl_t *fa)
LOG_OP_CALL(__func__);
plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS);
plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false);
if (NULL == plist)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
if (NULL == fa)

View File

@ -427,7 +427,7 @@ H5Pset_fapl_mpio(hid_t fapl_id, MPI_Comm comm, MPI_Info info)
/* Check arguments */
if (fapl_id == H5P_DEFAULT)
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list");
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a file access list");
if (MPI_COMM_NULL == comm)
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "MPI_COMM_NULL is not a valid communicator");
@ -485,7 +485,7 @@ H5Pget_fapl_mpio(hid_t fapl_id, MPI_Comm *comm /*out*/, MPI_Info *info /*out*/)
*info = MPI_INFO_NULL;
/* Check arguments */
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a file access list");
if (H5FD_MPIO != H5P_peek_driver(plist))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "VFL driver is not MPI-I/O");
@ -549,7 +549,7 @@ H5Pset_dxpl_mpio(hid_t dxpl_id, H5FD_mpio_xfer_t xfer_mode)
/* Check arguments */
if (dxpl_id == H5P_DEFAULT)
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list");
if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER)))
if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER, false)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl");
if (H5FD_MPIO_INDEPENDENT != xfer_mode && H5FD_MPIO_COLLECTIVE != xfer_mode)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "incorrect xfer_mode");
@ -589,7 +589,7 @@ H5Pget_dxpl_mpio(hid_t dxpl_id, H5FD_mpio_xfer_t *xfer_mode /*out*/)
FUNC_ENTER_API(FAIL)
/* Check arguments */
if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER)))
if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER, true)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl");
/* Initialize driver, if it's not yet */
@ -633,7 +633,7 @@ H5Pset_dxpl_mpio_collective_opt(hid_t dxpl_id, H5FD_mpio_collective_opt_t opt_mo
/* Check arguments */
if (dxpl_id == H5P_DEFAULT)
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list");
if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER)))
if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER, false)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl");
/* Initialize driver, if it's not yet */
@ -676,7 +676,7 @@ H5Pset_dxpl_mpio_chunk_opt(hid_t dxpl_id, H5FD_mpio_chunk_opt_t opt_mode)
/* Check arguments */
if (dxpl_id == H5P_DEFAULT)
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list");
if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER)))
if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER, false)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl");
/* Initialize driver, if it's not yet */
@ -717,7 +717,7 @@ H5Pset_dxpl_mpio_chunk_opt_num(hid_t dxpl_id, unsigned num_chunk_per_proc)
/* Check arguments */
if (dxpl_id == H5P_DEFAULT)
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list");
if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER)))
if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER, false)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl");
/* Initialize driver, if it's not yet */
@ -761,7 +761,7 @@ H5Pset_dxpl_mpio_chunk_opt_ratio(hid_t dxpl_id, unsigned percent_num_proc_per_ch
/* Check arguments */
if (dxpl_id == H5P_DEFAULT)
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list");
if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER)))
if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER, false)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl");
/* Initialize driver, if it's not yet */
@ -904,7 +904,7 @@ H5FD__mpio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t H5_ATTR
HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, NULL, "can't initialize driver");
/* Get a pointer to the fapl */
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list");
if (H5FD_mpi_self_initialized_s) {
@ -3822,7 +3822,7 @@ H5FD__mpio_delete(const char *filename, hid_t fapl_id)
if (H5FD__mpio_init() < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "can't initialize driver");
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
assert(H5FD_MPIO == H5P_peek_driver(plist));

View File

@ -278,7 +278,7 @@ H5Pget_fapl_onion(hid_t fapl_id, H5FD_onion_fapl_info_t *fa_out)
if (NULL == fa_out)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL info-out pointer");
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Not a valid FAPL ID");
if (H5FD_ONION != H5P_peek_driver(plist))
@ -316,7 +316,7 @@ H5Pset_fapl_onion(hid_t fapl_id, const H5FD_onion_fapl_info_t *fa)
FUNC_ENTER_API(FAIL)
if (NULL == (fapl = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (fapl = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Not a valid FAPL ID");
if (NULL == fa)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL info pointer");
@ -328,11 +328,11 @@ H5Pset_fapl_onion(hid_t fapl_id, const H5FD_onion_fapl_info_t *fa)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid info page size");
if (H5P_DEFAULT == fa->backing_fapl_id) {
if (NULL == (backing_fapl = H5P_object_verify(H5P_FILE_ACCESS_DEFAULT, H5P_FILE_ACCESS)))
if (NULL == (backing_fapl = H5P_object_verify(H5P_FILE_ACCESS_DEFAULT, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "invalid backing fapl id");
}
else {
if (NULL == (backing_fapl = H5P_object_verify(fa->backing_fapl_id, H5P_FILE_ACCESS)))
if (NULL == (backing_fapl = H5P_object_verify(fa->backing_fapl_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "invalid backing fapl id");
}
@ -1635,7 +1635,7 @@ H5FDonion_get_revision_count(const char *filename, hid_t fapl_id, uint64_t *revi
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "revision count can't be null");
/* Make sure using the correct driver */
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid FAPL ID");
if (H5FD_ONION != H5P_peek_driver(plist))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a Onion VFL driver");

View File

@ -295,7 +295,7 @@ H5Pset_fapl_ros3(hid_t fapl_id, const H5FD_ros3_fapl_t *fa)
assert(fa != NULL);
plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS);
plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false);
if (plist == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
@ -357,7 +357,7 @@ H5Pget_fapl_ros3(hid_t fapl_id, H5FD_ros3_fapl_t *fa_dst /*out*/)
if (fa_dst == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "fa_dst is NULL");
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access list");
if (H5FD_ROS3 != H5P_peek_driver(plist))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "fapl not set to use the ros3 VFD");
@ -489,7 +489,7 @@ H5Pget_fapl_ros3_token(hid_t fapl_id, size_t size, char *token_dst /*out*/)
if (token_dst == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "token_dst is NULL");
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a file access property list");
if (H5FD_ROS3 != H5P_peek_driver(plist))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver");
@ -641,7 +641,7 @@ H5Pset_fapl_ros3_token(hid_t fapl_id, const char *token)
if (fapl_id == H5P_DEFAULT)
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list");
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a file access property list");
if (H5FD_ROS3 != H5P_peek_driver(plist))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver");
@ -717,7 +717,7 @@ H5FD__ros3_open(const char *url, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
HGOTO_ERROR(H5E_ARGS, H5E_OVERFLOW, NULL, "bogus maxaddr");
if (flags != H5F_ACC_RDONLY)
HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, NULL, "only Read-Only access allowed");
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file access property list");
/* Initialize driver, if it's not yet */

View File

@ -223,7 +223,7 @@ H5Pset_fapl_sec2(hid_t fapl_id)
FUNC_ENTER_API(FAIL)
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
ret_value = H5P_set_driver(plist, H5FD_SEC2, NULL, NULL);

View File

@ -329,7 +329,7 @@ H5Pget_fapl_splitter(hid_t fapl_id, H5FD_splitter_vfd_config_t *config /*out*/)
config->wo_fapl_id = H5I_INVALID_HID;
/* Check and get the splitter fapl */
if (NULL == (plist_ptr = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist_ptr = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
if (H5FD_SPLITTER != H5P_peek_driver(plist_ptr))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "incorrect VFL driver");

View File

@ -319,7 +319,7 @@ H5Pset_fapl_ioc(hid_t fapl_id, H5FD_ioc_config_t *vfd_config)
FUNC_ENTER_API(FAIL)
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
/* Initialize driver, if it's not yet */
@ -369,7 +369,7 @@ H5Pget_fapl_ioc(hid_t fapl_id, H5FD_ioc_config_t *config_out)
/* Check arguments */
if (config_out == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "config_out is NULL");
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
/* Initialize driver, if it's not yet */
@ -1249,7 +1249,7 @@ H5FD__ioc_delete(const char *name, hid_t fapl)
if (H5FD__ioc_init() < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "can't initialize driver");
if (NULL == (plist = H5P_object_verify(fapl, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
assert(H5FD_IOC == H5P_peek_driver(plist));

View File

@ -451,7 +451,7 @@ H5Pset_fapl_subfiling(hid_t fapl_id, const H5FD_subfiling_config_t *vfd_config)
FUNC_ENTER_API(FAIL)
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
/* Initialize driver, if it's not yet */
@ -479,7 +479,7 @@ H5Pset_fapl_subfiling(hid_t fapl_id, const H5FD_subfiling_config_t *vfd_config)
comm = MPI_COMM_WORLD;
/* Set MPI parameters on IOC FAPL */
if (NULL == (ioc_plist = H5P_object_verify(vfd_config->ioc_fapl_id, H5P_FILE_ACCESS)))
if (NULL == (ioc_plist = H5P_object_verify(vfd_config->ioc_fapl_id, H5P_FILE_ACCESS, false)))
HGOTO_ERROR(H5E_VFL, H5E_BADTYPE, FAIL, "not a file access property list");
if (H5P_set(ioc_plist, H5F_ACS_MPI_PARAMS_COMM_NAME, &comm) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTSET, FAIL, "can't set MPI communicator on plist");
@ -532,7 +532,7 @@ H5Pget_fapl_subfiling(hid_t fapl_id, H5FD_subfiling_config_t *config_out)
if (config_out == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "config_out is NULL");
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
/* Initialize driver, if it's not yet */
@ -1784,7 +1784,7 @@ H5FD__subfiling_delete(const char *name, hid_t fapl)
if (H5FD__subfiling_init() < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, FAIL, "can't initialize driver");
if (NULL == (plist = H5P_object_verify(fapl, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
if (H5FD_SUBFILING != H5P_peek_driver(plist))

View File

@ -522,7 +522,7 @@ H5FD__subfiling_open_stub_file(const char *name, unsigned flags, MPI_Comm file_c
if ((fapl_id = H5P_create_id(H5P_CLS_FILE_ACCESS_g, false)) < 0)
HGOTO_ERROR(H5E_VFL, H5E_CANTREGISTER, FAIL, "can't create FAPL for stub file");
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_VFL, H5E_BADTYPE, FAIL, "not a file access property list");
/* Use MPI I/O driver for stub file to allow access to vector I/O */

View File

@ -47,7 +47,7 @@ H5Pset_fapl_windows(hid_t fapl_id)
FUNC_ENTER_API(FAIL)
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list");
ret_value = H5P_set_driver(plist, H5FD_WINDOWS, NULL, NULL);

View File

@ -395,7 +395,7 @@ H5F_mpi_retrieve_comm(hid_t loc_id, hid_t acspl_id, MPI_Comm *mpi_comm)
unsigned long driver_feat_flags;
H5FD_class_t *driver_class = NULL;
if (NULL == (plist = H5P_object_verify(acspl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(acspl_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, FAIL, "not a file access list");
if (H5P_peek(plist, H5F_ACS_FILE_DRV_NAME, &driver_prop) < 0)

View File

@ -134,7 +134,7 @@ H5L__extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group, cons
obj_name = (const char *)p + fname_len + 1;
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS)))
if (NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, H5I_INVALID_HID, "can't find object for ID");
/* Get the fapl_id set for lapl_id if any */
@ -162,7 +162,7 @@ H5L__extern_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group, cons
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, H5I_INVALID_HID, "can't get elink callback info");
/* Get file access property list */
if (NULL == (fa_plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (fa_plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, H5I_INVALID_HID, "can't find object for ID");
/* Make callback if it exists */

View File

@ -771,7 +771,7 @@ H5Pset_chunk_cache(hid_t dapl_id, size_t rdcc_nslots, size_t rdcc_nbytes, double
"raw data cache w0 value must be between 0.0 and 1.0 inclusive, or H5D_CHUNK_CACHE_W0_DEFAULT");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(dapl_id, H5P_DATASET_ACCESS)))
if (NULL == (plist = H5P_object_verify(dapl_id, H5P_DATASET_ACCESS, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Set sizes */
@ -811,7 +811,7 @@ H5Pget_chunk_cache(hid_t dapl_id, size_t *rdcc_nslots /*out*/, size_t *rdcc_nbyt
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(dapl_id, H5P_DATASET_ACCESS)))
if (NULL == (plist = H5P_object_verify(dapl_id, H5P_DATASET_ACCESS, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get default file access plist */
@ -1076,7 +1076,7 @@ H5Pset_virtual_view(hid_t plist_id, H5D_vds_view_t view)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid bounds option");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Update property list */
@ -1107,7 +1107,7 @@ H5Pget_virtual_view(hid_t plist_id, H5D_vds_view_t *view /*out*/)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get value from property list */
@ -1216,7 +1216,7 @@ H5Pset_virtual_printf_gap(hid_t plist_id, hsize_t gap_size)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid printf gap size");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Update property list */
@ -1248,7 +1248,7 @@ H5Pget_virtual_printf_gap(hid_t plist_id, hsize_t *gap_size /*out*/)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get value from property list */
@ -1300,7 +1300,7 @@ H5Pset_append_flush(hid_t plist_id, unsigned ndims, const hsize_t *boundary, H5D
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "callback is NULL while user data is not");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Set up values */
@ -1348,7 +1348,7 @@ H5Pget_append_flush(hid_t plist_id, unsigned ndims, hsize_t boundary[], H5D_appe
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Retrieve info for append flush */
@ -1397,7 +1397,7 @@ H5Pset_efile_prefix(hid_t plist_id, const char *prefix)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Set prefix */
@ -1429,7 +1429,7 @@ H5Pget_efile_prefix(hid_t plist_id, char *prefix /*out*/, size_t size)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get the current prefix */
@ -1483,7 +1483,7 @@ H5Pset_virtual_prefix(hid_t plist_id, const char *prefix)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Set prefix */
@ -1517,7 +1517,7 @@ H5Pget_virtual_prefix(hid_t plist_id, char *prefix /*out*/, size_t size)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get the current prefix */

View File

@ -1823,7 +1823,7 @@ H5Pset_layout(hid_t plist_id, H5D_layout_t layout_type)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "raw data layout method is not valid");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get pointer to correct default layout */
@ -1879,7 +1879,7 @@ H5Pget_layout(hid_t plist_id)
FUNC_ENTER_API(H5D_LAYOUT_ERROR)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, H5D_LAYOUT_ERROR, "can't find object for ID");
/* Peek at layout property */
@ -1942,7 +1942,7 @@ H5Pset_chunk(hid_t plist_id, int ndims, const hsize_t dim[/*ndims*/])
} /* end for */
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Set chunk information in property list */
@ -1978,7 +1978,7 @@ H5Pget_chunk(hid_t plist_id, int max_ndims, hsize_t dim[] /*out*/)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Peek at the layout property */
@ -2050,7 +2050,7 @@ H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, const
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "invalid mapping selections");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE)))
if (NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get the current layout */
@ -2200,7 +2200,7 @@ H5Pget_virtual_count(hid_t dcpl_id, size_t *count /*out*/)
if (count) {
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE)))
if (NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Retrieve the layout property */
@ -2241,7 +2241,7 @@ H5Pget_virtual_vspace(hid_t dcpl_id, size_t idx)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE)))
if (NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Retrieve the layout property */
@ -2294,7 +2294,7 @@ H5Pget_virtual_srcspace(hid_t dcpl_id, size_t idx)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE)))
if (NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Retrieve the layout property */
@ -2393,7 +2393,7 @@ H5Pget_virtual_filename(hid_t dcpl_id, size_t idx, char *name /*out*/, size_t si
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE)))
if (NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Retrieve the layout property */
@ -2450,7 +2450,7 @@ H5Pget_virtual_dsetname(hid_t dcpl_id, size_t idx, char *name /*out*/, size_t si
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE)))
if (NULL == (plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Retrieve the layout property */
@ -2497,7 +2497,7 @@ H5Pset_chunk_opts(hid_t plist_id, unsigned options)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "unknown chunk options");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Retrieve the layout property */
@ -2544,7 +2544,7 @@ H5Pget_chunk_opts(hid_t plist_id, unsigned *options /*out*/)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Retrieve the layout property */
@ -2603,7 +2603,7 @@ H5Pset_external(hid_t plist_id, const char *name, HDoff_t offset, hsize_t size)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "negative external file offset");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
if (H5P_peek(plist, H5D_CRT_EXT_FILE_LIST_NAME, &efl) < 0)
@ -2665,7 +2665,7 @@ H5Pget_external_count(hid_t plist_id)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get value */
@ -2711,7 +2711,7 @@ H5Pget_external(hid_t plist_id, unsigned idx, size_t name_size, char *name /*out
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get value */
@ -2770,7 +2770,7 @@ H5Pset_szip(hid_t plist_id, unsigned options_mask, unsigned pixels_per_block)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "pixels_per_block is too large");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Always set K13 compression (and un-set CHIP compression) */
@ -2973,7 +2973,7 @@ H5Pset_fill_value(hid_t plist_id, hid_t type_id, const void *value)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get the current fill value */
@ -3156,7 +3156,7 @@ H5Pget_fill_value(hid_t plist_id, hid_t type_id, void *value /*out*/)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no fill value output buffer");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get the fill value */
@ -3255,7 +3255,7 @@ H5Pfill_value_defined(hid_t plist_id, H5D_fill_value_t *status)
assert(status);
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get the fill-value status */
@ -3292,7 +3292,7 @@ H5Pset_alloc_time(hid_t plist_id, H5D_alloc_time_t alloc_time)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid allocation time setting");
/* Get the property list structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Check for resetting to default for layout type */
@ -3375,7 +3375,7 @@ H5Pget_alloc_time(hid_t plist_id, H5D_alloc_time_t *alloc_time /*out*/)
H5O_fill_t fill; /* Fill value property to query */
/* Get the property list structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Retrieve fill value settings */
@ -3414,7 +3414,7 @@ H5Pset_fill_time(hid_t plist_id, H5D_fill_time_t fill_time)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid fill time setting");
/* Get the property list structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Retrieve previous fill value settings */
@ -3455,7 +3455,7 @@ H5Pget_fill_time(hid_t plist_id, H5D_fill_time_t *fill_time /*out*/)
H5O_fill_t fill; /* Fill value property to query */
/* Get the property list structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Retrieve fill value settings */
@ -3497,7 +3497,7 @@ H5Pget_dset_no_attrs_hint(hid_t dcpl_id, hbool_t *minimize /*out*/)
if (NULL == minimize)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "receiving pointer cannot be NULL");
plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE);
plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE, true);
if (NULL == plist)
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
@ -3534,7 +3534,7 @@ H5Pset_dset_no_attrs_hint(hid_t dcpl_id, hbool_t minimize)
FUNC_ENTER_API(FAIL)
plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE);
plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE, false);
if (NULL == plist)
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");

View File

@ -447,7 +447,7 @@ H5Pget_version(hid_t plist_id, unsigned *super /*out*/, unsigned *freelist /*out
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get values */

View File

@ -974,7 +974,7 @@ H5Pset_data_transform(hid_t plist_id, const char *expression)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "expression cannot be NULL");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* See if a data transform is already set, and free it if it is */
@ -1032,7 +1032,7 @@ H5Pget_data_transform(hid_t plist_id, char *expression /*out*/, size_t size)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
if (H5P_peek(plist, H5D_XFER_XFORM_NAME, &data_xform_prop) < 0)
@ -1090,7 +1090,7 @@ H5Pset_buffer(hid_t plist_id, size_t size, void *tconv, void *bkg)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "buffer size must not be zero");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Update property list */
@ -1126,7 +1126,7 @@ H5Pget_buffer(hid_t plist_id, void **tconv /*out*/, void **bkg /*out*/)
FUNC_ENTER_API(0)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, 0, "can't find object for ID");
/* Return values */
@ -1171,7 +1171,7 @@ H5Pset_preserve(hid_t plist_id, hbool_t status)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Update property list */
@ -1204,7 +1204,7 @@ H5Pget_preserve(hid_t plist_id)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get value */
@ -1243,7 +1243,7 @@ H5Pset_edc_check(hid_t plist_id, H5Z_EDC_t check)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid value");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Update property list */
@ -1275,7 +1275,7 @@ H5Pget_edc_check(hid_t plist_id)
FUNC_ENTER_API(H5Z_ERROR_EDC)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, H5Z_ERROR_EDC, "can't find object for ID");
/* Update property list */
@ -1307,7 +1307,7 @@ H5Pset_filter_callback(hid_t plist_id, H5Z_filter_func_t func, void *op_data)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Update property list */
@ -1342,7 +1342,7 @@ H5Pset_type_conv_cb(hid_t plist_id, H5T_conv_except_func_t op, void *operate_dat
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Update property list */
@ -1377,7 +1377,7 @@ H5Pget_type_conv_cb(hid_t plist_id, H5T_conv_except_func_t *op /*out*/, void **o
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get property */
@ -1414,7 +1414,7 @@ H5Pget_btree_ratios(hid_t plist_id, double *left /*out*/, double *middle /*out*/
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get the split ratios */
@ -1464,7 +1464,7 @@ H5Pset_btree_ratios(hid_t plist_id, double left, double middle, double right)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "split ratio must satisfy 0.0 <= X <= 1.0");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Set values */
@ -1546,7 +1546,7 @@ H5Pset_vlen_mem_manager(hid_t plist_id, H5MM_allocate_t alloc_func, void *alloc_
FUNC_ENTER_API(FAIL)
/* Check arguments */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, false)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list");
/* Update property list */
@ -1576,7 +1576,7 @@ H5Pget_vlen_mem_manager(hid_t plist_id, H5MM_allocate_t *alloc_func /*out*/, voi
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
if (alloc_func)
@ -1627,7 +1627,7 @@ H5Pset_hyper_vector_size(hid_t plist_id, size_t vector_size)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "vector size too small");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Update property list */
@ -1656,7 +1656,7 @@ H5Pget_hyper_vector_size(hid_t plist_id, size_t *vector_size /*out*/)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Return values */
@ -1887,7 +1887,7 @@ H5Pget_mpio_actual_chunk_opt_mode(hid_t plist_id,
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Return values */
@ -1918,7 +1918,7 @@ H5Pget_mpio_actual_io_mode(hid_t plist_id, H5D_mpio_actual_io_mode_t *actual_io_
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Return values */
@ -1949,7 +1949,7 @@ H5Pget_mpio_no_collective_cause(hid_t plist_id, uint32_t *local_no_collective_ca
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Return values */
@ -2269,7 +2269,7 @@ H5Pset_dataset_io_hyperslab_selection(hid_t plist_id, unsigned rank, H5S_seloper
/* block is allowed to be NULL, and will be assumed to be all '1's when NULL */
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* See if a dataset I/O selection is already set, and free it if it is */
@ -2365,7 +2365,7 @@ H5Pset_selection_io(hid_t plist_id, H5D_selection_io_mode_t selection_io_mode)
if (plist_id == H5P_DEFAULT)
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list");
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, false)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl");
/* Set the selection I/O mode */
@ -2399,7 +2399,7 @@ H5Pget_selection_io(hid_t plist_id, H5D_selection_io_mode_t *selection_io_mode /
FUNC_ENTER_API(FAIL)
/* Check arguments */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, true)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl");
/* Get the selection I/O mode */
@ -2429,7 +2429,7 @@ H5Pget_no_selection_io_cause(hid_t plist_id, uint32_t *no_selection_io_cause /*o
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Return values */
@ -2461,7 +2461,7 @@ H5Pget_actual_selection_io_mode(hid_t plist_id, uint32_t *actual_selection_io_mo
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Return values */
@ -2561,7 +2561,7 @@ H5Pset_modify_write_buf(hid_t plist_id, hbool_t modify_write_buf)
if (plist_id == H5P_DEFAULT)
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't set values in default property list");
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, false)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl");
/* Set the selection I/O mode */
@ -2591,7 +2591,7 @@ H5Pget_modify_write_buf(hid_t plist_id, hbool_t *modify_write_buf /*out*/)
FUNC_ENTER_API(FAIL)
/* Check arguments */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER, true)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a dxpl");
/* Get the selection I/O mode */

View File

@ -1086,7 +1086,7 @@ H5Pset_alignment(hid_t fapl_id, hsize_t threshold, hsize_t alignment)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "alignment must be positive");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Set values */
@ -1119,7 +1119,7 @@ H5Pget_alignment(hid_t fapl_id, hsize_t *threshold /*out*/, hsize_t *alignment /
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get values */
@ -1614,7 +1614,7 @@ H5Pget_driver_config_str(hid_t fapl_id, char *config_buf, size_t buf_size)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, (-1), "config_buf cannot be NULL if buf_size is non-zero");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, (-1), "can't find object for ID");
/* Retrieve configuration string property */
@ -2000,7 +2000,7 @@ H5Pset_family_offset(hid_t fapl_id, hsize_t offset)
/* Get the plist structure */
if (H5P_DEFAULT == fapl_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "can't modify default property list");
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Set value */
@ -2034,7 +2034,7 @@ H5Pget_family_offset(hid_t fapl_id, hsize_t *offset /*out*/)
/* Get the plist structure */
if (H5P_DEFAULT == fapl_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "can't modify default property list");
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get value */
@ -2070,7 +2070,7 @@ H5Pset_multi_type(hid_t fapl_id, H5FD_mem_t type)
/* Get the plist structure */
if (H5P_DEFAULT == fapl_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "can't modify default property list");
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Set value */
@ -2104,7 +2104,7 @@ H5Pget_multi_type(hid_t fapl_id, H5FD_mem_t *type /*out*/)
/* Get the plist structure */
if (H5P_DEFAULT == fapl_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "can't modify default property list");
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get value */
@ -2151,7 +2151,7 @@ H5Pset_cache(hid_t plist_id, int H5_ATTR_UNUSED mdc_nelmts, size_t rdcc_nslots,
"raw data cache w0 value must be between 0.0 and 1.0 inclusive");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Set sizes */
@ -2189,7 +2189,7 @@ H5Pget_cache(hid_t plist_id, int *mdc_nelmts, size_t *rdcc_nslots /*out*/, size_
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get sizes */
@ -2231,7 +2231,7 @@ H5Pset_mdc_image_config(hid_t plist_id, H5AC_cache_image_config_t *config_ptr)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* validate the new configuration */
@ -2274,7 +2274,7 @@ H5Pget_mdc_image_config(hid_t plist_id, H5AC_cache_image_config_t *config /*out*
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* validate the config ptr */
@ -2315,7 +2315,7 @@ H5Pset_mdc_config(hid_t plist_id, H5AC_cache_config_t *config_ptr)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* validate the new configuration */
@ -2358,7 +2358,7 @@ H5Pget_mdc_config(hid_t plist_id, H5AC_cache_config_t *config /*out*/)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* validate the config ptr */
@ -2410,7 +2410,7 @@ H5Pset_gc_references(hid_t plist_id, unsigned gc_ref)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Set values */
@ -2440,7 +2440,7 @@ H5Pget_gc_references(hid_t plist_id, unsigned *gc_ref /*out*/)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get values */
@ -2470,7 +2470,7 @@ H5Pset_fclose_degree(hid_t plist_id, H5F_close_degree_t degree)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Set values */
@ -2499,7 +2499,7 @@ H5Pget_fclose_degree(hid_t plist_id, H5F_close_degree_t *degree /*out*/)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
if (degree && H5P_get(plist, H5F_ACS_CLOSE_DEGREE_NAME, degree) < 0)
@ -2537,7 +2537,7 @@ H5Pset_meta_block_size(hid_t plist_id, hsize_t size)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Set values */
@ -2567,7 +2567,7 @@ H5Pget_meta_block_size(hid_t plist_id, hsize_t *size /*out*/)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get values */
@ -2608,7 +2608,7 @@ H5Pset_sieve_buf_size(hid_t plist_id, size_t size)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Set values */
@ -2638,7 +2638,7 @@ H5Pget_sieve_buf_size(hid_t plist_id, size_t *size /*out*/)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get values */
@ -2678,7 +2678,7 @@ H5Pset_small_data_block_size(hid_t plist_id, hsize_t size)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Set values */
@ -2708,7 +2708,7 @@ H5Pget_small_data_block_size(hid_t plist_id, hsize_t *size /*out*/)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get values */
@ -2845,7 +2845,7 @@ H5Pset_libver_bounds(hid_t plist_id, H5F_libver_t low, H5F_libver_t high)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Invalid (low,high) combination of library version bound");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Set values */
@ -2876,7 +2876,7 @@ H5Pget_libver_bounds(hid_t plist_id, H5F_libver_t *low /*out*/, H5F_libver_t *hi
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get values */
@ -2914,7 +2914,7 @@ H5Pset_elink_file_cache_size(hid_t plist_id, unsigned efc_size)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Set value */
@ -2947,7 +2947,7 @@ H5Pget_elink_file_cache_size(hid_t plist_id, unsigned *efc_size /*out*/)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get value */
@ -2983,7 +2983,7 @@ H5Pset_file_image(hid_t fapl_id, void *buf_ptr, size_t buf_len)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "inconsistent buf_ptr and buf_len");
/* Get the plist structure */
if (NULL == (fapl = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (fapl = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get old image info */
@ -3072,7 +3072,7 @@ H5Pget_file_image(hid_t fapl_id, void **buf /*out*/, size_t *buf_len /*out*/)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (fapl = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (fapl = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get values */
@ -3144,7 +3144,7 @@ H5Pset_file_image_callbacks(hid_t fapl_id, H5FD_file_image_callbacks_t *callback
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (fapl = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (fapl = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get old info */
@ -3223,7 +3223,7 @@ H5Pget_file_image_callbacks(hid_t fapl_id, H5FD_file_image_callbacks_t *callback
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (fapl = H5P_object_verify(fapl_id, H5P_FILE_ACCESS)))
if (NULL == (fapl = H5P_object_verify(fapl_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get old info */
@ -4387,7 +4387,7 @@ H5Pset_metadata_read_attempts(hid_t plist_id, unsigned attempts)
"number of metadatata read attempts must be greater than 0");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Set values */
@ -4419,7 +4419,7 @@ H5Pget_metadata_read_attempts(hid_t plist_id, unsigned *attempts /*out*/)
H5P_genplist_t *plist; /* Property list pointer */
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get the # of read attempts set */
@ -4460,7 +4460,7 @@ H5Pset_object_flush_cb(hid_t plist_id, H5F_flush_cb_t func, void *udata)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "callback is NULL while user data is not");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Update property list */
@ -4495,7 +4495,7 @@ H5Pget_object_flush_cb(hid_t plist_id, H5F_flush_cb_t *func /*out*/, void **udat
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Retrieve the callback function and user data */
@ -4537,7 +4537,7 @@ H5Pset_mdc_log_options(hid_t plist_id, hbool_t is_enabled, const char *location,
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "location cannot be NULL");
/* Get the property list structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, false)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plist_id is not a file access property list");
/* Make a copy of the passed-in location */
@ -4576,7 +4576,7 @@ H5Pget_mdc_log_options(hid_t plist_id, hbool_t *is_enabled /*out*/, char *locati
FUNC_ENTER_API(FAIL)
/* Get the property list structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plist_id is not a file access property list");
/* Get simple values */
@ -5671,7 +5671,7 @@ H5Pset_page_buffer_size(hid_t plist_id, size_t buf_size, unsigned min_meta_perc,
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
if (min_meta_perc > 100)
@ -5716,7 +5716,7 @@ H5Pget_page_buffer_size(hid_t plist_id, size_t *buf_size /*out*/, unsigned *min_
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get size */
@ -5829,7 +5829,7 @@ H5Pset_vol(hid_t plist_id, hid_t new_vol_id, const void *new_vol_info)
FUNC_ENTER_API(FAIL)
/* Check arguments */
if (NULL == (plist = (H5P_genplist_t *)H5I_object_verify(plist_id, H5I_GENPROP_LST)))
if (NULL == (plist = (H5P_genplist_t *)H5P_object_verify(plist_id, H5P_FILE_ACCESS, false)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list");
if (NULL == (connector = H5I_object_verify(new_vol_id, H5I_VOL)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file VOL ID");
@ -6217,7 +6217,7 @@ H5Pset_relax_file_integrity_checks(hid_t plist_id, uint64_t flags)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid flags");
/* Get the property list structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, false)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plist_id is not a file access property list");
/* Set value */
@ -6249,7 +6249,7 @@ H5Pget_relax_file_integrity_checks(hid_t plist_id, uint64_t *flags /*out*/)
plist_id = H5P_FILE_ACCESS_DEFAULT;
/* Get the property list structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plist_id is not a file access property list");
/* Get value */

View File

@ -330,7 +330,7 @@ H5Pset_userblock(hid_t plist_id, hsize_t size)
} /* end if */
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Set value */
@ -362,7 +362,7 @@ H5Pget_userblock(hid_t plist_id, hsize_t *size /*out*/)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get value */
@ -404,7 +404,7 @@ H5Pset_sizes(hid_t plist_id, size_t sizeof_addr, size_t sizeof_size)
} /* end if */
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Set value */
@ -446,7 +446,7 @@ H5Pget_sizes(hid_t plist_id, size_t *sizeof_addr /*out*/, size_t *sizeof_size /*
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get values */
@ -501,7 +501,7 @@ H5Pset_sym_k(hid_t plist_id, unsigned ik, unsigned lk)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Set values */
@ -545,7 +545,7 @@ H5Pget_sym_k(hid_t plist_id, unsigned *ik /*out*/, unsigned *lk /*out*/)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get values */
@ -590,7 +590,7 @@ H5Pset_istore_k(hid_t plist_id, unsigned ik)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "istore IK value exceeds maximum B-tree entries");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Set value */
@ -627,7 +627,7 @@ H5Pget_istore_k(hid_t plist_id, unsigned *ik /*out*/)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get value */
@ -754,7 +754,7 @@ H5Pset_shared_mesg_nindexes(hid_t plist_id, unsigned nindexes)
"number of indexes is greater than H5O_SHMESG_MAX_NINDEXES");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
if (H5P_set(plist, H5F_CRT_SHMSG_NINDEXES_NAME, &nindexes) < 0)
@ -783,7 +783,7 @@ H5Pget_shared_mesg_nindexes(hid_t plist_id, unsigned *nindexes /*out*/)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
if (H5P_get(plist, H5F_CRT_SHMSG_NINDEXES_NAME, nindexes) < 0)
@ -823,7 +823,7 @@ H5Pset_shared_mesg_index(hid_t plist_id, unsigned index_num, unsigned mesg_type_
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "unrecognized flags in mesg_type_flags");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Read the current number of indexes */
@ -878,7 +878,7 @@ H5Pget_shared_mesg_index(hid_t plist_id, unsigned index_num, unsigned *mesg_type
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Read the current number of indexes */
@ -1118,7 +1118,7 @@ H5Pset_shared_mesg_phase_change(hid_t plist_id, unsigned max_list, unsigned min_
min_btree = 0;
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
if (H5P_set(plist, H5F_CRT_SHMSG_LIST_MAX_NAME, &max_list) < 0)
@ -1149,7 +1149,7 @@ H5Pget_shared_mesg_phase_change(hid_t plist_id, unsigned *max_list /*out*/, unsi
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get value(s) */
@ -1189,7 +1189,7 @@ H5Pset_file_space_strategy(hid_t plist_id, H5F_fspace_strategy_t strategy, hbool
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid strategy");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Set value(s), if non-zero */
@ -1229,7 +1229,7 @@ H5Pget_file_space_strategy(hid_t plist_id, H5F_fspace_strategy_t *strategy /*out
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get value(s) */
@ -1331,7 +1331,7 @@ H5Pset_file_space_page_size(hid_t plist_id, hsize_t fsp_size)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
if (fsp_size < H5F_FILE_SPACE_PAGE_SIZE_MIN)
@ -1367,7 +1367,7 @@ H5Pget_file_space_page_size(hid_t plist_id, hsize_t *fsp_size /*out*/)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get value */

View File

@ -151,7 +151,7 @@ H5Pset_local_heap_size_hint(hid_t plist_id, size_t size_hint)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get value */
@ -191,7 +191,7 @@ H5Pget_local_heap_size_hint(hid_t plist_id, size_t *size_hint /*out*/)
H5O_ginfo_t ginfo; /* Group information structure */
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get value */
@ -239,7 +239,7 @@ H5Pset_link_phase_change(hid_t plist_id, unsigned max_compact, unsigned min_dens
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "min dense value must be < 65536");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get group info */
@ -285,7 +285,7 @@ H5Pget_link_phase_change(hid_t plist_id, unsigned *max_compact /*out*/, unsigned
H5O_ginfo_t ginfo; /* Group information structure */
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get group info */
@ -335,7 +335,7 @@ H5Pset_est_link_info(hid_t plist_id, unsigned est_num_entries, unsigned est_name
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "est. name length must be < 65536");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get group info */
@ -381,7 +381,7 @@ H5Pget_est_link_info(hid_t plist_id, unsigned *est_num_entries /*out*/, unsigned
H5O_ginfo_t ginfo; /* Group information structure */
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get group info */
@ -421,7 +421,7 @@ H5Pset_link_creation_order(hid_t plist_id, unsigned crt_order_flags)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "tracking creation order is required for index");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get link info */
@ -466,7 +466,7 @@ H5Pget_link_creation_order(hid_t plist_id, unsigned *crt_order_flags /*out*/)
*crt_order_flags = 0;
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get link info */

View File

@ -4084,6 +4084,40 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5P_isa_class() */
/*-------------------------------------------------------------------------
* Function: H5P_is_default_plist
*
* Purpose: Determine if the provided ID refers to a default property list.
*
* Return: True if the ID refers to a default property list, false otherwise.
*
*-------------------------------------------------------------------------
*/
bool
H5P_is_default_plist(hid_t plist_id)
{
hid_t H5I_def_plists[] = {
H5P_LST_FILE_CREATE_ID_g, H5P_LST_FILE_ACCESS_ID_g, H5P_LST_DATASET_CREATE_ID_g,
H5P_LST_DATASET_ACCESS_ID_g, H5P_LST_DATASET_XFER_ID_g, H5P_LST_FILE_MOUNT_ID_g,
H5P_LST_GROUP_CREATE_ID_g, H5P_LST_GROUP_ACCESS_ID_g, H5P_LST_DATATYPE_CREATE_ID_g,
H5P_LST_DATATYPE_ACCESS_ID_g, H5P_LST_MAP_CREATE_ID_g, H5P_LST_MAP_ACCESS_ID_g,
H5P_LST_ATTRIBUTE_CREATE_ID_g, H5P_LST_ATTRIBUTE_ACCESS_ID_g, H5P_LST_OBJECT_COPY_ID_g,
H5P_LST_LINK_CREATE_ID_g, H5P_LST_LINK_ACCESS_ID_g, H5P_LST_VOL_INITIALIZE_ID_g,
H5P_LST_REFERENCE_ACCESS_ID_g};
size_t num_default_plists = (size_t)(sizeof(H5I_def_plists) / sizeof(H5I_def_plists[0]));
if (plist_id == H5P_DEFAULT)
return true;
for (size_t i = 0; i < num_default_plists; i++) {
if (plist_id == H5I_def_plists[i])
return true;
}
return false;
}
/*--------------------------------------------------------------------------
NAME
H5P_object_verify
@ -4091,9 +4125,10 @@ done:
Internal routine to query whether a property list is a certain class and
retrieve the property list object associated with it.
USAGE
void *H5P_object_verify(plist_id, pclass_id)
void *H5P_object_verify(plist_id, pclass_id, allow_default)
hid_t plist_id; IN: Property list to query
hid_t pclass_id; IN: Property class to query
bool allow_default; IN: Whether to consider the default property lists valid
RETURNS
Success: valid pointer to a property list object
Failure: NULL
@ -4113,7 +4148,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
H5P_genplist_t *
H5P_object_verify(hid_t plist_id, hid_t pclass_id)
H5P_object_verify(hid_t plist_id, hid_t pclass_id, bool allow_default)
{
H5P_genplist_t *ret_value = NULL; /* Return value */
@ -4123,6 +4158,10 @@ H5P_object_verify(hid_t plist_id, hid_t pclass_id)
if (H5P_isa_class(plist_id, pclass_id) != true)
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOMPARE, NULL, "property list is not a member of the class");
if (!allow_default && H5P_is_default_plist(plist_id)) {
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOMPARE, NULL, "property list is a default list");
}
/* Get the plist structure */
if (NULL == (ret_value = (H5P_genplist_t *)H5I_object(plist_id)))
HGOTO_ERROR(H5E_ID, H5E_BADID, NULL, "can't find object for ID");

View File

@ -259,7 +259,7 @@ H5P__lacc_elink_fapl_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
if (l_fapl_id != H5P_DEFAULT) {
H5P_genplist_t *l_fapl_plist;
if (NULL == (l_fapl_plist = (H5P_genplist_t *)H5P_object_verify(l_fapl_id, H5P_FILE_ACCESS)))
if (NULL == (l_fapl_plist = (H5P_genplist_t *)H5P_object_verify(l_fapl_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "can't get property list");
if (((*(hid_t *)value) = H5P_copy_plist(l_fapl_plist, false)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy file access property list");
@ -298,7 +298,7 @@ H5P__lacc_elink_fapl_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED
if (l_fapl_id != H5P_DEFAULT) {
H5P_genplist_t *l_fapl_plist;
if (NULL == (l_fapl_plist = (H5P_genplist_t *)H5P_object_verify(l_fapl_id, H5P_FILE_ACCESS)))
if (NULL == (l_fapl_plist = (H5P_genplist_t *)H5P_object_verify(l_fapl_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "can't get property list");
if (((*(hid_t *)value) = H5P_copy_plist(l_fapl_plist, false)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy file access property list");
@ -334,7 +334,7 @@ H5P__lacc_elink_fapl_enc(const void *value, void **_pp, size_t *size)
/* Check for non-default FAPL */
if (*elink_fapl != H5P_DEFAULT) {
if (NULL == (fapl_plist = (H5P_genplist_t *)H5P_object_verify(*elink_fapl, H5P_FILE_ACCESS)))
if (NULL == (fapl_plist = (H5P_genplist_t *)H5P_object_verify(*elink_fapl, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property list");
non_default_fapl = true;
} /* end if */
@ -492,7 +492,7 @@ H5P__lacc_elink_fapl_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED
if (l_fapl_id != H5P_DEFAULT) {
H5P_genplist_t *l_fapl_plist;
if (NULL == (l_fapl_plist = (H5P_genplist_t *)H5P_object_verify(l_fapl_id, H5P_FILE_ACCESS)))
if (NULL == (l_fapl_plist = (H5P_genplist_t *)H5P_object_verify(l_fapl_id, H5P_FILE_ACCESS, true)))
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "can't get property list");
if (((*(hid_t *)value) = H5P_copy_plist(l_fapl_plist, false)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "unable to copy file access property list");
@ -861,7 +861,7 @@ H5Pset_nlinks(hid_t plist_id, size_t nlinks)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "number of links must be positive");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_LINK_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_LINK_ACCESS, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Set number of links */
@ -897,7 +897,7 @@ H5Pget_nlinks(hid_t plist_id, size_t *nlinks /*out*/)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid pointer passed in");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_LINK_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_LINK_ACCESS, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get the current number of links */
@ -928,7 +928,7 @@ H5Pset_elink_prefix(hid_t plist_id, const char *prefix)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_LINK_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_LINK_ACCESS, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Set prefix */
@ -963,7 +963,7 @@ H5Pget_elink_prefix(hid_t plist_id, char *prefix /*out*/, size_t size)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_LINK_ACCESS)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_LINK_ACCESS, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get the current prefix */
@ -1008,7 +1008,7 @@ H5Pset_elink_fapl(hid_t lapl_id, hid_t fapl_id)
FUNC_ENTER_API(FAIL)
/* Check arguments */
if (NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS)))
if (NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS, false)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a link access property list");
/* Set the file access property list for the link access */
@ -1038,7 +1038,7 @@ H5Pget_elink_fapl(hid_t lapl_id)
FUNC_ENTER_API(H5I_INVALID_HID)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS)))
if (NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, H5I_INVALID_HID, "can't find object for ID");
if (H5P_get(plist, H5L_ACS_ELINK_FAPL_NAME, &ret_value) < 0)
@ -1074,7 +1074,7 @@ H5Pset_elink_acc_flags(hid_t lapl_id, unsigned flags)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid file open flags");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS)))
if (NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Set flags */
@ -1104,7 +1104,7 @@ H5Pget_elink_acc_flags(hid_t lapl_id, unsigned *flags /*out*/)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS)))
if (NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get flags */
@ -1142,7 +1142,7 @@ H5Pset_elink_cb(hid_t lapl_id, H5L_elink_traverse_t func, void *op_data)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "callback is NULL while user data is not");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS)))
if (NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Populate the callback info struct */
@ -1177,7 +1177,7 @@ H5Pget_elink_cb(hid_t lapl_id, H5L_elink_traverse_t *func /*out*/, void **op_dat
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS)))
if (NULL == (plist = H5P_object_verify(lapl_id, H5P_LINK_ACCESS, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get callback_info */

View File

@ -141,7 +141,7 @@ H5Pset_create_intermediate_group(hid_t plist_id, unsigned crt_intmd_group)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_LINK_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_LINK_CREATE, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Set value */
@ -172,7 +172,7 @@ H5Pget_create_intermediate_group(hid_t plist_id, unsigned *crt_intmd_group /*out
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_LINK_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_LINK_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get values */

View File

@ -156,7 +156,7 @@ H5Pset_map_iterate_hints(hid_t mapl_id, size_t key_prefetch_size, size_t key_all
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(mapl_id, H5P_MAP_ACCESS)))
if (NULL == (plist = H5P_object_verify(mapl_id, H5P_MAP_ACCESS, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Set sizes */
@ -187,7 +187,7 @@ H5Pget_map_iterate_hints(hid_t mapl_id, size_t *key_prefetch_size /*out*/, size_
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(mapl_id, H5P_MAP_ACCESS)))
if (NULL == (plist = H5P_object_verify(mapl_id, H5P_MAP_ACCESS, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get the properties */

View File

@ -214,7 +214,7 @@ H5Pset_attr_phase_change(hid_t plist_id, unsigned max_compact, unsigned min_dens
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "min dense value must be < 65536");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Set property values */
@ -245,7 +245,7 @@ H5Pget_attr_phase_change(hid_t plist_id, unsigned *max_compact /*out*/, unsigned
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get values */
@ -285,7 +285,7 @@ H5Pset_attr_creation_order(hid_t plist_id, unsigned crt_order_flags)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "tracking creation order is required for index");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get object header flags */
@ -335,7 +335,7 @@ H5Pget_attr_creation_order(hid_t plist_id, unsigned *crt_order_flags /*out*/)
*crt_order_flags = 0;
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get object header flags */
@ -384,7 +384,7 @@ H5Pset_obj_track_times(hid_t plist_id, hbool_t track_times)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get object header flags */
@ -427,7 +427,7 @@ H5Pget_obj_track_times(hid_t plist_id, hbool_t *track_times /*out*/)
uint8_t ohdr_flags; /* Object header flags */
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get object header flags */
@ -551,7 +551,7 @@ H5Pmodify_filter(hid_t plist_id, H5Z_filter_t filter, unsigned int flags, size_t
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no client data values supplied");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Modify the filter parameters of the I/O pipeline */
@ -609,7 +609,7 @@ H5Pset_filter(hid_t plist_id, H5Z_filter_t filter, unsigned int flags, size_t cd
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no client data values supplied");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Call the private function */
@ -709,7 +709,7 @@ H5Pget_nfilters(hid_t plist_id)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get the pipeline property to query */
@ -779,7 +779,7 @@ H5Pget_filter2(hid_t plist_id, unsigned idx, unsigned int *flags /*out*/, size_t
} /* end if */
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, H5Z_FILTER_ERROR, "can't find object for ID");
/* Get the pipeline property to query */
@ -903,7 +903,7 @@ H5Pget_filter_by_id2(hid_t plist_id, H5Z_filter_t id, unsigned int *flags /*out*
} /* end if */
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get filter information */
@ -936,7 +936,7 @@ H5Pall_filters_avail(hid_t plist_id)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get the pipeline property to query */
@ -1003,7 +1003,7 @@ H5Premove_filter(hid_t plist_id, H5Z_filter_t filter)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get the pipeline property to modify */
@ -1054,7 +1054,7 @@ H5Pset_deflate(hid_t plist_id, unsigned level)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid deflate level");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get the pipeline property to append to */
@ -1093,7 +1093,7 @@ H5Pset_fletcher32(hid_t plist_id)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get the pipeline property to append to */
@ -1673,7 +1673,7 @@ H5Pget_filter1(hid_t plist_id, unsigned idx, unsigned int *flags /*out*/, size_t
} /* end if */
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, H5Z_FILTER_ERROR, "can't find object for ID");
/* Get pipeline info */
@ -1750,7 +1750,7 @@ H5Pget_filter_by_id1(hid_t plist_id, H5Z_filter_t id, unsigned int *flags /*out*
} /* end if */
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get filter info */

View File

@ -616,7 +616,7 @@ H5Pset_copy_object(hid_t plist_id, unsigned cpy_option)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "unknown option specified");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_COPY)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_COPY, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Set value */
@ -646,7 +646,7 @@ H5Pget_copy_object(hid_t plist_id, unsigned *cpy_option /*out*/)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_COPY)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_COPY, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get values */
@ -693,7 +693,7 @@ H5Padd_merge_committed_dtype_path(hid_t plist_id, const char *path)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "path is empty string");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_COPY)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_COPY, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get dtype list */
@ -745,7 +745,7 @@ H5Pfree_merge_committed_dtype_paths(hid_t plist_id)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_COPY)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_COPY, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get dtype list */
@ -795,7 +795,7 @@ H5Pset_mcdt_search_cb(hid_t plist_id, H5O_mcdt_search_cb_t func, void *op_data)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "callback is NULL while user data is not");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_COPY)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_COPY, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Populate the callback info struct */
@ -835,7 +835,7 @@ H5Pget_mcdt_search_cb(hid_t plist_id, H5O_mcdt_search_cb_t *func /*out*/, void *
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_COPY)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_COPY, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get callback info */

View File

@ -201,6 +201,7 @@ H5_DLL herr_t H5P_get_filter_by_id(H5P_genplist_t *plist, H5Z_filter_t id, unsig
size_t *cd_nelmts, unsigned cd_values[], size_t namelen, char name[],
unsigned *filter_config);
H5_DLL htri_t H5P_filter_in_pline(H5P_genplist_t *plist, H5Z_filter_t id);
H5_DLL bool H5P_is_default_plist(hid_t plist_id);
/* Query internal fields of the property list struct */
H5_DLL hid_t H5P_get_plist_id(const H5P_genplist_t *plist);
@ -208,7 +209,7 @@ H5_DLL H5P_genclass_t *H5P_get_class(const H5P_genplist_t *plist);
/* *SPECIAL* Don't make more of these! -QAK */
H5_DLL htri_t H5P_isa_class(hid_t plist_id, hid_t pclass_id);
H5_DLL H5P_genplist_t *H5P_object_verify(hid_t plist_id, hid_t pclass_id);
H5_DLL H5P_genplist_t *H5P_object_verify(hid_t plist_id, hid_t pclass_id, bool allow_default);
/* Private DCPL routines */
H5_DLL herr_t H5P_fill_value_defined(H5P_genplist_t *plist, H5D_fill_value_t *status);

View File

@ -146,7 +146,7 @@ H5Pset_char_encoding(hid_t plist_id, H5T_cset_t encoding)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "character encoding is not valid");
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_STRING_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_STRING_CREATE, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Set the character encoding */
@ -175,7 +175,7 @@ H5Pget_char_encoding(hid_t plist_id, H5T_cset_t *encoding /*out*/)
FUNC_ENTER_API(FAIL)
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(plist_id, H5P_STRING_CREATE)))
if (NULL == (plist = H5P_object_verify(plist_id, H5P_STRING_CREATE, true)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get value */

View File

@ -93,7 +93,7 @@ H5VL__native_attr_create(void *obj, const H5VL_loc_params_t *loc_params, const c
if (0 == (H5F_INTENT(loc.oloc->file) & H5F_ACC_RDWR))
HGOTO_ERROR(H5E_ARGS, H5E_WRITEERROR, NULL, "no write intent on file");
if (NULL == (plist = H5P_object_verify(aapl_id, H5P_ATTRIBUTE_ACCESS)))
if (NULL == (plist = H5P_object_verify(aapl_id, H5P_ATTRIBUTE_ACCESS, true)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "AAPL is not an attribute access property list");
if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
@ -154,7 +154,7 @@ H5VL__native_attr_open(void *obj, const H5VL_loc_params_t *loc_params, const cha
if (H5G_loc_real(obj, loc_params->obj_type, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file or file object");
if (NULL == (plist = H5P_object_verify(aapl_id, H5P_ATTRIBUTE_ACCESS)))
if (NULL == (plist = H5P_object_verify(aapl_id, H5P_ATTRIBUTE_ACCESS, true)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "AAPL is not an attribute access property list");
if (loc_params->type == H5VL_OBJECT_BY_SELF) {

View File

@ -133,7 +133,7 @@ H5VL__native_dataset_io_setup(size_t count, void *obj[], hid_t mem_type_id[], hi
H5S_t *space; /* Dataspace to hold selection */
/* Get the plist structure */
if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER)))
if (NULL == (plist = H5P_object_verify(dxpl_id, H5P_DATASET_XFER, true)))
HGOTO_ERROR(H5E_DATASET, H5E_BADID, FAIL, "bad dataset transfer property list");
/* Get a pointer to the file space in the property list */

View File

@ -469,7 +469,7 @@ H5Z__check_unregister(hid_t ocpl_id, H5Z_filter_t filter_id)
FUNC_ENTER_PACKAGE
/* Get the plist structure of object creation */
if (NULL == (plist = H5P_object_verify(ocpl_id, H5P_OBJECT_CREATE)))
if (NULL == (plist = H5P_object_verify(ocpl_id, H5P_OBJECT_CREATE, true)))
HGOTO_ERROR(H5E_PLINE, H5E_BADID, FAIL, "can't find object for ID");
/* Check if the object creation property list uses the filter */

View File

@ -825,7 +825,7 @@ H5Z__set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for cd_values[]");
/* Get the plist structure */
if (NULL == (dcpl_plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE)))
if (NULL == (dcpl_plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get the filter's current parameters */

View File

@ -938,7 +938,7 @@ H5Z__set_local_scaleoffset(hid_t dcpl_id, hid_t type_id, hid_t space_id)
FUNC_ENTER_PACKAGE
/* Get the plist structure */
if (NULL == (dcpl_plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE)))
if (NULL == (dcpl_plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get datatype */

View File

@ -64,7 +64,7 @@ H5Z__set_local_shuffle(hid_t dcpl_id, hid_t type_id, hid_t H5_ATTR_UNUSED space_
FUNC_ENTER_PACKAGE
/* Get the plist structure */
if (NULL == (dcpl_plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE)))
if (NULL == (dcpl_plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get datatype */

View File

@ -130,7 +130,7 @@ H5Z__set_local_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id)
FUNC_ENTER_PACKAGE
/* Get the plist structure */
if (NULL == (dcpl_plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE)))
if (NULL == (dcpl_plist = H5P_object_verify(dcpl_id, H5P_DATASET_CREATE, false)))
HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID");
/* Get datatype */

View File

@ -1926,6 +1926,80 @@ test_genprop_refcount(void)
} /* ent test_genprop_refcount() */
/****************************************************************
**
** test_set_default_plist_fail(): Test that the default property lists are unmodifiable
**
****************************************************************/
static void
test_set_default_plist_fail(void)
{
hid_t vol_id = H5I_INVALID_HID;
herr_t ret = FAIL;
/* Output message about test being performed */
MESSAGE(5, ("Testing that default property lists are unmodifiable\n"));
/* Attempt to modify the default generic property list */
H5E_BEGIN_TRY
{
ret = H5Pset_vol(H5P_DEFAULT, H5VL_NATIVE, NULL);
}
H5E_END_TRY
VERIFY(ret, FAIL, "H5Pset_vol");
H5E_BEGIN_TRY
{
ret = H5Pset_userblock(H5P_FILE_CREATE_DEFAULT, 1024);
}
H5E_END_TRY
VERIFY(ret, FAIL, "H5Pset_userblock");
H5E_BEGIN_TRY
{
ret = H5Pset_layout(H5P_DATASET_CREATE_DEFAULT, H5D_CONTIGUOUS);
}
H5E_END_TRY
VERIFY(ret, FAIL, "H5Pset_layout");
H5E_BEGIN_TRY
{
ret = H5Pset_efile_prefix(H5P_DATASET_ACCESS_DEFAULT, "prefix");
}
H5E_END_TRY
VERIFY(ret, FAIL, "H5Pset_efile_prefix");
H5E_BEGIN_TRY
{
ret = H5Pset_vol(H5P_FILE_ACCESS_DEFAULT, vol_id, NULL);
}
H5E_END_TRY
VERIFY(ret, FAIL, "H5Pset_vol");
H5E_BEGIN_TRY
{
ret = H5Pset_preserve(H5P_DATASET_XFER_DEFAULT, true);
}
H5E_END_TRY
VERIFY(ret, FAIL, "H5Pset_preserve");
H5E_BEGIN_TRY
{
ret = H5Pset_local_heap_size_hint(H5P_GROUP_CREATE_DEFAULT, 0);
}
H5E_END_TRY
VERIFY(ret, FAIL, "H5Pset_local_heap_size_hint");
return;
}
#ifndef H5_NO_DEPRECATED_SYMBOLS
/****************************************************************
**
@ -2167,6 +2241,8 @@ test_genprop(const void H5_ATTR_UNUSED *params)
test_genprop_list_add_remove_prop(); /* Test adding and removing the same property several times to HDF5
property list */
test_set_default_plist_fail(); /* Test that default property lists cannot be modified */
test_genprop_equal(); /* Tests for more H5Pequal verification */
test_genprop_path(); /* Tests for class path verification */
test_genprop_refcount(); /* Tests for class reference counting */