summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2000-11-03 05:12:47 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2000-11-03 05:12:47 (GMT)
commit0556db98e281f377b54e7e918bc296604b490993 (patch)
tree6ac21736b94e6a8308c27687d0ff4c7be9c7df93
parent95b960a4a030844bfd04077f3c344895a1d71dbb (diff)
downloadhdf5-0556db98e281f377b54e7e918bc296604b490993.zip
hdf5-0556db98e281f377b54e7e918bc296604b490993.tar.gz
hdf5-0556db98e281f377b54e7e918bc296604b490993.tar.bz2
[svn-r2794] Purpose:
"bug fix" Description: the h5ls tests sometimes failed because the tool sometimes prints the tool name in the help message as "lt-h5ls" while the expected result has it as "h5ls". This was the tools pulled its name from argv[0]. Solution: Hardcode the progname as "h5ls" and blocked out the code that pulls the program name from argv[0]. The better solution is to find a way to create the real binary with the orginal tool name. Platforms tested: linux
-rw-r--r--tools/h5ls.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/h5ls.c b/tools/h5ls.c
index f7af540..2a37318 100644
--- a/tools/h5ls.c
+++ b/tools/h5ls.c
@@ -1914,7 +1914,7 @@ main (int argc, char *argv[])
{
hid_t file=-1, root=-1;
char *fname=NULL, *oname=NULL, *x;
- const char *progname;
+ const char *progname="h5ls";
const char *s = NULL;
char *rest, *container=NULL;
int argno;
@@ -1938,9 +1938,11 @@ main (int argc, char *argv[])
DISPATCH(H5G_RAGGED, "Ragged Array", H5Gopen, H5Gclose,
NULL, ragged_list2);
+#if 0
/* Name of this program without the path */
if ((progname=strrchr(argv[0], '/'))) progname++;
else progname = argv[0];
+#endif
/* Default output width */
width_g = get_width();