summaryrefslogtreecommitdiffstats
path: root/tools/h5diff/h5diff_main.c
diff options
context:
space:
mode:
authorJonathan Kim <jkm@hdfgroup.org>2010-02-16 19:43:05 (GMT)
committerJonathan Kim <jkm@hdfgroup.org>2010-02-16 19:43:05 (GMT)
commitad9e876b0c767c97fdbef57509f3395768e58b44 (patch)
treee8b2c2dbedced578c16064aa641b560675b24571 /tools/h5diff/h5diff_main.c
parent8e946eae303df1670edeb39829cbbeb10ea67094 (diff)
downloadhdf5-ad9e876b0c767c97fdbef57509f3395768e58b44.zip
hdf5-ad9e876b0c767c97fdbef57509f3395768e58b44.tar.gz
hdf5-ad9e876b0c767c97fdbef57509f3395768e58b44.tar.bz2
[svn-r18266] Purpose:
bugzilla 1754: h5diff: support comparing through links. (original check-in svn revision #18164) Description: fix the hang issue in parallel mode when compare external-link. add --no-dangling-links option. add test cases (#450-#459) relate to the new option. improve test script to check exit code. update --help relate to the new options. correct some indentations. Tested: h5committest (jam, amani and linew)
Diffstat (limited to 'tools/h5diff/h5diff_main.c')
-rw-r--r--tools/h5diff/h5diff_main.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/h5diff/h5diff_main.c b/tools/h5diff/h5diff_main.c
index 1cb8f2f..6f33bb0 100644
--- a/tools/h5diff/h5diff_main.c
+++ b/tools/h5diff/h5diff_main.c
@@ -88,6 +88,25 @@ int main(int argc, const char *argv[])
parse_command_line(argc, argv, &fname1, &fname2, &objname1, &objname2, &options);
+ /*-------------------------------------------------------------------------
+ * check invalid combination of options
+ *-----------------------------------------------------------------------*/
+ /* no -q(quiet) with -v (verbose) or -r (report) */
+ if(options.m_quiet && (options.m_verbose || options.m_report))
+ {
+ parallel_print("Error: -q (quiet mode) cannot be added to verbose or report modes\n");
+ options.err_stat=1;
+ goto out;
+ }
+
+ /* only allow --no-dangling-links along with --follow-links */
+ if(options.no_dangle_links && !options.follow_links)
+ {
+ parallel_print("Error: --no-dangling-links must be used along with --follow-links option.\n");
+ options.err_stat=1;
+ goto out;
+ }
+
/*-------------------------------------------------------------------------
* do the diff
*-------------------------------------------------------------------------
@@ -97,6 +116,7 @@ int main(int argc, const char *argv[])
print_info(&options);
+out:
/*-------------------------------------------------------------------------
* exit code
* 1 if differences, 0 if no differences, 2 if error