diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2019-03-10 03:41:38 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2019-03-10 03:41:38 (GMT) |
commit | deeb302747fe186d18bbf3e47d750ce6e47aef62 (patch) | |
tree | eb74d361608c829e7a531165378a5af873ff7ad2 /src/H5Pfapl.c | |
parent | 679b49d43d744f0cc34054944e827326f17a6f3d (diff) | |
download | hdf5-deeb302747fe186d18bbf3e47d750ce6e47aef62.zip hdf5-deeb302747fe186d18bbf3e47d750ce6e47aef62.tar.gz hdf5-deeb302747fe186d18bbf3e47d750ce6e47aef62.tar.bz2 |
Specify the default VOL connector to use with an environment variable.
This implicitly adds support for changing the VOL connector for command-line
tools or any application linked with the library.
Also, add 'make check-vol' support for all directories, clearing up necessary
issues in testing scripts, etc.
Diffstat (limited to 'src/H5Pfapl.c')
-rw-r--r-- | src/H5Pfapl.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c index bfb52ff..4b9bbdc 100644 --- a/src/H5Pfapl.c +++ b/src/H5Pfapl.c @@ -4907,6 +4907,43 @@ done: /*------------------------------------------------------------------------- + * Function: H5P_reset_vol_class + * + * Purpose: Change the VOL connector for a file access property class. + * + * Note: The VOL property will be copied into the property list and + * the reference count on the previous VOL will _NOT_ be decremented. + * The reference count on the new VOL will _NOT_ be incremented. + * + * Return: SUCCEED/FAIL + * + * Programmer: Quincey Koziol + * March 8, 2019 + * + *------------------------------------------------------------------------- + */ +herr_t +H5P_reset_vol_class(const H5P_genclass_t *pclass, const H5VL_connector_prop_t *vol_prop) +{ + H5VL_connector_prop_t old_vol_prop; /* Previous VOL connector property */ + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(FAIL) + + /* Get the connector ID & info property */ + if(H5P__class_get(pclass, H5F_ACS_VOL_CONN_NAME, &old_vol_prop) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get VOL connector ID & info") + + /* Set the new connector ID & info property */ + if(H5P__class_set(pclass, H5F_ACS_VOL_CONN_NAME, vol_prop) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set VOL connector ID & info") + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5P_set_vol_class() */ + + +/*------------------------------------------------------------------------- * Function: H5Pset_vol * * Purpose: Set the file VOL connector (VOL_ID) for a file access |