summaryrefslogtreecommitdiffstats
path: root/src/H5Oshared.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-06-26 22:01:43 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-06-26 22:01:43 (GMT)
commit8d72542a50fac7a747fe0bfec8d2285de8efd29f (patch)
treeda26f38920601ae4274e77d3363767ca057a66ab /src/H5Oshared.c
parent785938ace19e2533ab94c14b6cd8de508fe18f15 (diff)
downloadhdf5-8d72542a50fac7a747fe0bfec8d2285de8efd29f.zip
hdf5-8d72542a50fac7a747fe0bfec8d2285de8efd29f.tar.gz
hdf5-8d72542a50fac7a747fe0bfec8d2285de8efd29f.tar.bz2
[svn-r12439] Purpose:
New feature Description: Check in Peter's code to add support for "shallow copy", "create intermediate groups", "no attributes" and "expand soft links" support. Platforms tested: FreeBSD 4.11 (sleipnir) Linux 2.4 (chicago) w/ & w/o group-revision enabled h5committest
Diffstat (limited to 'src/H5Oshared.c')
-rw-r--r--src/H5Oshared.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/H5Oshared.c b/src/H5Oshared.c
index ccdb61c..dc5ea6f 100644
--- a/src/H5Oshared.c
+++ b/src/H5Oshared.c
@@ -43,9 +43,9 @@ static size_t H5O_shared_size (const H5F_t*, const void *_mesg);
static herr_t H5O_shared_delete(H5F_t *f, hid_t dxpl_id, const void *_mesg, hbool_t adj_link);
static herr_t H5O_shared_link(H5F_t *f, hid_t dxpl_id, const void *_mesg);
static herr_t H5O_shared_pre_copy_file(H5F_t *file_src, const H5O_msg_class_t *type,
- void *mesg_src, void *_udata);
+ void *mesg_src, hbool_t *deleted, const H5O_copy_t *cpy_info, void *_udata);
static void *H5O_shared_copy_file(H5F_t *file_src, void *native_src,
- H5F_t *file_dst, hid_t dxpl_id, unsigned cpy_option, H5SL_t *map_list, void *udata);
+ H5F_t *file_dst, hid_t dxpl_id, H5O_copy_t *cpy_info, void *udata);
static herr_t H5O_shared_debug (H5F_t*, hid_t dxpl_id, const void*, FILE*, int, int);
/* This message derives from H5O message class */
@@ -429,7 +429,7 @@ done:
*/
static void *
H5O_shared_copy_file(H5F_t UNUSED *file_src, void *native_src, H5F_t *file_dst,
- hid_t dxpl_id, unsigned cpy_option, H5SL_t *map_list, void UNUSED *udata)
+ hid_t dxpl_id, H5O_copy_t *cpy_info, void UNUSED *udata)
{
H5O_shared_t *shared_src = (H5O_shared_t *)native_src;
H5O_shared_t *shared_dst = NULL;
@@ -440,7 +440,7 @@ H5O_shared_copy_file(H5F_t UNUSED *file_src, void *native_src, H5F_t *file_dst,
/* check args */
HDassert(shared_src);
HDassert(file_dst);
- HDassert(map_list);
+ HDassert(cpy_info);
/* Allocate space for the destination message */
if(NULL == (shared_dst = H5MM_malloc(sizeof(H5O_shared_t))))
@@ -451,7 +451,7 @@ H5O_shared_copy_file(H5F_t UNUSED *file_src, void *native_src, H5F_t *file_dst,
shared_dst->oloc.file = file_dst;
/* Copy the shared object from source to destination */
- if(H5O_copy_header_map(&(shared_src->oloc), &(shared_dst->oloc), dxpl_id, cpy_option, map_list) < 0)
+ if(H5O_copy_header_map(&(shared_src->oloc), &(shared_dst->oloc), dxpl_id, cpy_info, FALSE) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, NULL, "unable to copy object")
/* Set return value */
@@ -482,28 +482,30 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_shared_pre_copy_file(H5F_t *file_src, const H5O_msg_class_t *type, void *native_src, void *udata)
+H5O_shared_pre_copy_file(H5F_t *file_src, const H5O_msg_class_t *type,
+ void *native_src, hbool_t *deleted, const H5O_copy_t *cpy_info,
+ void *udata)
{
H5O_shared_t *shared_src = (H5O_shared_t *)native_src;
void *mesg_native = NULL;
- hid_t dxpl_id = H5AC_dxpl_id;
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT(H5O_shared_pre_copy_file)
+ /* check args */
+ HDassert(file_src);
+ HDassert(type);
+
if(type->pre_copy_file) {
- if((mesg_native = H5O_read_real(&(shared_src->oloc), type, 0, NULL, dxpl_id)) == NULL)
+ /* Go get the actual shared message */
+ if((mesg_native = H5O_read_real(&(shared_src->oloc), type, 0, NULL, H5AC_dxpl_id)) == NULL)
HGOTO_ERROR(H5E_OHDR, H5E_READERROR, FAIL, "unable to load object header")
/* Perform "pre copy" operation on messge */
- if((type->pre_copy_file)(file_src, type, mesg_native, udata) < 0)
+ if((type->pre_copy_file)(file_src, type, mesg_native, deleted, cpy_info, udata) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to perform 'pre copy' operation on message")
} /* end of if */
- /* check args */
- HDassert(file_src);
- HDassert(type);
-
done:
if(mesg_native)
H5O_free_real(type, mesg_native);