summaryrefslogtreecommitdiffstats
path: root/src/H5VLnative.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2013-06-27 15:44:50 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2013-06-27 15:44:50 (GMT)
commit0fe43fbf2cd56f142ec322daca2a669fac8243ed (patch)
treef01427e9de3133b822475e1aeb3c73ad21a4ec1f /src/H5VLnative.c
parent7320a66aa7224549c308132a796cef325d377116 (diff)
parenta4dc3ff34d2dec4db339851df381b67970853f2a (diff)
downloadhdf5-0fe43fbf2cd56f142ec322daca2a669fac8243ed.zip
hdf5-0fe43fbf2cd56f142ec322daca2a669fac8243ed.tar.gz
hdf5-0fe43fbf2cd56f142ec322daca2a669fac8243ed.tar.bz2
[svn-r23834] merge from trunk up to r23833.
Fixed several conflicts, mostly because calling API routines internally was removed from several places in the trunk.
Diffstat (limited to 'src/H5VLnative.c')
-rw-r--r--src/H5VLnative.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/H5VLnative.c b/src/H5VLnative.c
index d67b012..9b669f3 100644
--- a/src/H5VLnative.c
+++ b/src/H5VLnative.c
@@ -2125,7 +2125,8 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5VL_native_file_optional(void *obj, H5VL_file_optional_t optional_type, hid_t UNUSED dxpl_id, void UNUSED **req, va_list arguments)
+H5VL_native_file_optional(void *obj, H5VL_file_optional_t optional_type, hid_t UNUSED dxpl_id,
+ void UNUSED **req, va_list arguments)
{
H5F_t *f = NULL; /* File */
herr_t ret_value = SUCCEED; /* Return value */
@@ -2136,14 +2137,18 @@ H5VL_native_file_optional(void *obj, H5VL_file_optional_t optional_type, hid_t U
/* H5Fget_filesize */
case H5VL_FILE_GET_SIZE:
{
- haddr_t eof; /* End of file address */
+ haddr_t eof; /* End of file address */
+ haddr_t base_addr; /* Base address for the file */
hsize_t *ret = va_arg (arguments, hsize_t *);
f = (H5F_t *)obj;
/* Go get the actual file size */
- if(HADDR_UNDEF == (eof = H5FDget_eof(f->shared->lf)))
+ if(HADDR_UNDEF == (eof = H5FD_get_eof(f->shared->lf)))
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to get file size")
- *ret = (hsize_t)eof;
+ base_addr = H5FD_get_base_addr(f->shared->lf);
+
+ if(ret)
+ *ret = (hsize_t)(eof + base_addr); /* Convert relative base address for file to absolute address */
break;
}
/* H5Fget_file_image */