summaryrefslogtreecommitdiffstats
path: root/src/H5F.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2012-10-16 14:53:01 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2012-10-16 14:53:01 (GMT)
commite54b019108172f807a5d4af1915ba0a6cee18a7c (patch)
tree7ac71b52f1ba039eeee151d2b5a9192c7b9162d3 /src/H5F.c
parentf5b20375943c2f0f27390a94e1a8e1c7de98c404 (diff)
downloadhdf5-e54b019108172f807a5d4af1915ba0a6cee18a7c.zip
hdf5-e54b019108172f807a5d4af1915ba0a6cee18a7c.tar.gz
hdf5-e54b019108172f807a5d4af1915ba0a6cee18a7c.tar.bz2
[svn-r22902] - fix bug in H5is_accessible (check if fapl is default, and convert it to default access plist)
- remove the c++ and fortran interfaces for H5is_hdf5 as it is deprecated - add the c++ and fortran interfaces for H5is_accessible - update all tests to use is_accessible and not is_hdf5
Diffstat (limited to 'src/H5F.c')
-rw-r--r--src/H5F.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/H5F.c b/src/H5F.c
index e4fafa5..d525a9f 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -451,10 +451,17 @@ H5Fis_accessible(const char *name, hid_t fapl_id)
FUNC_ENTER_API(FAIL)
H5TRACE2("t", "*si", name, fapl_id);
- /* Check args and all the boring stuff. */
+ /* Check args */
if(!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "no file name specified")
+ /* Check the file access property list */
+ if(H5P_DEFAULT == fapl_id)
+ fapl_id = H5P_FILE_ACCESS_DEFAULT;
+ else
+ if(TRUE != H5P_isa_class(fapl_id, H5P_FILE_ACCESS))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not file access property list")
+
if(H5VL_file_misc(NULL, NULL, H5VL_FILE_IS_ACCESSIBLE, H5_REQUEST_NULL,
fapl_id, name, &ret_value) < 0)
HGOTO_ERROR(H5E_INTERNAL, H5E_CANTGET, FAIL, "unable to get file handle")