summaryrefslogtreecommitdiffstats
path: root/src/H5Pfapl.c
diff options
context:
space:
mode:
authorjhendersonHDF <jhenderson@hdfgroup.org>2023-04-25 17:04:17 (GMT)
committerGitHub <noreply@github.com>2023-04-25 17:04:17 (GMT)
commitb7c8061505ce3971c16bcaf0e96e6964b3ae9dc4 (patch)
tree39b256bf8ffa4ed3f9258285e8add0a38bad15c6 /src/H5Pfapl.c
parent580b2747db63dc2735832fdec6c35f8c3344836d (diff)
downloadhdf5-b7c8061505ce3971c16bcaf0e96e6964b3ae9dc4.zip
hdf5-b7c8061505ce3971c16bcaf0e96e6964b3ae9dc4.tar.gz
hdf5-b7c8061505ce3971c16bcaf0e96e6964b3ae9dc4.tar.bz2
Allow H5P_DEFAULT in H5Pget_vol_cap_flags and H5Pget_vol_id (#2807)
Diffstat (limited to 'src/H5Pfapl.c')
-rw-r--r--src/H5Pfapl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c
index 8e9b680..84d2522 100644
--- a/src/H5Pfapl.c
+++ b/src/H5Pfapl.c
@@ -6147,6 +6147,9 @@ H5Pget_vol_id(hid_t plist_id, hid_t *vol_id /*out*/)
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "ix", plist_id, vol_id);
+ if (H5P_DEFAULT == plist_id)
+ plist_id = H5P_FILE_ACCESS_DEFAULT;
+
/* Get property list for ID */
if (NULL == (plist = (H5P_genplist_t *)H5I_object_verify(plist_id, H5I_GENPROP_LST)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
@@ -6263,6 +6266,9 @@ H5Pget_vol_cap_flags(hid_t plist_id, uint64_t *cap_flags)
/* Get the 'cap_flags' from the connector */
if (cap_flags) {
+ if (H5P_DEFAULT == plist_id)
+ plist_id = H5P_FILE_ACCESS_DEFAULT;
+
if (TRUE == H5P_isa_class(plist_id, H5P_FILE_ACCESS)) {
H5P_genplist_t *plist; /* Property list pointer */
H5VL_connector_prop_t connector_prop; /* Property for VOL connector ID & info */