summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5tools.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lib/h5tools.c')
-rw-r--r--tools/lib/h5tools.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index 3a5b68a..6941c43 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -1098,6 +1098,7 @@ h5tools_dump_dset(FILE *stream, const h5dump_t *info, hid_t dset, hid_t _p_type,
hid_t f_space;
hid_t p_type = _p_type;
hid_t f_type;
+ H5S_class_t space_type;
int status = FAIL;
h5dump_t info_dflt;
@@ -1127,15 +1128,18 @@ h5tools_dump_dset(FILE *stream, const h5dump_t *info, hid_t dset, hid_t _p_type,
/* Check the data space */
f_space = H5Dget_space(dset);
+ space_type = H5Sget_simple_extent_type(f_space);
+
/* Print the data */
- if (H5Sis_simple(f_space) > 0) {
+ if (space_type == H5S_SIMPLE || space_type == H5S_SCALAR) {
if (!sset)
status = h5tools_dump_simple_dset(rawdatastream, info, dset, p_type,
indentlevel);
else
status = h5tools_dump_simple_subset(rawdatastream, info, dset, p_type,
sset, indentlevel);
- }
+ } else /* space is H5S_NULL */
+ status = SUCCEED;
/* Close the dataspace */
H5Sclose(f_space);