diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-02-27 22:12:29 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-02-27 22:12:29 (GMT) |
commit | 0d68ff7cc8124c3ff138c8b7e5d18ac40e6dc408 (patch) | |
tree | 4c26e29b7ce8bdf8ad82c6c83e6f60a61f37412f /src/H5Fdbg.c | |
parent | 648aa268c83f85003ff031dd396508c9547a561e (diff) | |
download | hdf5-0d68ff7cc8124c3ff138c8b7e5d18ac40e6dc408.zip hdf5-0d68ff7cc8124c3ff138c8b7e5d18ac40e6dc408.tar.gz hdf5-0d68ff7cc8124c3ff138c8b7e5d18ac40e6dc408.tar.bz2 |
[svn-r13427] Description:
Eliminate some unnecessary properties for unused aspects of superblock.
Tested on:
Mac OS X/32 10.4.8 (amazon)
Diffstat (limited to 'src/H5Fdbg.c')
-rw-r--r-- | src/H5Fdbg.c | 74 |
1 files changed, 30 insertions, 44 deletions
diff --git a/src/H5Fdbg.c b/src/H5Fdbg.c index b504bc1..9db8b2f 100644 --- a/src/H5Fdbg.c +++ b/src/H5Fdbg.c @@ -38,79 +38,65 @@ * is indented and the field name occupies the specified width * number of characters. * - * Errors: - * * Return: Non-negative on success/Negative on failure * * Programmer: Robb Matzke * matzke@llnl.gov * Aug 1 1997 * - * Modifications: - * Robb Matzke, 1999-07-28 - * The ADDR argument is passed by value. - * - * Raymond Lu, 2001-10-14 - * Changed to the new generic property list. - * *------------------------------------------------------------------------- */ herr_t H5F_debug(H5F_t *f, hid_t dxpl_id, FILE * stream, int indent, int fwidth) { - hsize_t userblock_size; - int super_vers, freespace_vers, obj_dir_vers, share_head_vers; - H5P_genplist_t *plist; /* Property list */ - herr_t ret_value=SUCCEED; /* Return value */ + H5P_genplist_t *plist; /* File creation property list */ + hsize_t userblock_size; /* Userblock size */ + unsigned super_vers; /* Superblock version # */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(H5F_debug, FAIL) /* check args */ - assert(f); - assert(stream); - assert(indent >= 0); - assert(fwidth >= 0); + HDassert(f); + HDassert(stream); + HDassert(indent >= 0); + HDassert(fwidth >= 0); /* Get property list */ if(NULL == (plist = H5I_object(f->shared->fcpl_id))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list") - if(H5P_get(plist, H5F_CRT_USER_BLOCK_NAME, &userblock_size)<0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get user block size") - if(H5P_get(plist, H5F_CRT_SUPER_VERS_NAME, &super_vers)<0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get super block version") - if(H5P_get(plist, H5F_CRT_FREESPACE_VERS_NAME, &freespace_vers)<0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get super block version") - if(H5P_get(plist, H5F_CRT_OBJ_DIR_VERS_NAME, &obj_dir_vers)<0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get object directory version") - if(H5P_get(plist, H5F_CRT_SHARE_HEAD_VERS_NAME, &share_head_vers)<0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get shared-header format version") + /* Retrieve file creation properties */ + if(H5P_get(plist, H5F_CRT_USER_BLOCK_NAME, &userblock_size) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get userblock size") + if(H5P_get(plist, H5F_CRT_SUPER_VERS_NAME, &super_vers) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get superblock version") /* debug */ HDfprintf(stream, "%*sFile Super Block...\n", indent, ""); HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, - "File name:", - f->name); + "File name:", f->name); HDfprintf(stream, "%*s%-*s 0x%08x\n", indent, "", fwidth, - "File access flags", - (unsigned) (f->shared->flags)); + "File access flags", f->shared->flags); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "File open reference count:", - (unsigned) (f->shared->nrefs)); + "File open reference count:", f->shared->nrefs); HDfprintf(stream, "%*s%-*s %a (abs)\n", indent, "", fwidth, "Address of super block:", f->shared->super_addr); - HDfprintf(stream, "%*s%-*s %lu bytes\n", indent, "", fwidth, - "Size of user block:", (unsigned long) userblock_size); + HDfprintf(stream, "%*s%-*s %Hu bytes\n", indent, "", fwidth, + "Size of userblock:", userblock_size); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Super block version number:", (unsigned) super_vers); + "Superblock version number:", super_vers); + + /* Hard-wired versions */ HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Free list version number:", (unsigned) freespace_vers); + "Free list version number:", (unsigned)HDF5_FREESPACE_VERSION); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Root group symbol table entry version number:", (unsigned) obj_dir_vers); + "Root group symbol table entry version number:", (unsigned)HDF5_OBJECTDIR_VERSION); HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, - "Shared header version number:", (unsigned) share_head_vers); + "Shared header version number:", (unsigned)HDF5_SHAREDHEADER_VERSION); + HDfprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth, "Size of file offsets (haddr_t type):", (unsigned) f->shared->sizeof_addr); HDfprintf(stream, "%*s%-*s %u bytes\n", indent, "", fwidth, @@ -140,7 +126,7 @@ H5F_debug(H5F_t *f, hid_t dxpl_id, FILE * stream, int indent, int fwidth) HDfprintf(stream, "%*s%-*s %s\n", indent, "", fwidth, "Root group symbol table entry:", f->shared->root_grp ? "" : "(none)"); - if (f->shared->root_grp) { + if(f->shared->root_grp) { H5O_loc_t *root_oloc; /* Root object location */ H5G_entry_t root_ent; /* Constructed root symbol table entry */ @@ -154,11 +140,11 @@ H5F_debug(H5F_t *f, hid_t dxpl_id, FILE * stream, int indent, int fwidth) root_ent.header = root_oloc->addr; root_ent.file = f; - H5G_ent_debug(f, dxpl_id, &root_ent, stream, - indent+3, MAX(0, fwidth-3), HADDR_UNDEF); - } + /* Display root group symbol table entry info */ + H5G_ent_debug(f, dxpl_id, &root_ent, stream, indent + 3, MAX(0, fwidth - 3), HADDR_UNDEF); + } /* end if */ done: FUNC_LEAVE_NOAPI(ret_value) -} +} /* end H5F_debug() */ |