diff options
Diffstat (limited to 'src/H5Gobj.c')
-rw-r--r-- | src/H5Gobj.c | 170 |
1 files changed, 85 insertions, 85 deletions
diff --git a/src/H5Gobj.c b/src/H5Gobj.c index 963a4ff..6878e51 100644 --- a/src/H5Gobj.c +++ b/src/H5Gobj.c @@ -120,23 +120,23 @@ H5G__obj_create(H5F_t *f, H5G_obj_create_t *gcrt_info, H5O_loc_t *oloc /*out*/) /* Get the property list */ if (NULL == (gc_plist = (H5P_genplist_t *)H5I_object(gcrt_info->gcpl_id))) - HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, FAIL, "not a property list") + HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, FAIL, "not a property list"); /* Get the group info property */ if (H5P_get(gc_plist, H5G_CRT_GROUP_INFO_NAME, &ginfo) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get group info") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get group info"); /* Get the link info property */ if (H5P_get(gc_plist, H5G_CRT_LINK_INFO_NAME, &linfo) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get group info") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get group info"); /* Get the pipeline property */ if (H5P_peek(gc_plist, H5O_CRT_PIPELINE_NAME, &pline) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get group info") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get group info"); /* Call the "real" group creation routine now */ if (H5G__obj_create_real(f, &ginfo, &linfo, &pline, gcrt_info, oloc) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, FAIL, "unable to create group") + HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, FAIL, "unable to create group"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -173,7 +173,7 @@ H5G__obj_create_real(H5F_t *f, const H5O_ginfo_t *ginfo, const H5O_linfo_t *linf /* Check for invalid access request */ if (0 == (H5F_INTENT(f) & H5F_ACC_RDWR)) - HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "no write intent on file") + HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, FAIL, "no write intent on file"); /* Check for using the latest version of the group format which is introduced in v18 */ /* (add more checks for creating "new format" groups when needed) */ @@ -186,7 +186,7 @@ H5G__obj_create_real(H5F_t *f, const H5O_ginfo_t *ginfo, const H5O_linfo_t *linf * going to be built on it. */ if (linfo->index_corder && !linfo->track_corder) - HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "must track creation order to create index for it") + HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "must track creation order to create index for it"); /* Check if we should be using the latest version of the group format */ if (use_at_least_v18) { @@ -229,23 +229,23 @@ H5G__obj_create_real(H5F_t *f, const H5O_ginfo_t *ginfo, const H5O_linfo_t *linf * incremented if the object is added to the group directed graph. */ if (H5O_create(f, hdr_size, (size_t)1, gcpl_id, oloc /*out*/) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create header") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create header"); /* Check for format of group to create */ if (use_at_least_v18) { H5_GCC_CLANG_DIAG_OFF("cast-qual") /* Insert link info message */ if (H5O_msg_create(oloc, H5O_LINFO_ID, 0, H5O_UPDATE_TIME, (void *)linfo) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message"); /* Insert group info message */ if (H5O_msg_create(oloc, H5O_GINFO_ID, H5O_MSG_FLAG_CONSTANT, 0, (void *)ginfo) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message"); /* Insert pipeline message */ if (pline && pline->nused) if (H5O_msg_create(oloc, H5O_PLINE_ID, H5O_MSG_FLAG_CONSTANT, 0, (void *)pline) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message"); H5_GCC_CLANG_DIAG_ON("cast-qual") } /* end if */ else { @@ -253,7 +253,7 @@ H5G__obj_create_real(H5F_t *f, const H5O_ginfo_t *ginfo, const H5O_linfo_t *linf /* The group doesn't currently have a 'stab' message, go create one */ if (H5G__stab_create(oloc, ginfo, &stab) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create symbol table") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create symbol table"); /* Cache the symbol table information */ gcrt_info->cache_type = H5G_CACHED_STAB; @@ -290,11 +290,11 @@ H5G__obj_get_linfo(const H5O_loc_t *grp_oloc, H5O_linfo_t *linfo) /* Check for the group having a link info message */ if ((ret_value = H5O_msg_exists(grp_oloc, H5O_LINFO_ID)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to read object header") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to read object header"); if (ret_value) { /* Retrieve the "link info" structure */ if (NULL == H5O_msg_read(grp_oloc, H5O_LINFO_ID, linfo)) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "link info message not present") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "link info message not present"); /* Check if we don't know how many links there are */ if (linfo->nlinks == HSIZET_MAX) { @@ -302,17 +302,17 @@ H5G__obj_get_linfo(const H5O_loc_t *grp_oloc, H5O_linfo_t *linfo) if (H5_addr_defined(linfo->fheap_addr)) { /* Open the name index v2 B-tree */ if (NULL == (bt2_name = H5B2_open(grp_oloc->file, linfo->name_bt2_addr, NULL))) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open v2 B-tree for name index"); /* Retrieve # of records in "name" B-tree */ /* (should be same # of records in all indices) */ if (H5B2_get_nrec(bt2_name, &linfo->nlinks) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve # of records in index") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve # of records in index"); } /* end if */ else { /* Retrieve # of links from object header */ if (H5O_get_nlinks(grp_oloc, &linfo->nlinks) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve # of links for object") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve # of links for object"); } /* end if */ } /* end if */ } /* end if */ @@ -350,7 +350,7 @@ H5G__obj_compact_to_dense_cb(const void *_mesg, unsigned H5_ATTR_UNUSED idx, voi /* Insert link into dense link storage */ if (H5G__dense_insert(udata->f, udata->linfo, lnk) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert link into dense storage") + HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert link into dense storage"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -381,7 +381,7 @@ H5G__obj_stab_to_new_cb(const H5O_link_t *lnk, void *_udata) /* Insert link into group */ H5_GCC_CLANG_DIAG_OFF("cast-qual") if (H5G_obj_insert(udata->grp_oloc, lnk->name, (H5O_link_t *)lnk, FALSE, H5O_TYPE_UNKNOWN, NULL) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, H5_ITER_ERROR, "can't insert link into group") + HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, H5_ITER_ERROR, "can't insert link into group"); H5_GCC_CLANG_DIAG_ON("cast-qual") done: @@ -423,7 +423,7 @@ H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk, /* Check if we have information about the number of objects in this group */ /* (by attempting to get the link info message for this group) */ if ((linfo_exists = H5G__obj_get_linfo(grp_oloc, &linfo)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message"); if (linfo_exists) { H5O_ginfo_t ginfo; /* Group info message */ size_t link_msg_size; /* Size of new link message in the file */ @@ -443,11 +443,11 @@ H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk, /* Get the link's message size */ if ((link_msg_size = H5O_msg_raw_size(grp_oloc->file, H5O_LINK_ID, FALSE, obj_lnk)) == 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGETSIZE, FAIL, "can't get link size") + HGOTO_ERROR(H5E_SYM, H5E_CANTGETSIZE, FAIL, "can't get link size"); /* Get the group info */ if (NULL == H5O_msg_read(grp_oloc, H5O_GINFO_ID, &ginfo)) - HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't get group info") + HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't get group info"); /* If there's still a small enough number of links, use the 'link' message */ /* (If the encoded form of the link is too large to fit into an object @@ -464,16 +464,16 @@ H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk, /* Get the pipeline message, if it exists */ if ((pline_exists = H5O_msg_exists(grp_oloc, H5O_PLINE_ID)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to read object header") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to read object header"); if (pline_exists) { if (NULL == H5O_msg_read(grp_oloc, H5O_PLINE_ID, &tmp_pline)) - HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't get link pipeline") + HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't get link pipeline"); pline = &tmp_pline; } /* end if */ /* The group doesn't currently have "dense" storage for links */ if (H5G__dense_create(grp_oloc->file, &linfo, pline) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create 'dense' form of new format group") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create 'dense' form of new format group"); /* Set up user data for object header message iteration */ udata.f = grp_oloc->file; @@ -484,11 +484,11 @@ H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk, op.op_type = H5O_MESG_OP_APP; op.u.app_op = H5G__obj_compact_to_dense_cb; if (H5O_msg_iterate(grp_oloc, H5O_LINK_ID, &op, &udata) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "error iterating over links") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "error iterating over links"); /* Remove all the 'link' messages */ if (H5O_msg_remove(grp_oloc, H5O_LINK_ID, H5O_ALL, FALSE) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete link messages") + HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete link messages"); use_new_dense = TRUE; } /* end else */ @@ -504,12 +504,12 @@ H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk, /* Insert link info message */ if (H5O_msg_create(grp_oloc, H5O_LINFO_ID, 0, 0, &new_linfo) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message"); /* Insert group info message */ if (H5O_msg_create(grp_oloc, H5O_GINFO_ID, H5O_MSG_FLAG_CONSTANT, H5O_UPDATE_TIME, &new_ginfo) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message"); /* Set up user data for iteration */ udata.grp_oloc = grp_oloc; @@ -517,18 +517,18 @@ H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk, /* Iterate through all links in "old format" group and insert them into new format */ if (H5G__stab_iterate(grp_oloc, H5_ITER_NATIVE, (hsize_t)0, NULL, H5G__obj_stab_to_new_cb, &udata) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTNEXT, FAIL, "error iterating over old format links") + HGOTO_ERROR(H5E_SYM, H5E_CANTNEXT, FAIL, "error iterating over old format links"); /* Remove the symbol table message from the group */ if (H5O_msg_remove(grp_oloc, H5O_STAB_ID, 0, FALSE) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete old format link storage") + HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete old format link storage"); /* Recursively call this routine to insert the new link, since the * group is in the "new format" now and the link info should be * set up, etc. */ if (H5G_obj_insert(grp_oloc, name, obj_lnk, adj_link, obj_type, crt_info) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert link into group") + HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert link into group"); /* Done with insertion now */ HGOTO_DONE(SUCCEED); @@ -541,18 +541,18 @@ H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk, if (use_old_format) { /* Insert into symbol table */ if (H5G__stab_insert(grp_oloc, name, obj_lnk, obj_type, crt_info) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert entry into symbol table") + HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert entry into symbol table"); } /* end if */ else { if (use_new_dense) { /* Insert into dense link storage */ if (H5G__dense_insert(grp_oloc->file, &linfo, obj_lnk) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert link into dense storage") + HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert link into dense storage"); } /* end if */ else { /* Insert with link message */ if (H5G__compact_insert(grp_oloc, obj_lnk) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert link as link message") + HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert link as link message"); } /* end else */ } /* end else */ @@ -560,7 +560,7 @@ H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk, if (!use_old_format) { linfo.nlinks++; if (H5O_msg_write(grp_oloc, H5O_LINFO_ID, 0, H5O_UPDATE_TIME, &linfo) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "can't update link info message") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "can't update link info message"); } /* end if */ /* Increment link count on object, if requested and it's a hard link */ @@ -574,7 +574,7 @@ H5G_obj_insert(const H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk, /* Increment reference count for object */ if (H5O_link(&obj_oloc, 1) < 0) - HGOTO_ERROR(H5E_SYM, H5E_LINKCOUNT, FAIL, "unable to increment hard link count") + HGOTO_ERROR(H5E_SYM, H5E_LINKCOUNT, FAIL, "unable to increment hard link count"); } /* end if */ done: @@ -613,40 +613,40 @@ H5G__obj_iterate(const H5O_loc_t *grp_oloc, H5_index_t idx_type, H5_iter_order_t /* Attempt to get the link info for this group */ if ((linfo_exists = H5G__obj_get_linfo(grp_oloc, &linfo)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message"); if (linfo_exists) { /* Check for going out of bounds */ if (skip > 0 && (size_t)skip >= linfo.nlinks) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "index out of bound") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "index out of bound"); /* Check for creation order tracking, if creation order index lookup requested */ if (idx_type == H5_INDEX_CRT_ORDER) { /* Check if creation order is tracked */ if (!linfo.track_corder) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "creation order not tracked for links in group") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "creation order not tracked for links in group"); } /* end if */ if (H5_addr_defined(linfo.fheap_addr)) { /* Iterate over the links in the group, building a table of the link messages */ if ((ret_value = H5G__dense_iterate(grp_oloc->file, &linfo, idx_type, order, skip, last_lnk, op, op_data)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over dense links") + HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over dense links"); } /* end if */ else { /* Get the object's name from the link messages */ if ((ret_value = H5G__compact_iterate(grp_oloc, &linfo, idx_type, order, skip, last_lnk, op, op_data)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over compact links") + HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over compact links"); } /* end else */ } /* end if */ else { /* Can only perform name lookups on groups with symbol tables */ if (idx_type != H5_INDEX_NAME) - HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "no creation order index to query") + HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "no creation order index to query"); /* Iterate over symbol table */ if ((ret_value = H5G__stab_iterate(grp_oloc, order, skip, last_lnk, op, op_data)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over symbol table") + HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over symbol table"); } /* end else */ done: @@ -686,18 +686,18 @@ H5G__obj_info(const H5O_loc_t *oloc, H5G_info_t *grp_info) /* Deep copy (duplicate) of the group location object */ if (H5O_loc_copy_deep(&grp_oloc, oloc) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, FAIL, "can't copy object location") + HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, FAIL, "can't copy object location"); /* Open the group */ if (NULL == (grp = H5G_open(&grp_loc))) - HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "mount point not found") + HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "mount point not found"); /* Get information from the group */ grp_info->mounted = H5G_MOUNTED(grp); /* Attempt to get the link info for this group */ if ((linfo_exists = H5G__obj_get_linfo(oloc, &linfo)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message"); if (linfo_exists) { /* Retrieve the information about the links */ grp_info->nlinks = linfo.nlinks; @@ -712,7 +712,7 @@ H5G__obj_info(const H5O_loc_t *oloc, H5G_info_t *grp_info) else { /* Get the number of objects in this group by iterating over symbol table */ if (H5G__stab_count(oloc, &grp_info->nlinks) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTCOUNT, FAIL, "can't count objects") + HGOTO_ERROR(H5E_SYM, H5E_CANTCOUNT, FAIL, "can't count objects"); /* Set the other information about the group */ grp_info->storage_type = H5G_STORAGE_TYPE_SYMBOL_TABLE; @@ -752,35 +752,35 @@ H5G_obj_get_name_by_idx(const H5O_loc_t *oloc, H5_index_t idx_type, H5_iter_orde /* Attempt to get the link info for this group */ if ((linfo_exists = H5G__obj_get_linfo(oloc, &linfo)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message"); if (linfo_exists) { /* Check for creation order tracking, if creation order index lookup requested */ if (idx_type == H5_INDEX_CRT_ORDER) /* Check if creation order is tracked */ if (!linfo.track_corder) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "creation order not tracked for links in group") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "creation order not tracked for links in group"); /* Check for dense link storage */ if (H5_addr_defined(linfo.fheap_addr)) { /* Get the object's name from the dense link storage */ if (H5G__dense_get_name_by_idx(oloc->file, &linfo, idx_type, order, n, name, name_size, name_len) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate name") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate name"); } /* end if */ else { /* Get the object's name from the link messages */ if (H5G__compact_get_name_by_idx(oloc, &linfo, idx_type, order, n, name, name_size, name_len) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate name") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate name"); } /* end else */ } /* end if */ else { /* Can only perform name lookups on groups with symbol tables */ if (idx_type != H5_INDEX_NAME) - HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "no creation order index to query") + HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "no creation order index to query"); /* Get the object's name from the symbol table */ if (H5G__stab_get_name_by_idx(oloc, order, n, name, name_size, name_len) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate name") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate name"); } /* end else */ done: @@ -821,7 +821,7 @@ H5G__obj_remove_update_linfo(const H5O_loc_t *oloc, H5O_linfo_t *linfo) if (linfo->nlinks == 0) { /* Delete the dense storage */ if (H5G__dense_delete(oloc->file, linfo, FALSE) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete dense link storage") + HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete dense link storage"); } /* end if */ /* Check for switching back to compact storage */ else { @@ -829,7 +829,7 @@ H5G__obj_remove_update_linfo(const H5O_loc_t *oloc, H5O_linfo_t *linfo) /* Get the group info */ if (NULL == H5O_msg_read(oloc, H5O_GINFO_ID, &ginfo)) - HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't get group info") + HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't get group info"); /* Check if we should switch from dense storage back to link messages */ if (linfo->nlinks < ginfo.min_dense) { @@ -840,11 +840,11 @@ H5G__obj_remove_update_linfo(const H5O_loc_t *oloc, H5O_linfo_t *linfo) /* Build the table of links for this group */ if (H5G__dense_build_table(oloc->file, linfo, H5_INDEX_NAME, H5_ITER_NATIVE, <able) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTNEXT, FAIL, "error iterating over links") + HGOTO_ERROR(H5E_SYM, H5E_CANTNEXT, FAIL, "error iterating over links"); /* Pin the object header */ if (NULL == (oh = H5O_pin(oloc))) - HGOTO_ERROR(H5E_SYM, H5E_CANTPIN, FAIL, "unable to pin group object header") + HGOTO_ERROR(H5E_SYM, H5E_CANTPIN, FAIL, "unable to pin group object header"); /* Inspect links in table for ones that can't be converted back * into link message form (currently only links which can't fit @@ -868,28 +868,28 @@ H5G__obj_remove_update_linfo(const H5O_loc_t *oloc, H5O_linfo_t *linfo) HDONE_ERROR(H5E_SYM, H5E_CANTUNPIN, FAIL, "unable to unpin group object header"); - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message"); } /* end if */ /* Remove the dense storage */ if (H5G__dense_delete(oloc->file, linfo, FALSE) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete dense link storage") + HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete dense link storage"); } /* end if */ /* Release object header */ if (H5O_unpin(oh) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTUNPIN, FAIL, "unable to unpin group object header") + HGOTO_ERROR(H5E_SYM, H5E_CANTUNPIN, FAIL, "unable to unpin group object header"); /* Free link table information */ if (H5G__link_release_table(<able) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to release link table") + HGOTO_ERROR(H5E_SYM, H5E_CANTFREE, FAIL, "unable to release link table"); } /* end if */ } /* end else */ } /* end if */ /* Update link info in the object header */ if (H5O_msg_write(oloc, H5O_LINFO_ID, 0, H5O_UPDATE_TIME, linfo) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "can't update link info message") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "can't update link info message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -921,7 +921,7 @@ H5G_obj_remove(const H5O_loc_t *oloc, H5RS_str_t *grp_full_path_r, const char *n /* Attempt to get the link info for this group */ if ((linfo_exists = H5G__obj_get_linfo(oloc, &linfo)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message"); if (linfo_exists) { /* Using the new format for groups */ use_old_format = FALSE; @@ -930,12 +930,12 @@ H5G_obj_remove(const H5O_loc_t *oloc, H5RS_str_t *grp_full_path_r, const char *n if (H5_addr_defined(linfo.fheap_addr)) { /* Remove object from the dense link storage */ if (H5G__dense_remove(oloc->file, &linfo, grp_full_path_r, name) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object"); } /* end if */ else /* Remove object from the link messages */ if (H5G__compact_remove(oloc, grp_full_path_r, name) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object"); } /* end if */ else { /* Using the old format for groups */ @@ -943,13 +943,13 @@ H5G_obj_remove(const H5O_loc_t *oloc, H5RS_str_t *grp_full_path_r, const char *n /* Remove object from the symbol table */ if (H5G__stab_remove(oloc, grp_full_path_r, name) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object"); } /* end else */ /* Update link info for a new-style group */ if (!use_old_format) if (H5G__obj_remove_update_linfo(oloc, &linfo) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTUPDATE, FAIL, "unable to update link info") + HGOTO_ERROR(H5E_SYM, H5E_CANTUPDATE, FAIL, "unable to update link info"); done: FUNC_LEAVE_NOAPI_TAG(ret_value) @@ -981,13 +981,13 @@ H5G_obj_remove_by_idx(const H5O_loc_t *grp_oloc, H5RS_str_t *grp_full_path_r, H5 /* Attempt to get the link info for this group */ if ((linfo_exists = H5G__obj_get_linfo(grp_oloc, &linfo)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message"); if (linfo_exists) { /* Check for creation order tracking, if creation order index lookup requested */ if (idx_type == H5_INDEX_CRT_ORDER) { /* Check if creation order is tracked */ if (!linfo.track_corder) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "creation order not tracked for links in group") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "creation order not tracked for links in group"); } /* end if */ /* Using the new format for groups */ @@ -997,31 +997,31 @@ H5G_obj_remove_by_idx(const H5O_loc_t *grp_oloc, H5RS_str_t *grp_full_path_r, H5 if (H5_addr_defined(linfo.fheap_addr)) { /* Remove object from the dense link storage */ if (H5G__dense_remove_by_idx(grp_oloc->file, &linfo, grp_full_path_r, idx_type, order, n) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object"); } /* end if */ else { /* Remove object from compact link storage */ if (H5G__compact_remove_by_idx(grp_oloc, &linfo, grp_full_path_r, idx_type, order, n) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object"); } /* end else */ } /* end if */ else { /* Can only perform name lookups on groups with symbol tables */ if (idx_type != H5_INDEX_NAME) - HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "no creation order index to query") + HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "no creation order index to query"); /* Using the old format for groups */ use_old_format = TRUE; /* Remove object from the symbol table */ if (H5G__stab_remove_by_idx(grp_oloc, grp_full_path_r, order, n) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object"); } /* end else */ /* Update link info for a new-style group */ if (!use_old_format) if (H5G__obj_remove_update_linfo(grp_oloc, &linfo) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTUPDATE, FAIL, "unable to update link info") + HGOTO_ERROR(H5E_SYM, H5E_CANTUPDATE, FAIL, "unable to update link info"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -1051,24 +1051,24 @@ H5G__obj_lookup(const H5O_loc_t *grp_oloc, const char *name, hbool_t *found, H5O /* Attempt to get the link info message for this group */ if ((linfo_exists = H5G__obj_get_linfo(grp_oloc, &linfo)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message"); if (linfo_exists) { /* Check for dense link storage */ if (H5_addr_defined(linfo.fheap_addr)) { /* Get the object's info from the dense link storage */ if (H5G__dense_lookup(grp_oloc->file, &linfo, name, found, lnk) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object"); } /* end if */ else { /* Get the object's info from the link messages */ if (H5G__compact_lookup(grp_oloc, name, found, lnk) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object"); } /* end else */ } /* end if */ else /* Get the object's info from the symbol table */ if (H5G__stab_lookup(grp_oloc, name, found, lnk) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object"); done: FUNC_LEAVE_NOAPI_TAG(ret_value) @@ -1099,35 +1099,35 @@ H5G_obj_lookup_by_idx(const H5O_loc_t *grp_oloc, H5_index_t idx_type, H5_iter_or /* Attempt to get the link info message for this group */ if ((linfo_exists = H5G__obj_get_linfo(grp_oloc, &linfo)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message"); if (linfo_exists) { /* Check for creation order tracking, if creation order index lookup requested */ if (idx_type == H5_INDEX_CRT_ORDER) { /* Check if creation order is tracked */ if (!linfo.track_corder) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "creation order not tracked for links in group") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "creation order not tracked for links in group"); } /* end if */ /* Check for dense link storage */ if (H5_addr_defined(linfo.fheap_addr)) { /* Get the link from the dense storage */ if (H5G__dense_lookup_by_idx(grp_oloc->file, &linfo, idx_type, order, n, lnk) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object"); } /* end if */ else { /* Get the link from the link messages */ if (H5G__compact_lookup_by_idx(grp_oloc, &linfo, idx_type, order, n, lnk) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object"); } /* end else */ } /* end if */ else { /* Can only perform name lookups on groups with symbol tables */ if (idx_type != H5_INDEX_NAME) - HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "no creation order index to query") + HGOTO_ERROR(H5E_SYM, H5E_BADVALUE, FAIL, "no creation order index to query"); /* Get the object's info from the symbol table */ if (H5G__stab_lookup_by_idx(grp_oloc, order, n, lnk) < 0) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object") + HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object"); } /* end else */ done: |