mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-04-12 17:31:09 +08:00
[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
This commit is contained in:
parent
95b960a4a0
commit
0556db98e2
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user