summaryrefslogtreecommitdiffstats
path: root/src/H5FD.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2008-10-14 13:16:25 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2008-10-14 13:16:25 (GMT)
commit22cd1b61cc33d61a705b369f81649b7180ec27a5 (patch)
treea3146c86c11cd99e13e3855e8157fdbeb62fa3d6 /src/H5FD.c
parentc9d37a8e3f4fe142f6beee0a1117d9904659456d (diff)
downloadhdf5-22cd1b61cc33d61a705b369f81649b7180ec27a5.zip
hdf5-22cd1b61cc33d61a705b369f81649b7180ec27a5.tar.gz
hdf5-22cd1b61cc33d61a705b369f81649b7180ec27a5.tar.bz2
[svn-r15861] Description:
Various bug fixes & cleanups with VFDs and file free space changes, along with cleaning up compiler warnings. Enable more VFDs (for 'make check-vfd' testing) for many tests. Tested on: Mac OS X/32 10.5.5 (amazon) in debug mode Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/Intel compilers w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'src/H5FD.c')
-rw-r--r--src/H5FD.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/H5FD.c b/src/H5FD.c
index 9eacd3e..4c316d1 100644
--- a/src/H5FD.c
+++ b/src/H5FD.c
@@ -1712,15 +1712,27 @@ H5FD_get_feature_flags(const H5FD_t *file, unsigned long *feature_flags)
herr_t
H5FD_get_fs_type_map(const H5FD_t *file, H5FD_mem_t *type_map)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_get_fs_type_map)
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI(H5FD_get_fs_type_map, FAIL)
+ /* Sanity check */
HDassert(file);
+ HDassert(file && file->cls);
HDassert(type_map);
- /* Copy free space type mapping */
- HDmemcpy(type_map, file->cls->fl_map, sizeof(file->cls->fl_map));
+ /* Check for VFD class providing a type map retrieval rouine */
+ if(file->cls->get_type_map) {
+ /* Retrieve type mapping for this file */
+ if((file->cls->get_type_map)(file, type_map) < 0)
+ HGOTO_ERROR(H5E_VFL, H5E_CANTGET, FAIL, "driver get type map failed")
+ } /* end if */
+ else
+ /* Copy class's default free space type mapping */
+ HDmemcpy(type_map, file->cls->fl_map, sizeof(file->cls->fl_map));
- FUNC_LEAVE_NOAPI(SUCCEED)
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_get_fs_type_map() */