summaryrefslogtreecommitdiffstats
path: root/src/H5VL.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2021-12-08 17:40:30 (GMT)
committerGitHub <noreply@github.com>2021-12-08 17:40:30 (GMT)
commit0247538fc5226b0899f00c45adab2a454627de02 (patch)
tree2e56201d9a70296920e96e9ba2edb09353ce2d5f /src/H5VL.c
parent1ca806a04eb28c1b1307fcc804a45e4722ff8563 (diff)
downloadhdf5-0247538fc5226b0899f00c45adab2a454627de02.zip
hdf5-0247538fc5226b0899f00c45adab2a454627de02.tar.gz
hdf5-0247538fc5226b0899f00c45adab2a454627de02.tar.bz2
VFD SWMR: Normalization with develop (#1270)
Brings many October-November changes from develop
Diffstat (limited to 'src/H5VL.c')
-rw-r--r--src/H5VL.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/H5VL.c b/src/H5VL.c
index 2cece6d..8c3277c 100644
--- a/src/H5VL.c
+++ b/src/H5VL.c
@@ -655,6 +655,39 @@ done:
FUNC_LEAVE_API(ret_value)
} /* H5VLobject() */
+/*---------------------------------------------------------------------------
+ * Function: H5VLobject_is_native
+ *
+ * Purpose: Determines whether an object ID represents a native VOL
+ * connector object.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ *---------------------------------------------------------------------------
+ */
+herr_t
+H5VLobject_is_native(hid_t obj_id, hbool_t *is_native)
+{
+ H5VL_object_t *vol_obj = NULL;
+ herr_t ret_value = SUCCEED;
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE2("e", "i*b", obj_id, is_native);
+
+ if (!is_native)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "`is_native` argument is NULL")
+
+ /* Get the location object for the ID */
+ if (NULL == (vol_obj = H5VL_vol_object(obj_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid object identifier")
+
+ if (H5VL_object_is_native(vol_obj, is_native) < 0)
+ HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't determine if object is a native connector object")
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* H5VLobject_is_native() */
+
/*-------------------------------------------------------------------------
* Function: H5VLget_file_type
*