summaryrefslogtreecommitdiffstats
path: root/src/H5F.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2018-10-27 07:06:43 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2018-10-27 07:06:43 (GMT)
commit43ffc1deb5f0a5e1defe38870eccb068e61d87c4 (patch)
treecd7ed40fcadf3b2325e009f1bb1e44a96e5d0fc9 /src/H5F.c
parent83e03772ebd3bc8dee8692fe9c11f2180d7b2c49 (diff)
downloadhdf5-43ffc1deb5f0a5e1defe38870eccb068e61d87c4.zip
hdf5-43ffc1deb5f0a5e1defe38870eccb068e61d87c4.tar.gz
hdf5-43ffc1deb5f0a5e1defe38870eccb068e61d87c4.tar.bz2
Remove some VOL-specific internal coding.
Diffstat (limited to 'src/H5F.c')
-rw-r--r--src/H5F.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/H5F.c b/src/H5F.c
index 134eca6..6fb323e 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -615,7 +615,6 @@ H5Fcreate(const char *filename, unsigned flags, hid_t fcpl_id, hid_t fapl_id)
H5P_genplist_t *plist; /* Property list pointer */
H5VL_class_t *cls = NULL; /* VOL Class structure for callback info */
- H5VL_t *plugin = NULL; /* VOL plugin struct */
H5VL_plugin_prop_t plugin_prop; /* Property for VOL plugin ID & info */
hid_t ret_value; /* return value */
@@ -668,16 +667,8 @@ H5Fcreate(const char *filename, unsigned flags, hid_t fcpl_id, hid_t fapl_id)
H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, H5I_INVALID_HID, "unable to create file")
- /* Setup VOL plugin struct */
- if(NULL == (plugin = H5FL_CALLOC(H5VL_t)))
- HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, H5I_INVALID_HID, "can't allocate VL info struct")
- plugin->cls = cls;
- plugin->id = plugin_prop.plugin_id;
- if(H5I_inc_ref(plugin->id, FALSE) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTINC, H5I_INVALID_HID, "unable to increment ref count on VOL plugin")
-
/* Get an atom for the file */
- if((ret_value = H5VL_register(H5I_FILE, new_file, plugin, TRUE)) < 0)
+ if((ret_value = H5VL_register_using_vol_id(H5I_FILE, new_file, plugin_prop.plugin_id, TRUE)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to atomize file handle")
done:
@@ -711,7 +702,6 @@ H5Fopen(const char *filename, unsigned flags, hid_t fapl_id)
H5P_genplist_t *plist; /* Property list pointer */
H5VL_plugin_prop_t plugin_prop; /* Property for VOL plugin ID & info */
H5VL_class_t *cls = NULL; /* VOL class structure for callback info */
- H5VL_t *plugin = NULL; /* VOL plugin struct */
hid_t ret_value; /* return value */
FUNC_ENTER_API(H5I_INVALID_HID)
@@ -748,16 +738,8 @@ H5Fopen(const char *filename, unsigned flags, hid_t fapl_id)
if(NULL == (new_file = H5VL_file_open(cls, filename, flags, fapl_id, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL)))
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, H5I_INVALID_HID, "unable to open file")
- /* Setup VOL plugin struct */
- if(NULL == (plugin = H5FL_CALLOC(H5VL_t)))
- HGOTO_ERROR(H5E_FILE, H5E_NOSPACE, H5I_INVALID_HID, "can't allocate VL info struct")
- plugin->cls = cls;
- plugin->id = plugin_prop.plugin_id;
- if(H5I_inc_ref(plugin->id, FALSE) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTINC, H5I_INVALID_HID, "unable to increment ref count on VOL plugin")
-
/* Get an ID for the file */
- if((ret_value = H5VL_register(H5I_FILE, new_file, plugin, TRUE)) < 0)
+ if((ret_value = H5VL_register_using_vol_id(H5I_FILE, new_file, plugin_prop.plugin_id, TRUE)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to atomize file handle")
done: