summaryrefslogtreecommitdiffstats
path: root/src/H5VL.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2019-06-05 20:04:06 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2019-06-05 20:04:06 (GMT)
commitb31a53bfcbea9a0cb157fa0390f3e197d1420493 (patch)
tree000b1ca72ade49e7aa07aa39e0822263ca1fcfaf /src/H5VL.c
parentcb82b6c22262bb7d605e4f723b09bc834282e9c4 (diff)
parenta18727bc77c90a9925cabbde8d8ec46c757c6254 (diff)
downloadhdf5-b31a53bfcbea9a0cb157fa0390f3e197d1420493.zip
hdf5-b31a53bfcbea9a0cb157fa0390f3e197d1420493.tar.gz
hdf5-b31a53bfcbea9a0cb157fa0390f3e197d1420493.tar.bz2
Merge pull request #1719 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:vipl to develop
* commit 'a18727bc77c90a9925cabbde8d8ec46c757c6254': Added a VOL initialization property list type.
Diffstat (limited to 'src/H5VL.c')
-rw-r--r--src/H5VL.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/H5VL.c b/src/H5VL.c
index d4c0ff2..2cd5f02 100644
--- a/src/H5VL.c
+++ b/src/H5VL.c
@@ -31,6 +31,7 @@
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
#include "H5Iprivate.h" /* IDs */
+#include "H5Pprivate.h" /* Property lists */
#include "H5VLpkg.h" /* Virtual Object Layer */
/* VOL connectors */
@@ -101,6 +102,13 @@ H5VLregister_connector(const H5VL_class_t *cls, hid_t vipl_id)
if (cls->wrap_cls.get_wrap_ctx && !cls->wrap_cls.free_wrap_ctx)
HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "VOL connector must provide free callback for object wrapping contexts when a get callback is provided")
+ /* Check VOL initialization property list */
+ if(H5P_DEFAULT == vipl_id)
+ vipl_id = H5P_VOL_INITIALIZE_DEFAULT;
+ else
+ if(TRUE != H5P_isa_class(vipl_id, H5P_VOL_INITIALIZE))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a VOL initialize property list")
+
/* Register connector */
if((ret_value = H5VL__register_connector(cls, TRUE, vipl_id)) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register VOL connector")
@@ -138,6 +146,13 @@ H5VLregister_connector_by_name(const char *name, hid_t vipl_id)
if (0 == HDstrlen(name))
HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, H5I_INVALID_HID, "zero-length VOL connector name is disallowed")
+ /* Check VOL initialization property list */
+ if(H5P_DEFAULT == vipl_id)
+ vipl_id = H5P_VOL_INITIALIZE_DEFAULT;
+ else
+ if(TRUE != H5P_isa_class(vipl_id, H5P_VOL_INITIALIZE))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a VOL initialize property list")
+
/* Register connector */
if((ret_value = H5VL__register_connector_by_name(name, TRUE, vipl_id)) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register VOL connector")
@@ -173,6 +188,13 @@ H5VLregister_connector_by_value(H5VL_class_value_t value, hid_t vipl_id)
if(value < 0)
HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, H5I_INVALID_HID, "negative VOL connector value is disallowed")
+ /* Check VOL initialization property list */
+ if(H5P_DEFAULT == vipl_id)
+ vipl_id = H5P_VOL_INITIALIZE_DEFAULT;
+ else
+ if(TRUE != H5P_isa_class(vipl_id, H5P_VOL_INITIALIZE))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a VOL initialize property list")
+
/* Register connector */
if((ret_value = H5VL__register_connector_by_value(value, TRUE, vipl_id)) < 0)
HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register VOL connector")