summaryrefslogtreecommitdiffstats
path: root/src/H5G.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-02-22 02:00:40 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-02-22 02:00:40 (GMT)
commit182c05cb95472cae9411169d295a4bcad6f5edd7 (patch)
treefb1adb87d49a83ed0e10a579dded38144b815135 /src/H5G.c
parent2468b8aa1c8f07211e86f1ec937c4f7f14e3ddbe (diff)
downloadhdf5-182c05cb95472cae9411169d295a4bcad6f5edd7.zip
hdf5-182c05cb95472cae9411169d295a4bcad6f5edd7.tar.gz
hdf5-182c05cb95472cae9411169d295a4bcad6f5edd7.tar.bz2
[svn-r13375] Description:
Straighten out some of the code for handling superblocks, in preparation for revising the format of the latest version of the superblock before the beta release. Tested on: Mac OS X/32 10.4.8 (amazon) FreeBSD/32 6.2 (duty)
Diffstat (limited to 'src/H5G.c')
-rw-r--r--src/H5G.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/H5G.c b/src/H5G.c
index 4159bf2..86b446e 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -987,6 +987,8 @@ H5G_mkroot(H5F_t *f, hid_t dxpl_id, H5G_loc_t *loc)
/* check args */
HDassert(f);
+
+ /* Check if the root group is already initialized */
if(f->shared->root_grp)
HGOTO_DONE(SUCCEED)
@@ -996,9 +998,9 @@ H5G_mkroot(H5F_t *f, hid_t dxpl_id, H5G_loc_t *loc)
/*
* If there is no root object then create one. The root group always starts
- * with a hard link count of one since it's pointed to by the boot block.
+ * with a hard link count of one since it's pointed to by the superblock.
*/
- if (loc == NULL) {
+ if(loc == NULL) {
H5P_genplist_t *fc_plist; /* File creation property list */
H5O_ginfo_t ginfo; /* Group info parameters */
H5O_linfo_t linfo; /* Link info parameters */
@@ -1022,11 +1024,13 @@ H5G_mkroot(H5F_t *f, hid_t dxpl_id, H5G_loc_t *loc)
H5G_loc_reset(&new_root_loc);
loc = &new_root_loc;
+ /* Create root group */
if(H5G_obj_create(f, dxpl_id, &ginfo, &linfo, f->shared->fcpl_id, loc->oloc/*out*/) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group entry")
if(1 != H5O_link(loc->oloc, 1, dxpl_id))
HGOTO_ERROR(H5E_SYM, H5E_LINKCOUNT, FAIL, "internal error (wrong link count)")
- } else {
+ } /* end if */
+ else {
/*
* Open the root object as a group.
*/