summaryrefslogtreecommitdiffstats
path: root/src/H5PLint.c
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2018-12-23 06:18:42 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2018-12-23 06:18:42 (GMT)
commitc3f51c52d098d6cd2e6c2955a50140bdb45571c6 (patch)
tree3fbc8a16ba3140b0f7ed1febfbff9afb511073bd /src/H5PLint.c
parent251ba120b5e3277a0e53e9ea2417f6b370cf7d05 (diff)
parent7d28a4295ebac24dd0a84da9f4b880488d8bd32f (diff)
downloadhdf5-c3f51c52d098d6cd2e6c2955a50140bdb45571c6.zip
hdf5-c3f51c52d098d6cd2e6c2955a50140bdb45571c6.tar.gz
hdf5-c3f51c52d098d6cd2e6c2955a50140bdb45571c6.tar.bz2
Merge branch 'develop' of https://bitbucket.hdfgroup.org/scm/~bmribler/hdf5_bmr_fixbug into develop
Diffstat (limited to 'src/H5PLint.c')
-rw-r--r--src/H5PLint.c39
1 files changed, 27 insertions, 12 deletions
diff --git a/src/H5PLint.c b/src/H5PLint.c
index 166b300..ded315a 100644
--- a/src/H5PLint.c
+++ b/src/H5PLint.c
@@ -30,7 +30,6 @@
#include "H5Eprivate.h" /* Error handling */
#include "H5MMprivate.h" /* Memory management */
#include "H5PLpkg.h" /* Plugin */
-#include "H5VLprivate.h" /* Virtual Object Layer */
#include "H5Zprivate.h" /* Filter pipeline */
@@ -236,7 +235,7 @@ done:
*-------------------------------------------------------------------------
*/
const void *
-H5PL_load(H5PL_type_t type, H5PL_key_t key)
+H5PL_load(H5PL_type_t type, const H5PL_key_t *key)
{
H5PL_search_params_t search_params; /* Plugin search parameters */
hbool_t found = FALSE; /* Whether the plugin was found */
@@ -263,7 +262,7 @@ H5PL_load(H5PL_type_t type, H5PL_key_t key)
/* Set up the search parameters */
search_params.type = type;
- search_params.key.id = key.id;
+ search_params.key = key;
/* Search in the table of already loaded plugin libraries */
if(H5PL__find_plugin_in_cache(&search_params, &found, &plugin_info) < 0)
@@ -308,7 +307,8 @@ done:
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
herr_t
-H5PL__open(const char *path, H5PL_type_t type, H5PL_key_t key, hbool_t *success, const void **plugin_info)
+H5PL__open(const char *path, H5PL_type_t type, const H5PL_key_t *key,
+ hbool_t *success, const void **plugin_info)
{
H5PL_HANDLE handle = NULL;
H5PL_get_plugin_info_t get_plugin_info = NULL;
@@ -350,29 +350,44 @@ H5PL__open(const char *path, H5PL_type_t type, H5PL_key_t key, hbool_t *success,
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "can't get filter info from plugin")
/* If the filter IDs match, we're done. Set the output parameters. */
- if (filter_info->id == key.id) {
+ if (filter_info->id == key->id) {
*plugin_info = (const void *)filter_info;
*success = TRUE;
}
break;
}
+
case H5PL_TYPE_VOL:
{
- const H5VL_class_t *cls = NULL;
+ const H5VL_class_t *cls;
/* Get the plugin info */
- if (NULL == (cls = (const H5VL_class_t *)(*get_plugin_info)()))
+ if(NULL == (cls = (const H5VL_class_t *)(*get_plugin_info)()))
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTGET, FAIL, "can't get VOL driver info from plugin")
- /* If the plugin names match, we're done. Set the output parameters. */
- if (cls->name && !HDstrcmp(cls->name, key.name)) {
- *plugin_info = (const void *)cls;
- *success = TRUE;
- }
+ /* 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 */
break;
}
+
case H5PL_TYPE_ERROR:
case H5PL_TYPE_NONE:
default: