summaryrefslogtreecommitdiffstats
path: root/src/H5VL.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2020-04-08 23:44:19 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2020-04-08 23:44:19 (GMT)
commit35c0d5cdfcfaa84f59e1c596ba1ccaeb28e3d83d (patch)
treed5d6bf5dea5abf5fbb1dc32ff5a64507ee608998 /src/H5VL.c
parentb27a20f8c0e286ea7c2836605632ea2ee5522d03 (diff)
downloadhdf5-35c0d5cdfcfaa84f59e1c596ba1ccaeb28e3d83d.zip
hdf5-35c0d5cdfcfaa84f59e1c596ba1ccaeb28e3d83d.tar.gz
hdf5-35c0d5cdfcfaa84f59e1c596ba1ccaeb28e3d83d.tar.bz2
Fix for passthrough VOL not passing tools tests due to incorrect
optional callback queries.
Diffstat (limited to 'src/H5VL.c')
-rw-r--r--src/H5VL.c37
1 files changed, 36 insertions, 1 deletions
diff --git a/src/H5VL.c b/src/H5VL.c
index f83baf2..c4f38dd 100644
--- a/src/H5VL.c
+++ b/src/H5VL.c
@@ -903,7 +903,7 @@ H5VLfree_lib_state(void *state)
/* Check args */
if(NULL == state)
- HGOTO_ERROR(H5E_VOL, H5E_BADVALUE, FAIL, "invalid state pointer")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid state pointer")
/* Free the library state */
if(H5VL_free_lib_state(state) < 0)
@@ -913,3 +913,38 @@ done:
FUNC_LEAVE_API(ret_value)
} /* H5VLfree_lib_state() */
+
+/*---------------------------------------------------------------------------
+ * Function: H5VLquery_optional
+ *
+ * Purpose: Determine if a VOL connector supports a particular optional
+ * callback operation.
+ *
+ * Return: Success: Non-negative
+ * Failure: Negative
+ *
+ *---------------------------------------------------------------------------
+ */
+herr_t
+H5VLquery_optional(hid_t obj_id, H5VL_subclass_t subcls, int opt_type, hbool_t *supported)
+{
+ H5VL_object_t *vol_obj = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE4("e", "iVSIs*b", obj_id, subcls, opt_type, supported);
+
+ /* Check args */
+ if(NULL == supported)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid supported pointer")
+ if(NULL == (vol_obj = (H5VL_object_t *)H5I_object(obj_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier")
+
+ /* Query the connector */
+ if(H5VL_introspect_opt_query(vol_obj, subcls, opt_type, supported) < 0)
+ HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "unable to query VOL connector support")
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* H5VLquery_optional() */
+