diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2006-11-28 20:29:28 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2006-11-28 20:29:28 (GMT) |
commit | 1b03a4cc34faee03625e2d71c5fd4a7e9a4adf07 (patch) | |
tree | fdee34d1d50b03fc89f543b47c98c57cc3f07314 /src/H5Ocopy.c | |
parent | 1687720a5fe51d32e1544371eaa75af162f35a31 (diff) | |
download | hdf5-1b03a4cc34faee03625e2d71c5fd4a7e9a4adf07.zip hdf5-1b03a4cc34faee03625e2d71c5fd4a7e9a4adf07.tar.gz hdf5-1b03a4cc34faee03625e2d71c5fd4a7e9a4adf07.tar.bz2 |
[svn-r12992] Description:
Add fields for tracking attributes on objects to object header prefix,
when using the latest version of the format.
Reduce size used to store type of header message from 2 bytes to 1. (If we
have >256 message types, we probably have a different problem... :-)
Also, add "birth" time for object (i.e. creation time) [named to align
with similar fields in file systems]
Correct bug in H5Gget_objinfo() - retrieve the ctime field from object info,
instead of the mtime field.
Tested on:
Linux/32 2.6 (chicago)
Linux/64 2.6 (chicago2)
Diffstat (limited to 'src/H5Ocopy.c')
-rw-r--r-- | src/H5Ocopy.c | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c index 44baa9e..1d8f400 100644 --- a/src/H5Ocopy.c +++ b/src/H5Ocopy.c @@ -336,7 +336,29 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */, /* Initialize header information */ oh_dst->version = oh_src->version; oh_dst->nlink = 0; - oh_dst->skipped_mesg_size = 0; + oh_dst->skipped_mesg_size = oh_src->skipped_mesg_size; + oh_dst->sizeof_size = H5F_SIZEOF_SIZE(oloc_dst->file); + oh_dst->sizeof_addr = H5F_SIZEOF_ADDR(oloc_dst->file); + + /* Copy time fields */ + oh_dst->atime = oh_src->atime; + oh_dst->mtime = oh_src->mtime; + oh_dst->ctime = oh_src->ctime; + oh_dst->btime = oh_src->btime; + + /* Copy attribute information */ + oh_dst->max_compact = oh_src->max_compact; + oh_dst->min_dense = oh_src->min_dense; + oh_dst->nattrs = oh_src->nattrs; + /* XXX: Bail out for now, if the source object has densely stored attributes */ + if(H5F_addr_defined(oh_src->attr_fheap_addr)) + HGOTO_ERROR(H5E_OHDR, H5E_UNSUPPORTED, FAIL, "densely stored attributes not supported yet") + else { + HDassert(!H5F_addr_defined(oh_src->name_bt2_addr)); + oh_dst->attr_fheap_addr = HADDR_UNDEF; + oh_dst->name_bt2_addr = HADDR_UNDEF; + } /* end else */ + /* Initialize size of chunk array. The destination always has only one * chunk. @@ -467,9 +489,9 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */, /* copy this message into destination file */ if(copy_type->copy_file) { /* - * Decode the message if necessary. If the message is shared then do - * a shared message, ignoring the message type. - */ + * Decode the message if necessary. If the message is shared then do + * a shared message, ignoring the message type. + */ if(NULL == mesg_src->native) { /* Decode the message if necessary */ HDassert(copy_type->decode); |