summaryrefslogtreecommitdiffstats
path: root/src/H5PLint.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@lbl.gov>2020-12-10 22:30:07 (GMT)
committerGitHub <noreply@github.com>2020-12-10 22:30:07 (GMT)
commitebe9a3966fcbd3e154d43dd31ba9b219c575e781 (patch)
tree6611d5c941849e6bb9087967a63736ae9eff183c /src/H5PLint.c
parentff04956a6cbdda015cb6c5239d7d6007976fd2a4 (diff)
downloadhdf5-ebe9a3966fcbd3e154d43dd31ba9b219c575e781.zip
hdf5-ebe9a3966fcbd3e154d43dd31ba9b219c575e781.tar.gz
hdf5-ebe9a3966fcbd3e154d43dd31ba9b219c575e781.tar.bz2
Merge VOL framework versioning to 1.12 (#154)
* Enforce VOL framework version compatibility when registering connectors. Also add a version for the connector itself, some refactoring on the register calls, and move the logic for matching / rejecting a VOL connector class from the plugin module to the VOL module. (#151) * Revise VOL framework version compatibility for the 1.12 release branch
Diffstat (limited to 'src/H5PLint.c')
-rw-r--r--src/H5PLint.c29
1 files changed, 9 insertions, 20 deletions
diff --git a/src/H5PLint.c b/src/H5PLint.c
index 0975a9e..3b9683b 100644
--- a/src/H5PLint.c
+++ b/src/H5PLint.c
@@ -354,30 +354,19 @@ H5PL__open(const char *path, H5PL_type_t type, const H5PL_key_t *key, hbool_t *s
}
case H5PL_TYPE_VOL: {
- const H5VL_class_t *cls;
+ const void *cls;
/* Get the plugin info */
- if (NULL == (cls = (const H5VL_class_t *)(*get_plugin_info)()))
+ if (NULL == (cls = (const void *)(*get_plugin_info)()))
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "can't get VOL connector info from plugin")
- /* Which kind of key are we looking for? */
- if (key->vol.kind == H5VL_GET_CONNECTOR_BY_NAME) {
- /* If the plugin names match, we're done. Set the output parameters. */
- if (cls->name && !HDstrcmp(cls->name, key->vol.u.name)) {
- *plugin_info = (const void *)cls;
- *success = TRUE;
- } /* end if */
- } /* end if */
- else {
- /* Sanity check */
- HDassert(key->vol.kind == H5VL_GET_CONNECTOR_BY_VALUE);
-
- /* If the plugin values match, we're done. Set the output parameters. */
- if (cls->value == key->vol.u.value) {
- *plugin_info = (const void *)cls;
- *success = TRUE;
- } /* end if */
- } /* end else */
+ /* Ask VOL interface if this class is the one we are looking for and is compatible, etc */
+ if (H5VL_check_plugin_load(cls, key, success) < 0)
+ HGOTO_ERROR(H5E_PLUGIN, H5E_CANTLOAD, FAIL, "VOL connector compatibility check failed")
+
+ /* Check for finding the correct plugin */
+ if (*success)
+ *plugin_info = cls;
break;
}