summaryrefslogtreecommitdiffstats
path: root/src/H5F.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>1999-05-26 02:07:22 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>1999-05-26 02:07:22 (GMT)
commitf94d9d48ca7000087dab46e78ec9ea4b48939b32 (patch)
tree4b6fcb2109bf384c9efe4454ba4ad4712647cf1c /src/H5F.c
parentac830927fbda984086d7bd601282c5f3e5478176 (diff)
downloadhdf5-f94d9d48ca7000087dab46e78ec9ea4b48939b32.zip
hdf5-f94d9d48ca7000087dab46e78ec9ea4b48939b32.tar.gz
hdf5-f94d9d48ca7000087dab46e78ec9ea4b48939b32.tar.bz2
[svn-r1278] Added size of userblock to base address of the low-level eof to correct bug.
Diffstat (limited to 'src/H5F.c')
-rw-r--r--src/H5F.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/H5F.c b/src/H5F.c
index cb9e9d2..b76eefb 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -1675,9 +1675,18 @@ H5F_flush(H5F_t *f, H5F_scope_t scope, hbool_t invalidate)
/* update file length if necessary */
if (!H5F_addr_defined(&(f->shared->hdf5_eof))) {
- H5F_addr_reset(&(f->shared->hdf5_eof));
- H5F_addr_inc(&(f->shared->hdf5_eof), (hsize_t)(p-buf));
- H5F_low_seteof(f->shared->lf, &(f->shared->hdf5_eof));
+ haddr_t t_addr; /*temporary address */
+
+ /* Set the HDF5 file size */
+ H5F_addr_reset(&(f->shared->hdf5_eof));
+ H5F_addr_inc(&(f->shared->hdf5_eof), (hsize_t)(p-buf));
+
+ /* Set the logical file size, including the userblock data */
+ t_addr = f->shared->hdf5_eof;
+ H5F_addr_add(&t_addr, &(f->shared->base_addr));
+ H5F_low_seteof(f->shared->lf, &t_addr);
+
+ /* Indicate that the boot block needs to be flushed out */
firsttime_bootblock=1;
}