diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-05-05 17:18:50 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-05-05 17:18:50 (GMT) |
commit | ca7fc8e96a70b06b08e1db21040056ae17a51906 (patch) | |
tree | 3d665b7a3119174158fc91a05fd8055f6ca7074b /tools | |
parent | b24e2d4dd861b67a61fcf56be5975bcd4d37203b (diff) | |
download | hdf5-ca7fc8e96a70b06b08e1db21040056ae17a51906.zip hdf5-ca7fc8e96a70b06b08e1db21040056ae17a51906.tar.gz hdf5-ca7fc8e96a70b06b08e1db21040056ae17a51906.tar.bz2 |
[svn-r18708] Description:
Bring r18638:18704 from trunk to revise_chunks branch.
Tested on:
Mac OS X/32 10.6.3 (amazon) w/debug & production
(h5committest not required on this branch)
Diffstat (limited to 'tools')
-rw-r--r-- | tools/h5ls/h5ls.c | 8 | ||||
-rw-r--r-- | tools/h5ls/testh5ls.sh.in | 2 | ||||
-rw-r--r-- | tools/h5repack/h5repacktst.c | 4 |
3 files changed, 10 insertions, 4 deletions
diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c index c969670..ab3a110 100644 --- a/tools/h5ls/h5ls.c +++ b/tools/h5ls/h5ls.c @@ -2180,6 +2180,7 @@ main(int argc, const char *argv[]) static char root_name[] = "/"; char drivername[50]; const char *preferred_driver = NULL; + int err_openfile = 0; /* Initialize h5tools lib */ h5tools_init(); @@ -2402,9 +2403,11 @@ main(int argc, const char *argv[]) break; *oname = '\0'; } /* end while */ + if(file < 0) { fprintf(stderr, "%s: unable to open file\n", argv[argno-1]); HDfree(fname); + err_openfile = 1; continue; } /* end if */ if(oname) { @@ -2478,6 +2481,9 @@ main(int argc, const char *argv[]) HDfree(elink_list.objs); } /* end while */ - leave(EXIT_SUCCESS); + if (err_openfile) + leave(EXIT_FAILURE); + else + leave(EXIT_SUCCESS); } /* end main() */ diff --git a/tools/h5ls/testh5ls.sh.in b/tools/h5ls/testh5ls.sh.in index 0e6909a..5c81b6d 100644 --- a/tools/h5ls/testh5ls.sh.in +++ b/tools/h5ls/testh5ls.sh.in @@ -173,7 +173,7 @@ TOOLTEST tattr2.ls 0 -w80 -v -S tattr2.h5 # tests for error handling. # test for non-existing file -TOOLTEST nosuchfile.ls 0 nosuchfile.h5 +TOOLTEST nosuchfile.ls 1 nosuchfile.h5 # test for variable length data types in verbose mode if test $WORDS_BIGENDIAN != "yes"; then diff --git a/tools/h5repack/h5repacktst.c b/tools/h5repack/h5repacktst.c index 1d262cf..68763d7 100644 --- a/tools/h5repack/h5repacktst.c +++ b/tools/h5repack/h5repacktst.c @@ -321,7 +321,7 @@ int main (void) GOERROR; if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) GOERROR; - if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0) + if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options) <= 0) GOERROR; if (h5repack_end (&pack_options) < 0) GOERROR; @@ -638,7 +638,7 @@ int main (void) GOERROR; if (h5diff(FNAME4,FNAME4OUT,NULL,NULL,&diff_options) >0) GOERROR; - if (h5repack_verify(FNAME4, FNAME4OUT,&pack_options)<=0) + if (h5repack_verify(FNAME4, FNAME4OUT, &pack_options )<= 0) GOERROR; if (h5repack_end (&pack_options) < 0) GOERROR; |