summaryrefslogtreecommitdiffstats
path: root/src/H5Fsuper.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-07-17 19:35:09 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-07-17 19:35:09 (GMT)
commit4be636f4f00271f85802fbb6ef079146f2dbf7fb (patch)
tree0a3d45b3e72f36a0b71087b194b328edd88d12cc /src/H5Fsuper.c
parenta926dc97d531c87ca098cfaac0b500e808ddbd7b (diff)
downloadhdf5-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/H5Fsuper.c')
-rw-r--r--src/H5Fsuper.c30
1 files changed, 22 insertions, 8 deletions
diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c
index 4a516af..7d1a8ad 100644
--- a/src/H5Fsuper.c
+++ b/src/H5Fsuper.c
@@ -965,8 +965,9 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_super_write() */
+
/*-------------------------------------------------------------------------
- * Function: H5F_super_ext_info
+ * Function: H5F_super_ext_size
* Get storage size of the superblock extension
*
* Return: Success: non-negative on success
@@ -977,18 +978,31 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5F_super_ext_info(H5F_t *f, H5F_info_t *finfo, hid_t dxpl_id)
+H5F_super_ext_size(H5F_t *f, hid_t dxpl_id, hsize_t *super_ext_size)
{
- herr_t ret_value=SUCCEED;
+ H5O_loc_t ext_loc; /* "Object location" for superblock extension */
+ H5O_info_t oinfo; /* Object info for superblock extension */
+ herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5F_super_ext_info, FAIL)
+ FUNC_ENTER_NOAPI(H5F_super_ext_size, FAIL)
+ /* Sanity check */
HDassert(f);
- HDassert(finfo);
+ HDassert(super_ext_size);
+
+ /* Set up "fake" object location for superblock extension */
+ H5O_loc_reset(&ext_loc);
+ ext_loc.file = f;
+ ext_loc.addr = f->shared->extension_addr;
- if (H5O_super_ext_size(f, &(finfo->super_ext_size), dxpl_id) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "Unable to retrieve superblock extension size")
+ /* Get object header info for superblock extension */
+ if(H5O_get_info(&ext_loc, &oinfo, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to retrieve superblock extension info")
+
+ /* Set the superblock extension size */
+ *super_ext_size = oinfo.hdr.space.total;
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5F_super_ext_info() */
+} /* H5F_super_ext_size() */
+