diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2007-04-02 20:27:34 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2007-04-02 20:27:34 (GMT) |
commit | 711836587a19b9b5a6e9a5581807b288e2a49c31 (patch) | |
tree | 42fa64832ce960a228d0b8bb92f9246202f546bf /src/H5D.c | |
parent | dd3768ee25e4db04301f26f699f731ea8f5291fa (diff) | |
download | hdf5-711836587a19b9b5a6e9a5581807b288e2a49c31.zip hdf5-711836587a19b9b5a6e9a5581807b288e2a49c31.tar.gz hdf5-711836587a19b9b5a6e9a5581807b288e2a49c31.tar.bz2 |
[svn-r13572]
Bug fixes
Reset external file list slots name_offset to a state when created (0) in H5D_crt_copy
so that it conforms to an assertion in H5D_update_entry_info that assumes the name_offset is 0 at this point
this fixes the problem of h5repack and external files, add a new test and files for an external file
h5diff, check for an error return in H5D_get_storage_size
tested linux 32, 64
Diffstat (limited to 'src/H5D.c')
-rw-r--r-- | src/H5D.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -494,6 +494,9 @@ H5D_term_interface(void) * Programmer: Raymond Lu * Tuesday, October 2, 2001 * + * Modifications: pvn, April 02, 2007 + * Reset external file list slots name_offset to a state when created + * *------------------------------------------------------------------------- */ /* ARGSUSED */ @@ -537,6 +540,20 @@ H5D_crt_copy(hid_t new_plist_id, hid_t old_plist_id, void UNUSED *copy_data) HDmemset(&dst_efl,0,sizeof(H5O_efl_t)); if(NULL==H5O_copy(H5O_EFL_ID, &src_efl, &dst_efl)) HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't copy external file list") + + /* reset efl name_offset and heap_addr, these are the values when the dataset is created */ + if (dst_efl.slot) + { + unsigned int i; + + dst_efl.heap_addr = HADDR_UNDEF; + for ( i = 0; i < dst_efl.nused; i++) + { + dst_efl.slot[i].name_offset = 0; + } + + } + if(NULL==H5O_copy(H5O_PLINE_ID, &src_pline, &dst_pline)) HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "can't copy data pipeline") |