diff options
author | Vailin Choi <vchoi@hdfgroup.org> | 2010-08-25 16:17:38 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@hdfgroup.org> | 2010-08-25 16:17:38 (GMT) |
commit | abb9cc9cd8834024a7a46cf3438585aad1af09f5 (patch) | |
tree | f56c37498104f703db07337a3fa4975553b8cae6 /src/H5FAcache.c | |
parent | 8b07a4a214c0fc8c5d6e3a859f32ee5127cdf473 (diff) | |
download | hdf5-abb9cc9cd8834024a7a46cf3438585aad1af09f5.zip hdf5-abb9cc9cd8834024a7a46cf3438585aad1af09f5.tar.gz hdf5-abb9cc9cd8834024a7a46cf3438585aad1af09f5.tar.bz2 |
[svn-r19296] 1) Modifications to h5debug and related coding so that it will handle Fixed Array/Extensible Array meta data.
2) Moved Extensible/Fixed array type to be right after MAGIC # and version
so that h5debug can determine the array class type.
Diffstat (limited to 'src/H5FAcache.c')
-rw-r--r-- | src/H5FAcache.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/H5FAcache.c b/src/H5FAcache.c index 96510b5..7e72a08 100644 --- a/src/H5FAcache.c +++ b/src/H5FAcache.c @@ -496,6 +496,9 @@ END_FUNC(STATIC) /* end H5FA__cache_hdr_dest() */ * Programmer: Vailin Choi * Thursday, April 30, 2009 * + * Modifications: + * Vailin Choi; July 2010 + * Moved Fixed array type to be right after MAGIC # and version. *------------------------------------------------------------------------- */ BEGIN_FUNC(STATIC, ERR, @@ -556,15 +559,15 @@ H5FA__cache_dblock_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)) if(*p++ != H5FA_DBLOCK_VERSION) H5E_THROW(H5E_VERSION, "wrong fixed array data block version") + /* Fixed array type */ + if(*p++ != (uint8_t)udata->hdr->cparam.cls->id) + H5E_THROW(H5E_BADTYPE, "incorrect fixed array class") + /* Address of header for array that owns this block (just for file integrity checks) */ H5F_addr_decode(f, &p, &arr_addr); if(H5F_addr_ne(arr_addr, udata->hdr->addr)) H5E_THROW(H5E_BADVALUE, "wrong fixed array header address") - /* Fixed array type */ - if(*p++ != (uint8_t)udata->hdr->cparam.cls->id) - H5E_THROW(H5E_BADTYPE, "incorrect fixed array class") - /* Page initialization flags */ if(dblock->npages > 0) { HDmemcpy(dblock->dblk_page_init, p, dblock->dblk_page_init_size); @@ -625,6 +628,9 @@ END_FUNC(STATIC) /* end H5FA__cache_dblock_load() */ * Programmer: Vailin Choi * Thursday, April 30, 2009 * + * Modifications: + * Vailin Choi; July 2010 + * Moved Fixed array type to be right after MAGIC # and version. *------------------------------------------------------------------------- */ BEGIN_FUNC(STATIC, ERR, @@ -672,12 +678,12 @@ H5FA__cache_dblock_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, /* Version # */ *p++ = H5FA_DBLOCK_VERSION; - /* Address of array header for array which owns this block */ - H5F_addr_encode(f, &p, dblock->hdr->addr); - /* Fixed array type */ *p++ = dblock->hdr->cparam.cls->id; + /* Address of array header for array which owns this block */ + H5F_addr_encode(f, &p, dblock->hdr->addr); + /* Page init flags */ if(dblock->npages > 0) { /* Store the 'page init' bitmasks */ |