summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5tools_utils.c
diff options
context:
space:
mode:
authorJonathan Kim <jkm@hdfgroup.org>2010-07-07 18:52:04 (GMT)
committerJonathan Kim <jkm@hdfgroup.org>2010-07-07 18:52:04 (GMT)
commitaf749bafb7004f116fa5bc062bc4498b10814ca2 (patch)
tree30b2515f960d035385500faa8ce2c289447121a5 /tools/lib/h5tools_utils.c
parentbe5d63141038a46db28d1f3679de60d643f9e717 (diff)
downloadhdf5-af749bafb7004f116fa5bc062bc4498b10814ca2.zip
hdf5-af749bafb7004f116fa5bc062bc4498b10814ca2.tar.gz
hdf5-af749bafb7004f116fa5bc062bc4498b10814ca2.tar.bz2
[svn-r19051] Purpose:
Add --no-dangling-links option to h5ls. Description: Related to "Bug 1830 - Following an dangling external link in h5ls should set non-zero return code." If --no-dangling-links option is specified and any dangling link is found, return exit code 1 (error). Tested: jam, amani and heiwa
Diffstat (limited to 'tools/lib/h5tools_utils.c')
-rw-r--r--tools/lib/h5tools_utils.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c
index ca1caa1..04d375d 100644
--- a/tools/lib/h5tools_utils.c
+++ b/tools/lib/h5tools_utils.c
@@ -638,7 +638,6 @@ tmpfile(void)
* Patameters:
* - [IN] fileid : link file id
* - [IN] linkpath : link path
- * - [OUT] h5li : link's info (H5L_info_t)
* - [OUT] link_info: returning target object info (h5tool_link_info_t)
*
* Return:
@@ -656,7 +655,7 @@ tmpfile(void)
*-------------------------------------------------------------------------*/
int H5tools_get_link_info(hid_t file_id, const char * linkpath, h5tool_link_info_t *link_info)
{
- int Ret = -1; /* init to fail */
+ int ret = -1; /* init to fail */
htri_t l_ret;
H5O_info_t trg_oinfo;
hid_t fapl;
@@ -684,7 +683,7 @@ int H5tools_get_link_info(hid_t file_id, const char * linkpath, h5tool_link_info
/* given path is hard link (object) */
if (link_info->linfo.type == H5L_TYPE_HARD)
{
- Ret = 2;
+ ret = 2;
goto out;
}
@@ -721,7 +720,7 @@ int H5tools_get_link_info(hid_t file_id, const char * linkpath, h5tool_link_info
/* detect dangling link */
if(l_ret == FALSE)
{
- Ret = 0;
+ ret = 0;
goto out;
}
/* function failed */
@@ -750,7 +749,7 @@ int H5tools_get_link_info(hid_t file_id, const char * linkpath, h5tool_link_info
link_info->trg_type = trg_oinfo.type;
/* succeed */
- Ret = 1;
+ ret = 1;
out:
if (link_info->linfo.type == H5L_TYPE_EXTERNAL)
{
@@ -758,7 +757,7 @@ out:
H5Pclose(lapl);
}
- return Ret;
+ return ret;
}
/*-------------------------------------------------------------------------