diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-07-17 19:35:09 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-07-17 19:35:09 (GMT) |
commit | 4be636f4f00271f85802fbb6ef079146f2dbf7fb (patch) | |
tree | 0a3d45b3e72f36a0b71087b194b328edd88d12cc /src/H5Doh.c | |
parent | a926dc97d531c87ca098cfaac0b500e808ddbd7b (diff) | |
download | hdf5-4be636f4f00271f85802fbb6ef079146f2dbf7fb.zip hdf5-4be636f4f00271f85802fbb6ef079146f2dbf7fb.tar.gz hdf5-4be636f4f00271f85802fbb6ef079146f2dbf7fb.tar.bz2 |
[svn-r13984] Description:
Various code cleanups and refactor recent changes for h5stat to fit
into the existing library data structures better.
Tested on:
Mac OS X/32 10.4.10 (amazon)
FreeBSD/32 6.2 (duty)
Linux/32 2.6 (chicago)
Linux/64 2.6 (chicago2)
Diffstat (limited to 'src/H5Doh.c')
-rw-r--r-- | src/H5Doh.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/H5Doh.c b/src/H5Doh.c index 620554e0..01447a3 100644 --- a/src/H5Doh.c +++ b/src/H5Doh.c @@ -327,6 +327,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_dset_get_oloc() */ + /*------------------------------------------------------------------------- * Function: H5O_dset_bh_info * @@ -342,28 +343,28 @@ done: *------------------------------------------------------------------------- */ herr_t -H5O_dset_bh_info(H5O_loc_t *oloc, H5O_t *oh, hid_t dxpl_id, H5_ih_info_t *bh_info) +H5O_dset_bh_info(H5F_t *f, hid_t dxpl_id, H5O_t *oh, H5_ih_info_t *bh_info) { H5O_layout_t layout; /* Data storage layout message */ - herr_t ret_value=SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(H5O_dset_bh_info, FAIL) /* Sanity check */ - HDassert(oloc); + HDassert(f); HDassert(oh); HDassert(bh_info); - if (NULL==H5O_msg_read_real(oloc->file, dxpl_id, oh, H5O_LAYOUT_ID, &layout)) + /* Get the layout message from the object header */ + if(NULL == H5O_msg_read_real(f, dxpl_id, oh, H5O_LAYOUT_ID, &layout)) HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't find LAYOUT message") - else { - if ((layout.type == H5D_CHUNKED) && (layout.u.chunk.addr != HADDR_UNDEF)) { - ret_value = H5D_obj_istore_bh_info(oloc, &layout, dxpl_id, &(bh_info->index_size)); - if (ret_value < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't determine chunked dataset btree info") - } - } + + /* Check for chunked dataset storage */ + if((layout.type == H5D_CHUNKED) && H5F_addr_defined(layout.u.chunk.addr)) + if(H5D_istore_bh_info(f, dxpl_id, &layout, &(bh_info->index_size)) < 0) + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "can't determine chunked dataset btree info") done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_dset_bh_info() */ + |