summaryrefslogtreecommitdiffstats
path: root/src/H5F.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5F.c')
-rw-r--r--src/H5F.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/H5F.c b/src/H5F.c
index 72cff79..2b082ff 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -2520,6 +2520,7 @@ hssize_t
H5Fget_freespace(hid_t file_id)
{
H5F_t *file; /* File object for file ID */
+ hsize_t tot_space; /* Amount of free space in the file */
hssize_t ret_value; /* Return value */
FUNC_ENTER_API(H5Fget_freespace, FAIL)
@@ -2530,9 +2531,11 @@ H5Fget_freespace(hid_t file_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a file ID")
/* Go get the actual amount of free space in the file */
- if((ret_value = H5MF_get_freespace(file, H5AC_ind_dxpl_id)) < 0)
+ if(H5MF_get_freespace(file, H5AC_ind_dxpl_id, &tot_space, NULL) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to check free space for file")
+ ret_value = (hssize_t)tot_space;
+
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Fget_freespace() */