summaryrefslogtreecommitdiffstats
path: root/hl
diff options
context:
space:
mode:
authorJordan Henderson <jhenderson@hdfgroup.org>2020-03-27 18:14:22 (GMT)
committerJordan Henderson <jhenderson@hdfgroup.org>2020-03-27 18:14:22 (GMT)
commitd5bbf3d4086d7fa0300325a08a608f1cc7b4ce33 (patch)
treec6c3e7972799fc3f30bb222d1192a101cd07f34b /hl
parent181c6110251d7a9e9cc23e14dfd8f52cdb14422b (diff)
parentea952b25ba0fd5c4b5f60a94e75a1b5b78e66172 (diff)
downloadhdf5-d5bbf3d4086d7fa0300325a08a608f1cc7b4ce33.zip
hdf5-d5bbf3d4086d7fa0300325a08a608f1cc7b4ce33.tar.gz
hdf5-d5bbf3d4086d7fa0300325a08a608f1cc7b4ce33.tar.bz2
Merge pull request #2469 in HDFFV/hdf5 from tools_vol_update to develop
* commit 'ea952b25ba0fd5c4b5f60a94e75a1b5b78e66172': A few small tweaks to the tools from review Replace usage of some standard library functions with HD- versions Update Tools library to be better compatible with VOL connectors
Diffstat (limited to 'hl')
-rw-r--r--hl/tools/h5watch/h5watch.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/hl/tools/h5watch/h5watch.c b/hl/tools/h5watch/h5watch.c
index b7f583c..ff9a078 100644
--- a/hl/tools/h5watch/h5watch.c
+++ b/hl/tools/h5watch/h5watch.c
@@ -822,7 +822,9 @@ main(int argc, const char *argv[])
char *fname = NULL; /* File name */
char *dname = NULL; /* Dataset name */
void *edata; /* Error reporting */
+ void *tools_edata; /* Error reporting */
H5E_auto2_t func; /* Error reporting */
+ H5E_auto2_t tools_func; /* Error reporting */
char *x; /* Temporary string pointer */
hid_t fid = -1; /* File ID */
hid_t fapl = -1; /* File access property list */
@@ -838,6 +840,10 @@ main(int argc, const char *argv[])
/* Initialize h5tools lib */
h5tools_init();
+ /* Disable tools error reporting */
+ H5Eget_auto2(H5tools_ERR_STACK_g, &tools_func, &tools_edata);
+ H5Eset_auto2(H5tools_ERR_STACK_g, NULL, NULL);
+
/* To exit from h5watch for SIGTERM signal */
if(HDsignal(SIGTERM, catch_signal) == SIG_ERR) {
error_msg("An error occurred while setting a signal handler.\n");
@@ -890,7 +896,7 @@ main(int argc, const char *argv[])
do {
while(fname && *fname) {
- fid = h5tools_fopen(fname, H5F_ACC_RDONLY|H5F_ACC_SWMR_READ, fapl, NULL, drivername, sizeof drivername);
+ fid = h5tools_fopen(fname, H5F_ACC_RDONLY|H5F_ACC_SWMR_READ, fapl, FALSE, drivername, sizeof drivername);
if(fid >= 0) {
HDfprintf(stdout, "Opened \"%s\" with %s driver.\n", fname, drivername);
@@ -966,6 +972,8 @@ main(int argc, const char *argv[])
}
H5Eset_auto2(H5E_DEFAULT, func, edata);
+ H5Eset_auto2(H5tools_ERR_STACK_g, tools_func, tools_edata);
+
/* exit */
leave(h5tools_getstatus());
} /* main() */