diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-02-22 02:00:40 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-02-22 02:00:40 (GMT) |
commit | 182c05cb95472cae9411169d295a4bcad6f5edd7 (patch) | |
tree | fb1adb87d49a83ed0e10a579dded38144b815135 /src/H5G.c | |
parent | 2468b8aa1c8f07211e86f1ec937c4f7f14e3ddbe (diff) | |
download | hdf5-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.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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. */ |