summaryrefslogtreecommitdiffstats
path: root/src/H5F.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2018-10-27 07:21:48 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2018-10-27 07:21:48 (GMT)
commit9c7b96b42fa8f2a0f02c7ba72173c09424d740c3 (patch)
tree7545157ac3fd8b8a88a0d543bef59f75455c71d1 /src/H5F.c
parent43ffc1deb5f0a5e1defe38870eccb068e61d87c4 (diff)
downloadhdf5-9c7b96b42fa8f2a0f02c7ba72173c09424d740c3.zip
hdf5-9c7b96b42fa8f2a0f02c7ba72173c09424d740c3.tar.gz
hdf5-9c7b96b42fa8f2a0f02c7ba72173c09424d740c3.tar.bz2
Move (final?) file operation from directly calling into library code to using
the file_optional VOL callback.
Diffstat (limited to 'src/H5F.c')
-rw-r--r--src/H5F.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/H5F.c b/src/H5F.c
index 6fb323e..3cfd3eb 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -1765,21 +1765,19 @@ done:
herr_t
H5Fget_mdc_image_info(hid_t file_id, haddr_t *image_addr, hsize_t *image_len)
{
- H5F_t *file; /* File object for file ID */
+ H5VL_object_t *vol_obj; /* File info */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE3("e", "i*a*h", file_id, image_addr, image_len);
/* Check args */
- if(NULL == (file = (H5F_t *)H5VL_object_verify(file_id, H5I_FILE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID")
- if(NULL == image_addr || NULL == image_len)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "NULL image addr or image len")
+ if(NULL == (vol_obj = (H5VL_object_t *)H5I_object_verify(file_id, H5I_FILE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "hid_t identifier is not a file ID")
/* Go get the address and size of the cache image */
- if(H5AC_get_mdc_image_info(file->shared->cache, image_addr, image_len) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTGET, FAIL, "can't retrieve cache image info")
+ if(H5VL_file_optional(vol_obj->data, vol_obj->plugin->cls, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_GET_MDC_IMAGE_INFO, image_addr, image_len) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve cache image info")
done:
FUNC_LEAVE_API(ret_value)