summaryrefslogtreecommitdiffstats
path: root/src/H5Fmount.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@lbl.gov>2020-11-30 19:54:44 (GMT)
committerGitHub <noreply@github.com>2020-11-30 19:54:44 (GMT)
commitcadd6db431e2664e6dd3f2460639a27d21c6c8a9 (patch)
tree79bad4f1b2615f8662499a6d986e89514894acf8 /src/H5Fmount.c
parentc256612e0950f3389249aa3a151d66ce01704d89 (diff)
downloadhdf5-cadd6db431e2664e6dd3f2460639a27d21c6c8a9.zip
hdf5-cadd6db431e2664e6dd3f2460639a27d21c6c8a9.tar.gz
hdf5-cadd6db431e2664e6dd3f2460639a27d21c6c8a9.tar.bz2
Move API routines for VOL objects to main source file. (#133)
Diffstat (limited to 'src/H5Fmount.c')
-rw-r--r--src/H5Fmount.c115
1 files changed, 0 insertions, 115 deletions
diff --git a/src/H5Fmount.c b/src/H5Fmount.c
index 20c243e..340bf5d 100644
--- a/src/H5Fmount.c
+++ b/src/H5Fmount.c
@@ -424,121 +424,6 @@ H5F_is_mount(const H5F_t *file)
} /* end H5F_is_mount() */
/*-------------------------------------------------------------------------
- * Function: H5Fmount
- *
- * Purpose: Mount file CHILD_ID onto the group specified by LOC_ID and
- * NAME using mount properties PLIST_ID.
- *
- * Return: SUCCEED/FAIL
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5Fmount(hid_t loc_id, const char *name, hid_t child_id, hid_t plist_id)
-{
- H5VL_object_t *loc_vol_obj = NULL; /* Parent object */
- H5VL_object_t *child_vol_obj = NULL; /* Child object */
- H5I_type_t loc_type; /* ID type of location */
- H5I_type_t child_type; /* ID type of child */
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_API(FAIL)
- H5TRACE4("e", "i*sii", loc_id, name, child_id, plist_id);
-
- /* Check arguments */
- loc_type = H5I_get_type(loc_id);
- if (H5I_FILE != loc_type && H5I_GROUP != loc_type)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "loc_id parameter not a file or group ID")
- if (!name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be NULL")
- if (!*name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be the empty string")
- child_type = H5I_get_type(child_id);
- if (H5I_FILE != child_type)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "child_id parameter not a file ID")
- if (H5P_DEFAULT == plist_id)
- plist_id = H5P_FILE_MOUNT_DEFAULT;
- else if (TRUE != H5P_isa_class(plist_id, H5P_FILE_MOUNT))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "plist_id is not a file mount property list ID")
-
- /* Set up collective metadata if appropriate */
- if (H5CX_set_loc(loc_id) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set collective metadata read info")
-
- /* Get the location object */
- if (NULL == (loc_vol_obj = (H5VL_object_t *)H5I_object(loc_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "could not get location object")
-
- /* Get the child object */
- if (NULL == (child_vol_obj = (H5VL_object_t *)H5I_object(child_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "could not get child object")
-
- /* Check if both objects are associated with the same VOL connector */
- if (loc_vol_obj->connector->cls->value != child_vol_obj->connector->cls->value)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "Can't mount file onto object from different VOL connector")
-
- /* Perform the mount operation */
- if (H5VL_file_specific(loc_vol_obj, H5VL_FILE_MOUNT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL,
- (int)loc_type, name, child_vol_obj->data, plist_id) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "unable to mount file")
-
-done:
- FUNC_LEAVE_API(ret_value)
-} /* end H5Fmount() */
-
-/*-------------------------------------------------------------------------
- * Function: H5Funmount
- *
- * Purpose: Given a mount point, dissassociate the mount point's file
- * from the file mounted there. Do not close either file.
- *
- * The mount point can either be the group in the parent or the
- * root group of the mounted file (both groups have the same
- * name). If the mount point was opened before the mount then
- * it's the group in the parent, but if it was opened after the
- * mount then it's the root group of the child.
- *
- * Return: SUCCEED/FAIL
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5Funmount(hid_t loc_id, const char *name)
-{
- H5VL_object_t *vol_obj = NULL; /* Parent object */
- H5I_type_t loc_type; /* ID type of location */
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_API(FAIL)
- H5TRACE2("e", "i*s", loc_id, name);
-
- /* Check arguments */
- loc_type = H5I_get_type(loc_id);
- if (H5I_FILE != loc_type && H5I_GROUP != loc_type)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "loc_id parameter not a file or group ID")
- if (!name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be NULL")
- if (!*name)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "name parameter cannot be the empty string")
-
- /* Set up collective metadata if appropriate */
- if (H5CX_set_loc(loc_id) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set collective metadata read info")
-
- /* Get the location object */
- if (NULL == (vol_obj = (H5VL_object_t *)H5I_object(loc_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "could not get location object")
-
- /* Perform the unmount operation */
- if (H5VL_file_specific(vol_obj, H5VL_FILE_UNMOUNT, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL,
- (int)loc_type, name) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "unable to unmount file")
-
-done:
- FUNC_LEAVE_API(ret_value)
-} /* end H5Funmount() */
-
-/*-------------------------------------------------------------------------
* Function: H5F__mount_count_ids_recurse
*
* Purpose: Helper routine for counting number of open IDs in mount