diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2011-02-22 19:37:06 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2011-02-22 19:37:06 (GMT) |
commit | 727b687ae6c80c9854cb53814fa1c12f27c2994c (patch) | |
tree | fabe359aaddbe3b4d1e2bb58ceb3b94311d66a1c /tools/h5jam/h5unjam.c | |
parent | 25486d50895fa4a30809d289b9aff4de583a9b84 (diff) | |
download | hdf5-727b687ae6c80c9854cb53814fa1c12f27c2994c.zip hdf5-727b687ae6c80c9854cb53814fa1c12f27c2994c.tar.gz hdf5-727b687ae6c80c9854cb53814fa1c12f27c2994c.tar.bz2 |
[svn-r20146] Description:
Bring r19714:20145 from trunk to revise_chunks branch.
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, w/threadsafe, in production mode
Linux/PPC 2.6 (heiwa) w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in debug mode
Mac OS X/32 10.6.6 (amazon) in debug mode
Mac OS X/32 10.6.6 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
Diffstat (limited to 'tools/h5jam/h5unjam.c')
-rw-r--r-- | tools/h5jam/h5unjam.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/tools/h5jam/h5unjam.c b/tools/h5jam/h5unjam.c index 8e31ce1..fd79e1a 100644 --- a/tools/h5jam/h5unjam.c +++ b/tools/h5jam/h5unjam.c @@ -221,22 +221,20 @@ main(int argc, const char *argv[]) } - res = stat(input_file, &sbuf); + ifid = HDopen(input_file,O_RDONLY,0); + if(ifid < 0) { + error_msg("unable to open input HDF5 file \"%s\"\n", input_file); + exit(EXIT_FAILURE); + } - if (res < 0) { + res = HDfstat(ifid, &sbuf); + if(res < 0) { error_msg("Can't stat file \"%s\"\n", input_file); exit(EXIT_FAILURE); } fsize = sbuf.st_size; - ifid = HDopen(input_file,O_RDONLY,0); - - if (ifid < 0) { - error_msg("unable to open input HDF5 file \"%s\"\n", input_file); - exit(EXIT_FAILURE); - } - if (do_delete && (ub_file != NULL)) { error_msg("??\"%s\"\n", ub_file); exit(EXIT_FAILURE); |