summaryrefslogtreecommitdiffstats
path: root/src/H5VLnative.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2012-06-15 16:37:15 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2012-06-15 16:37:15 (GMT)
commit381975755dedf3e1fd016daa899527ae24e7547a (patch)
tree5abaa6f3754a144e6ffbeab8615c5e69dc70690a /src/H5VLnative.c
parent06bd7c72045ea407f5b5f4de3019734a68f4929d (diff)
downloadhdf5-381975755dedf3e1fd016daa899527ae24e7547a.zip
hdf5-381975755dedf3e1fd016daa899527ae24e7547a.tar.gz
hdf5-381975755dedf3e1fd016daa899527ae24e7547a.tar.bz2
[svn-r22467] update is_accessible implementation
deprecate is_HDF5
Diffstat (limited to 'src/H5VLnative.c')
-rw-r--r--src/H5VLnative.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/H5VLnative.c b/src/H5VLnative.c
index 7a97c1b..49dd760 100644
--- a/src/H5VLnative.c
+++ b/src/H5VLnative.c
@@ -1705,7 +1705,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5VL_native_file_misc(hid_t loc_id, H5VL_file_misc_t misc_type, hid_t UNUSED req, va_list arguments)
+H5VL_native_file_misc(hid_t id, H5VL_file_misc_t misc_type, hid_t UNUSED req, va_list arguments)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -1722,7 +1722,7 @@ H5VL_native_file_misc(hid_t loc_id, H5VL_file_misc_t misc_type, hid_t UNUSED req
H5F_t *child = NULL;
/* Check arguments */
- if(H5G_loc(loc_id, &loc) < 0)
+ if(H5G_loc(id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
if(NULL == (child = (H5F_t *)H5I_object_verify(child_id, H5I_FILE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file")
@@ -1740,7 +1740,7 @@ H5VL_native_file_misc(hid_t loc_id, H5VL_file_misc_t misc_type, hid_t UNUSED req
H5G_loc_t loc;
/* Check arguments */
- if(H5G_loc(loc_id, &loc) < 0)
+ if(H5G_loc(id, &loc) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
/* Unmount */
@@ -1749,6 +1749,17 @@ H5VL_native_file_misc(hid_t loc_id, H5VL_file_misc_t misc_type, hid_t UNUSED req
break;
}
+ /* H5Fis_accessible */
+ case H5VL_FILE_IS_ACCESSIBLE:
+ {
+ htri_t *ret = va_arg (arguments, htri_t *);
+ const char *name = va_arg (arguments, const char *);
+
+ /* Call private routine */
+ if((*ret = H5F_is_hdf5(name)) < 0)
+ HGOTO_ERROR(H5E_IO, H5E_CANTINIT, FAIL, "unable to open file")
+ break;
+ }
default:
HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't recognize this operation type")
}