summaryrefslogtreecommitdiffstats
path: root/src/H5Glink.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-11-25 04:10:32 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-11-25 04:10:32 (GMT)
commit5c1fedcb9003ab614db83a15723bb0fc0389e3c7 (patch)
treeec8d663d5767b75a432d3d91c5cbb0a84db55530 /src/H5Glink.c
parent2f694358c4c7ae4fa79057ae7d87f95859fbea73 (diff)
downloadhdf5-5c1fedcb9003ab614db83a15723bb0fc0389e3c7.zip
hdf5-5c1fedcb9003ab614db83a15723bb0fc0389e3c7.tar.gz
hdf5-5c1fedcb9003ab614db83a15723bb0fc0389e3c7.tar.bz2
[svn-r12973] Description:
Finish removing library's internal code that uses H5G_get_objinfo() and retarget it at either getting the link information or the object information, as appropriate. (Still need to add user-level tests for H5Oget_info(), but since several internal components of the library depend on the internal version, it appears to be working correctly). Tested on: FreeBSD/32 4.11 (sleipnir) Linux/322.4 (heping) Linux/64 2.4 (mir) AIX/32 5.? (copper) Mac OS X/32 10.4.8 (amazon)
Diffstat (limited to 'src/H5Glink.c')
-rw-r--r--src/H5Glink.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/H5Glink.c b/src/H5Glink.c
index de8e7aa..23e5f4b 100644
--- a/src/H5Glink.c
+++ b/src/H5Glink.c
@@ -495,7 +495,7 @@ H5G_link_copy_file(H5F_t *dst_file, hid_t dxpl_id, const H5O_link_t *_src_lnk,
/* Expand soft link */
if(H5L_TYPE_SOFT == src_lnk->type && cpy_info->expand_soft_link) {
- H5G_stat_t statbuf; /* Information about object pointed to by soft link */
+ H5O_info_t oinfo; /* Information about object pointed to by soft link */
H5G_loc_t grp_loc; /* Group location holding soft link */
H5G_name_t grp_path; /* Path for group holding soft link */
@@ -509,18 +509,11 @@ H5G_link_copy_file(H5F_t *dst_file, hid_t dxpl_id, const H5O_link_t *_src_lnk,
grp_loc.oloc = (H5O_loc_t *)src_oloc; /* Casting away const OK -QAK */
/* Check if the object pointed by the soft link exists in the source file */
- /* (It would be more efficient to make a specialized traversal callback,
- * but this is good enough for now... -QAK)
- */
- if(H5G_get_objinfo(&grp_loc, tmp_src_lnk.u.soft.name, TRUE, &statbuf, dxpl_id) >= 0) {
+ if(H5G_loc_info(&grp_loc, tmp_src_lnk.u.soft.name, &oinfo, H5P_DEFAULT, dxpl_id) >= 0) {
/* Convert soft link to hard link */
tmp_src_lnk.u.soft.name = H5MM_xfree(tmp_src_lnk.u.soft.name);
tmp_src_lnk.type = H5L_TYPE_HARD;
-#if H5_SIZEOF_UINT64_T > H5_SIZEOF_LONG
- tmp_src_lnk.u.hard.addr = (((haddr_t)statbuf.objno[1]) << (8 * sizeof(long))) | (haddr_t)statbuf.objno[0];
-#else
- tmp_src_lnk.u.hard.addr = statbuf.objno[0];
-#endif
+ tmp_src_lnk.u.hard.addr = oinfo.addr;
src_lnk = &tmp_src_lnk;
} /* end if */
else {