summaryrefslogtreecommitdiffstats
path: root/hl
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2015-10-25 23:21:08 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2015-10-25 23:21:08 (GMT)
commit3f568b87d65733acd23b3e12070a6bc0d0f00629 (patch)
tree19ba0673ebcfe8b508fa2781355f677474b80526 /hl
parent66e1eeffa751dd58bcc00e6efc6f83cac9f203b4 (diff)
downloadhdf5-3f568b87d65733acd23b3e12070a6bc0d0f00629.zip
hdf5-3f568b87d65733acd23b3e12070a6bc0d0f00629.tar.gz
hdf5-3f568b87d65733acd23b3e12070a6bc0d0f00629.tar.bz2
[svn-r28212] Add code from r28179 back to the branch. This allows h5watch
to open VDS files, though it won't pick up changes to source files until they are closed. This is a library problem and will be fixed later. Tested on: Ubuntu 15.04 (Linux 3.19 x86_64) gcc 4.9.2
Diffstat (limited to 'hl')
-rw-r--r--hl/tools/h5watch/h5watch.c22
-rw-r--r--hl/tools/testfiles/w-err-dset-none.ddl2
2 files changed, 15 insertions, 9 deletions
diff --git a/hl/tools/h5watch/h5watch.c b/hl/tools/h5watch/h5watch.c
index 7bb86a2..ea37dae 100644
--- a/hl/tools/h5watch/h5watch.c
+++ b/hl/tools/h5watch/h5watch.c
@@ -524,6 +524,7 @@ check_dataset(hid_t fid, char *dsetname)
hbool_t unlim_max_dims = FALSE; /* whether dataset has unlimited or max. dimension setting */
void *edata;
H5E_auto2_t func;
+ H5D_layout_t layout;
herr_t ret_value = SUCCEED; /* Return value */
/* Disable error reporting */
@@ -539,16 +540,21 @@ check_dataset(hid_t fid, char *dsetname)
/* Get dataset's creation property list */
if((dcp = H5Dget_create_plist(did)) < 0) {
- error_msg("unable to get dataset's creation property list\"%s\"\n", dsetname);
- ret_value = FAIL;
- goto done;
+ error_msg("unable to get dataset's creation property list \"%s\"\n", dsetname);
+ ret_value = FAIL;
+ goto done;
}
- /* Query dataset's layout; the layout should be chunked */
- if(H5Pget_layout(dcp) != H5D_CHUNKED) {
- error_msg("\"%s\" should be a chunked dataset\n", dsetname);
- ret_value = FAIL;
- goto done;
+ /* Query dataset's layout; the layout should be chunked or virtual */
+ if((layout = H5Pget_layout(dcp)) < 0) {
+ error_msg("unable to get dataset layout \"%s\"\n", dsetname);
+ ret_value = FAIL;
+ goto done;
+ }
+ if(layout != H5D_CHUNKED && layout != H5D_VIRTUAL) {
+ error_msg("\"%s\" should be a chunked or virtual dataset\n", dsetname);
+ ret_value = FAIL;
+ goto done;
}
HDmemset(cur_dims, 0, sizeof cur_dims);
diff --git a/hl/tools/testfiles/w-err-dset-none.ddl b/hl/tools/testfiles/w-err-dset-none.ddl
index 2708473..f9165aa 100644
--- a/hl/tools/testfiles/w-err-dset-none.ddl
+++ b/hl/tools/testfiles/w-err-dset-none.ddl
@@ -2,4 +2,4 @@
output for 'h5watch WATCH.h5/DSET_NONE'
#############################
Opened "WATCH.h5" with sec2 driver.
-h5watch error: "/DSET_NONE" should be a chunked dataset
+h5watch error: "/DSET_NONE" should be a chunked or virtual dataset