summaryrefslogtreecommitdiffstats
path: root/tools/h5ls
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-04-03 19:51:14 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-04-03 19:51:14 (GMT)
commit0fb88ded47762bcafdd4317a3cd48f4c706a011c (patch)
treef46e14f62d1c6f3ebd1fb9aab18fab97509782bd /tools/h5ls
parentd53775c9468afe01b058e59db8dfc7a4d79f0340 (diff)
downloadhdf5-0fb88ded47762bcafdd4317a3cd48f4c706a011c.zip
hdf5-0fb88ded47762bcafdd4317a3cd48f4c706a011c.tar.gz
hdf5-0fb88ded47762bcafdd4317a3cd48f4c706a011c.tar.bz2
[svn-r13580] Description:
Add version # and flags to external link format (as fields in a single byte), in order to accomodate future changes/expansions. Tested on: Mac OS X/32 10.4.9 (amazon) Linux/32 2.6 (chicago) Linux/64 2.6 (chicago2) FreeBSD/32 6.2 (duty) FreeBSD/64 6.2 (liberty)
Diffstat (limited to 'tools/h5ls')
-rw-r--r--tools/h5ls/h5ls.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c
index 63b5115..6d0da89 100644
--- a/tools/h5ls/h5ls.c
+++ b/tools/h5ls/h5ls.c
@@ -1775,14 +1775,13 @@ udlink_open(hid_t location, const char *name)
{
H5L_info_t linfo;
char * buf = NULL;
- char * filename = NULL;
- char * path = NULL;
+ const char * filename;
+ const char * path;
if(H5Lget_info(location, name, &linfo, H5P_DEFAULT) < 0)
return -1;
- switch(linfo.type)
- {
+ switch(linfo.type) {
/* For external links, try to display info for the object it points to */
case H5L_TYPE_EXTERNAL:
if((buf = HDmalloc(linfo.u.val_size)) == NULL)
@@ -1790,7 +1789,7 @@ udlink_open(hid_t location, const char *name)
if(H5Lget_val(location, name, buf, linfo.u.val_size, H5P_DEFAULT) < 0)
goto error;
- if(H5Lunpack_elink_val(buf, linfo.u.val_size, &filename, &path) < 0) goto error;
+ if(H5Lunpack_elink_val(buf, linfo.u.val_size, NULL, &filename, &path) < 0) goto error;
HDfputs("file: ", stdout);
HDfputs(filename, stdout);
HDfputs(" path: ", stdout);
@@ -1800,6 +1799,7 @@ udlink_open(hid_t location, const char *name)
default:
HDfputs("cannot follow UD links", stdout);
}
+
return 0;
error: