diff options
author | Richard Warren <Richard.Warren@hdfgroup.org> | 2020-06-22 18:46:24 (GMT) |
---|---|---|
committer | Richard Warren <Richard.Warren@hdfgroup.org> | 2020-06-22 18:46:24 (GMT) |
commit | 5e02da94f11742aa246eb284c964709d97404d3d (patch) | |
tree | f7c15b98588051287ceaad887ec122917af2d92e /tools/lib/h5trav.c | |
parent | d20000ec51d50b66fc1226eeb656b8dc1358f826 (diff) | |
download | hdf5-5e02da94f11742aa246eb284c964709d97404d3d.zip hdf5-5e02da94f11742aa246eb284c964709d97404d3d.tar.gz hdf5-5e02da94f11742aa246eb284c964709d97404d3d.tar.bz2 |
Initial subfiling branch
Diffstat (limited to 'tools/lib/h5trav.c')
-rw-r--r-- | tools/lib/h5trav.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c index dc7e27d..a9b5b75 100644 --- a/tools/lib/h5trav.c +++ b/tools/lib/h5trav.c @@ -15,6 +15,9 @@ #include "h5trav.h" #include "h5tools.h" #include "H5private.h" +#ifdef H5_HAVE_PARALLEL +#include "h5tools_utils.h" +#endif /*------------------------------------------------------------------------- * local typedefs @@ -179,8 +182,10 @@ static herr_t traverse_cb(hid_t loc_id, const char *path, const H5L_info2_t *linfo, void *_udata) { + herr_t ret_value = SUCCEED; trav_ud_traverse_t *udata = (trav_ud_traverse_t *)_udata; /* User data */ char *new_name = NULL; + const char *full_name; const char *already_visited = NULL; /* Whether the link/object was already visited */ @@ -201,6 +206,18 @@ traverse_cb(hid_t loc_id, const char *path, const H5L_info2_t *linfo, else full_name = path; +#ifdef H5_HAVE_PARALLEL + if(linfo->type == H5L_TYPE_EXTERNAL) { + h5tool_link_info_t lnk_info; + if ((ret_value = H5tools_get_symlink_info(loc_id, path, &lnk_info, FALSE)) < 0) { + puts("H5tools_get_symlink_info failed!"); + } + else if (ret_value == 0) { + puts("Dangling link?"); + } + printf("Visiting external link: %s\n", path); + } +#endif /* Perform the correct action for different types of links */ if(linfo->type == H5L_TYPE_HARD) { H5O_info2_t oinfo; |