summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2020-08-21 18:43:41 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-08-21 18:43:41 (GMT)
commit7af1fa67d6d2e441c72504ed9144576a797e1e3a (patch)
tree9d7401ce9325154d36f3da89d9a51fd58050becf /src
parent482ee0765d53e65d0803e758b16e6ba33ea32af1 (diff)
downloadhdf5-7af1fa67d6d2e441c72504ed9144576a797e1e3a.zip
hdf5-7af1fa67d6d2e441c72504ed9144576a797e1e3a.tar.gz
hdf5-7af1fa67d6d2e441c72504ed9144576a797e1e3a.tar.bz2
When the superblock status flags don't meet our expectations, print
the flags and the expectations.
Diffstat (limited to 'src')
-rw-r--r--src/H5Fsuper_cache.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c
index d1227d0..0ea9080 100644
--- a/src/H5Fsuper_cache.c
+++ b/src/H5Fsuper_cache.c
@@ -1233,9 +1233,11 @@ H5F__cache_superblock_refresh(H5F_t *f, void * _thing, const void * _image,
* Allow this.
*/
UINT32DECODE(image, status_flags);
- if ( ( status_flags != sblock->status_flags ) &&
- ( status_flags != 0 ) )
- HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "unexpected status_flags")
+ if (status_flags != sblock->status_flags && status_flags != 0) {
+ HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL,
+ "read status_flags %" PRIx32 " expected %" PRIx32,
+ status_flags, sblock->status_flags)
+ }
/*
* If the superblock version # is greater than 0, read in the indexed
@@ -1308,9 +1310,11 @@ H5F__cache_superblock_refresh(H5F_t *f, void * _thing, const void * _image,
/* If the file has closed, the status flags will be zero.
* Allow this.
*/
- if ( ( status_flags != sblock->status_flags ) &&
- ( status_flags != 0 ) )
- HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "unexpected status_flags")
+ if (status_flags != sblock->status_flags && status_flags != 0) {
+ HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL,
+ "read status_flags %" PRIx32 " expected %" PRIx32,
+ status_flags, sblock->status_flags)
+ }
/* Base, superblock extension, end of file & root group object
* header addresses