summaryrefslogtreecommitdiffstats
path: root/src/H5F.c
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2013-07-30 21:41:23 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2013-07-30 21:41:23 (GMT)
commit147522bb6118ec82f087208d5caa046f57ff801d (patch)
treefdc57bdc084da094731012092ba137336f75baf3 /src/H5F.c
parent4d080e50f6bde9746d2dc12ced01d7f5758965cb (diff)
downloadhdf5-147522bb6118ec82f087208d5caa046f57ff801d.zip
hdf5-147522bb6118ec82f087208d5caa046f57ff801d.tar.gz
hdf5-147522bb6118ec82f087208d5caa046f57ff801d.tar.bz2
[svn-r23948] Bring revisions #23670 - 23713 from trunk to revise_chunks.
h5committested.
Diffstat (limited to 'src/H5F.c')
-rw-r--r--src/H5F.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/H5F.c b/src/H5F.c
index d4371c5..e442803 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -2392,8 +2392,10 @@ H5F_build_actual_name(const H5F_t *f, const H5P_genplist_t *fapl, const char *na
} /* end else */
done:
- if(new_fapl_id > 0 && H5Pclose(new_fapl_id) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEOBJ, FAIL, "can't close duplicated FAPL")
+ /* Close the property list */
+ if(new_fapl_id > 0)
+ if(H5I_dec_app_ref(new_fapl_id) < 0)
+ HDONE_ERROR(H5E_FILE, H5E_CANTCLOSEOBJ, FAIL, "can't close duplicated FAPL")
FUNC_LEAVE_NOAPI(ret_value)
} /* H5F_build_actual_name() */
@@ -2620,16 +2622,15 @@ done:
* david.pitt@bigpond.com
* Apr 27, 2004
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
herr_t
H5Fget_filesize(hid_t file_id, hsize_t *size)
{
- H5F_t *file; /* File object for file ID */
- haddr_t eof; /* End of file address */
- herr_t ret_value = SUCCEED; /* Return value */
+ H5F_t *file; /* File object for file ID */
+ haddr_t eof; /* End of file address */
+ haddr_t base_addr; /* Base address for the file */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*h", file_id, size);
@@ -2639,10 +2640,12 @@ H5Fget_filesize(hid_t file_id, hsize_t *size)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID")
/* Go get the actual file size */
- if(HADDR_UNDEF == (eof = H5FDget_eof(file->shared->lf)))
+ if(HADDR_UNDEF == (eof = H5FD_get_eof(file->shared->lf)))
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get file size")
+ base_addr = H5FD_get_base_addr(file->shared->lf);
- *size = (hsize_t)eof;
+ if(size)
+ *size = (hsize_t)(eof + base_addr); /* Convert relative base address for file to absolute address */
done:
FUNC_LEAVE_API(ret_value)