diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2008-09-11 20:16:05 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2008-09-11 20:16:05 (GMT) |
commit | 5fb061e46e8b854bf745674562b71f3e76e1acd0 (patch) | |
tree | 518130db568e254f77fe07b007790618fe36830c /src/H5EAcache.c | |
parent | f1d22675ffc09e604c8715b2a6a010ec21acb771 (diff) | |
download | hdf5-5fb061e46e8b854bf745674562b71f3e76e1acd0.zip hdf5-5fb061e46e8b854bf745674562b71f3e76e1acd0.tar.gz hdf5-5fb061e46e8b854bf745674562b71f3e76e1acd0.tar.bz2 |
[svn-r15617] Description:
Clean up how v2 B-tree (and extensible array) classes are determined in
h5debug.
Add support for extensible array headers and index blocks to h5debug
Tested on:
Mac OS X/32 10.5.4 (amazon) in debug mode
Mac OS X/32 10.5.4 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/Intel compilers w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'src/H5EAcache.c')
-rw-r--r-- | src/H5EAcache.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/H5EAcache.c b/src/H5EAcache.c index 6e141e9..3a8bba5 100644 --- a/src/H5EAcache.c +++ b/src/H5EAcache.c @@ -187,6 +187,10 @@ H5EA__cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void *_cls, vo if(*p++ != H5EA_HDR_VERSION) H5E_THROW(H5E_VERSION, "wrong extensible array header version") + /* Extensible array type */ + if(*p++ != (uint8_t)cls->id) + H5E_THROW(H5E_BADTYPE, "incorrect extensible array class") + /* General array creation/configuration information */ hdr->raw_elmt_size = *p++; /* Element size in file (in bytes) */ hdr->max_nelmts_bits = *p++; /* Log2(Max. # of elements in array) - i.e. # of bits needed to store max. # of elements */ @@ -286,6 +290,9 @@ H5EA__cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5 /* Version # */ *p++ = H5EA_HDR_VERSION; + /* Extensible array type */ + *p++ = hdr->cls->id; + /* General array creation/configuration information */ *p++ = hdr->raw_elmt_size; /* Element size in file (in bytes) */ *p++ = hdr->max_nelmts_bits; /* Log2(Max. # of elements in array) - i.e. # of bits needed to store max. # of elements */ @@ -492,6 +499,10 @@ H5EA__cache_iblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void UNUSED if(*p++ != H5EA_IBLOCK_VERSION) H5E_THROW(H5E_VERSION, "wrong extensible array index block version") + /* Extensible array type */ + if(*p++ != (uint8_t)hdr->cls->id) + H5E_THROW(H5E_BADTYPE, "incorrect extensible array class") + /* Internal information */ /* Decode elements in index block */ @@ -591,6 +602,9 @@ H5EA__cache_iblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, /* Version # */ *p++ = H5EA_IBLOCK_VERSION; + /* Extensible array type */ + *p++ = iblock->hdr->cls->id; + /* Internal information */ /* Encode elements in index block */ |