summaryrefslogtreecommitdiffstats
path: root/src/H5FDcore.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2017-05-27 15:24:46 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2017-05-27 15:24:46 (GMT)
commit56d23f00a7fbceea7ab7217eaeadc791c61b01e2 (patch)
tree6e002d8f2366917b876c1f20feebbb07d0245874 /src/H5FDcore.c
parent9e75f7eeee5d52d35a8dcbffb6c1c18e1966d12b (diff)
parent13d3d4bd0e0b799aa9c3a9b45e445d1f52294d47 (diff)
downloadhdf5-56d23f00a7fbceea7ab7217eaeadc791c61b01e2.zip
hdf5-56d23f00a7fbceea7ab7217eaeadc791c61b01e2.tar.gz
hdf5-56d23f00a7fbceea7ab7217eaeadc791c61b01e2.tar.bz2
Merge pull request #548 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:compat_feature_flag to develop
* commit '13d3d4bd0e0b799aa9c3a9b45e445d1f52294d47': Added feature flag checks for a few other VFDs in test/vfd.c. * Added new public H5FDdriver_query() API call. * Changed return type of H5FD_driver_query() to herr_t. * Updated swmr.c to use H5FDdriver_query() instead of the private call. * Added some flags tests to vfd.c. * Made H5FD_driver_query() a private function instead of static. * Moved H5FD_driver_query() to H5FDint.c. * Minor typo fixes in H5I.c. * Updated swmr.c to check the VFD feature flags and skip the retries test when the VFD is not compatible with H5P_DEFAULT. Initialized IDs to -1 and minor code tidy. Fixed HDFFV-10214: * Updated comments in the library to accurately reflect the semantics of the H5FD_FEAT_POSIX_COMPAT_HANDLE flag. * Removed the check for the POSIX compatible handle feature flag when determining if a VFD supports SWMR. Partial work for HDFFV-10197: * Added a new H5FD_FEAT_DEFAULT_VFD_COMPATIBLE feature flag that is set when a VFD creates output that is compatible with the default VFD. Will be used in the testing but might also be generally useful to users.
Diffstat (limited to 'src/H5FDcore.c')
-rw-r--r--src/H5FDcore.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/H5FDcore.c b/src/H5FDcore.c
index d100a8b..b980b7e 100644
--- a/src/H5FDcore.c
+++ b/src/H5FDcore.c
@@ -982,9 +982,11 @@ H5FD__core_query(const H5FD_t * _file, unsigned long *flags /* out */)
*flags |= H5FD_FEAT_ALLOW_FILE_IMAGE; /* OK to use file image feature with this VFD */
*flags |= H5FD_FEAT_CAN_USE_FILE_IMAGE_CALLBACKS; /* OK to use file image callbacks with this VFD */
- /* If the backing store is open, a POSIX file handle is available */
- if(file && file->fd >= 0 && file->backing_store)
- *flags |= H5FD_FEAT_POSIX_COMPAT_HANDLE; /* VFD handle is POSIX I/O call compatible */
+ /* These feature flags are only applicable if the backing store is enabled */
+ if(file && file->fd >= 0 && file->backing_store) {
+ *flags |= H5FD_FEAT_POSIX_COMPAT_HANDLE; /* get_handle callback returns a POSIX file descriptor */
+ *flags |= H5FD_FEAT_DEFAULT_VFD_COMPATIBLE; /* VFD creates a file which can be opened with the default VFD */
+ }
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)