summaryrefslogtreecommitdiffstats
path: root/tools/h5diff/h5diff_main.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2008-10-16 23:24:18 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2008-10-16 23:24:18 (GMT)
commit924ba14474479cacc6aa99aabb2ac81462ff6d73 (patch)
tree4a23df0c90e6e80fe37f83c17d8bb72abe49c82e /tools/h5diff/h5diff_main.c
parent208777ec89b63e27fbe34879ec43d95329301c08 (diff)
downloadhdf5-924ba14474479cacc6aa99aabb2ac81462ff6d73.zip
hdf5-924ba14474479cacc6aa99aabb2ac81462ff6d73.tar.gz
hdf5-924ba14474479cacc6aa99aabb2ac81462ff6d73.tar.bz2
[svn-r15896] Introduced a -c flag to ignore file contents differences in the return value (return 0 id -c is present)
Introduced for h5copy validation Tested: windows, linux
Diffstat (limited to 'tools/h5diff/h5diff_main.c')
-rw-r--r--tools/h5diff/h5diff_main.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/h5diff/h5diff_main.c b/tools/h5diff/h5diff_main.c
index eb85407..c383933 100644
--- a/tools/h5diff/h5diff_main.c
+++ b/tools/h5diff/h5diff_main.c
@@ -90,11 +90,18 @@ int main(int argc, const char *argv[])
ret = (nfound == 0 ? 0 : 1 );
+ /* if graph difference return 1 for differences */
if ( options.contents == 0 )
ret = 1;
- if(options.err_stat)
+ /* but return 0 for no differences if graph comparison not required */
+ if ( options.m_no_contents == 1 )
+ ret = 0;
+
+ /* and return 2 for error */
+ if (options.err_stat)
ret = 2;
+
return ret;
}