diff options
Diffstat (limited to 'src/H5Oshared.c')
-rw-r--r-- | src/H5Oshared.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/H5Oshared.c b/src/H5Oshared.c index 718b3a7..eb4eb26 100644 --- a/src/H5Oshared.c +++ b/src/H5Oshared.c @@ -122,31 +122,31 @@ H5O__shared_read(H5F_t *f, H5O_t *open_oh, unsigned *ioflags, const H5O_shared_t /* Retrieve the fractal heap address for shared messages */ if (H5SM_get_fheap_addr(f, type->id, &fheap_addr) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "can't get fheap address for shared messages") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "can't get fheap address for shared messages"); /* Open the fractal heap */ if (NULL == (fheap = H5HF_open(f, fheap_addr))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open fractal heap") + HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, NULL, "unable to open fractal heap"); /* Get the size of the message in the heap */ if (H5HF_get_obj_len(fheap, &(shared->u.heap_id), &mesg_size) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "can't get message size from fractal heap.") + HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, NULL, "can't get message size from fractal heap."); /* Wrap the local buffer for serialized message */ if (NULL == (wb = H5WB_wrap(mesg_buf, sizeof(mesg_buf)))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "can't wrap buffer") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "can't wrap buffer"); /* Get a pointer to a buffer that's large enough for message */ if (NULL == (mesg_ptr = (uint8_t *)H5WB_actual(wb, mesg_size))) - HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, NULL, "can't get actual buffer") + HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, NULL, "can't get actual buffer"); /* Retrieve the message from the heap */ if (H5HF_read(fheap, &(shared->u.heap_id), mesg_ptr) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "can't read message from fractal heap.") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "can't read message from fractal heap."); /* Decode the message */ if (NULL == (ret_value = (type->decode)(f, open_oh, 0, ioflags, mesg_size, mesg_ptr))) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "can't decode shared message.") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "can't decode shared message."); } /* end if */ else { H5O_loc_t oloc; /* Location for object header where message is stored */ @@ -164,17 +164,17 @@ H5O__shared_read(H5F_t *f, H5O_t *open_oh, unsigned *ioflags, const H5O_shared_t * the same object header the attribute is in. Read the message * directly. */ if (NULL == (ret_value = H5O_msg_read_oh(f, open_oh, type->id, NULL))) - HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL, "unable to read message") + HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL, "unable to read message"); } else /* The shared message is in another object header */ if (NULL == (ret_value = H5O_msg_read(&oloc, type->id, NULL))) - HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL, "unable to read message") + HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL, "unable to read message"); } /* end else */ /* Mark the message as shared */ if (H5O_msg_set_share(type->id, shared, ret_value) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to set sharing information") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to set sharing information"); done: /* Release resources */ @@ -248,14 +248,14 @@ H5O__shared_link_adj(H5F_t *f, H5O_t *open_oh, const H5O_msg_class_t *type, H5O_ hbool_t deleted = FALSE; /* This is used only to satisfy H5O__link_oh */ if (H5O__link_oh(f, adjust, open_oh, &deleted) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "unable to adjust shared object link count") + HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "unable to adjust shared object link count"); assert(!deleted); } else /* The shared message is in another object header */ if (H5O_link(&oloc, adjust) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "unable to adjust shared object link count") + HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "unable to adjust shared object link count"); } /* end if */ else { assert(shared->type == H5O_SHARE_TYPE_SOHM || shared->type == H5O_SHARE_TYPE_HERE); @@ -263,12 +263,12 @@ H5O__shared_link_adj(H5F_t *f, H5O_t *open_oh, const H5O_msg_class_t *type, H5O_ /* Check for decrementing reference count on shared message */ if (adjust < 0) { if (H5SM_delete(f, open_oh, shared) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "unable to delete message from SOHM table") + HGOTO_ERROR(H5E_OHDR, H5E_CANTDEC, FAIL, "unable to delete message from SOHM table"); } /* end if */ /* Check for incrementing reference count on message */ else if (adjust > 0) { if (H5SM_try_share(f, open_oh, 0, type->id, shared, NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTINC, FAIL, "error trying to share message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINC, FAIL, "error trying to share message"); } /* end if */ } /* end else */ @@ -304,7 +304,7 @@ H5O__shared_decode(H5F_t *f, H5O_t *open_oh, unsigned *ioflags, const uint8_t *b /* Version */ version = *buf++; if (version < H5O_SHARED_VERSION_1 || version > H5O_SHARED_VERSION_LATEST) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for shared object message") + HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "bad version number for shared object message"); /* Get the shared information type * Flags are unused before version 3. @@ -355,7 +355,7 @@ H5O__shared_decode(H5F_t *f, H5O_t *open_oh, unsigned *ioflags, const uint8_t *b /* Retrieve actual message, through decoded shared message info */ if (NULL == (ret_value = H5O__shared_read(f, open_oh, ioflags, &sh_mesg, type))) - HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL, "unable to retrieve native message") + HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL, "unable to retrieve native message"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -493,7 +493,7 @@ H5O__shared_delete(H5F_t *f, H5O_t *open_oh, const H5O_msg_class_t *type, H5O_sh /* Decrement the reference count on the shared object */ if (H5O__shared_link_adj(f, open_oh, type, sh_mesg, -1) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "unable to adjust shared object link count") + HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "unable to adjust shared object link count"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -522,7 +522,7 @@ H5O__shared_link(H5F_t *f, H5O_t *open_oh, const H5O_msg_class_t *type, H5O_shar /* Increment the reference count on the shared object */ if (H5O__shared_link_adj(f, open_oh, type, sh_mesg, 1) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "unable to adjust shared object link count") + HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "unable to adjust shared object link count"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -630,7 +630,7 @@ H5O__shared_post_copy_file(H5F_t *f, const H5O_msg_class_t *mesg_type, const H5O src_oloc.file = shared_src->file; src_oloc.addr = shared_src->u.loc.oh_addr; if (H5O_copy_header_map(&src_oloc, &dst_oloc, cpy_info, FALSE, NULL, NULL) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object") + HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object"); /* Set up destination message's shared info */ H5O_UPDATE_SHARED(shared_dst, H5O_SHARE_TYPE_COMMITTED, f, mesg_type->id, 0, dst_oloc.addr) @@ -638,7 +638,7 @@ H5O__shared_post_copy_file(H5F_t *f, const H5O_msg_class_t *mesg_type, const H5O else /* Share the message */ if (H5SM_try_share(f, NULL, H5SM_WAS_DEFERRED, mesg_type->id, shared_dst, mesg_flags) < 0) - HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, "can't share message") + HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, "can't share message"); done: FUNC_LEAVE_NOAPI(ret_value) |