summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2020-05-18 17:47:41 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-05-20 14:37:20 (GMT)
commit3de98efff8f3a642afddfe485c1f7bc0c10a7a5e (patch)
tree21fe7d5b867c8e4f652e2d61554d37778b75cda7 /tools
parentd91b9f9b0a978860f8dbfc746fa6a2610677eb89 (diff)
downloadhdf5-3de98efff8f3a642afddfe485c1f7bc0c10a7a5e.zip
hdf5-3de98efff8f3a642afddfe485c1f7bc0c10a7a5e.tar.gz
hdf5-3de98efff8f3a642afddfe485c1f7bc0c10a7a5e.tar.bz2
Fix tools compilation.
Diffstat (limited to 'tools')
-rw-r--r--tools/lib/h5tools.c7
-rw-r--r--tools/lib/h5tools.h4
2 files changed, 8 insertions, 3 deletions
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index d00b461..42723a3 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -74,7 +74,7 @@ const char *volnames[] = {
* somehow otherwise not enabled.
*
*/
-const char *drivernames[] = {
+const char *drivernames[]={
[SEC2_VFD_IDX] = "sec2",
[DIRECT_VFD_IDX] = "direct",
[LOG_VFD_IDX] = "log",
@@ -498,9 +498,9 @@ h5tools_set_fapl_vfd(hid_t fapl_id, h5tools_vfd_info_t *vfd_info)
herr_t ret_value = SUCCEED;
/* Determine which driver the user wants to open the file with */
- if (!HDstrcmp(fapl_info->u.name, drivernames[SWMR_VFD_IDX])) {
+ if (!HDstrcmp(vfd_info->name, drivernames[SWMR_VFD_IDX])) {
/* SWMR driver */
- if (swmr_fapl_augment(fapl, vfd_info->fname) < 0)
+ if (swmr_fapl_augment(fapl_id, vfd_info->fname) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "swmr_fapl_augment failed");
} else if (!HDstrcmp(vfd_info->name, drivernames[SEC2_VFD_IDX])) {
/* SEC2 Driver */
@@ -967,6 +967,7 @@ h5tools_fopen(const char *fname, unsigned flags, hid_t fapl_id, hbool_t use_spec
continue;
vfd_info.info = NULL;
+ vfd_info.fname = fname;
vfd_info.name = drivernames[drivernum];
/* Get a fapl reflecting the selected VOL connector and VFD */
diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h
index 2b6fffb..0a85d6a 100644
--- a/tools/lib/h5tools.h
+++ b/tools/lib/h5tools.h
@@ -568,6 +568,9 @@ typedef struct h5tools_vfd_info_t {
/* Name of the VFD */
const char *name;
+
+ /* Name of the file to open with the VFD */
+ const char *fname;
} h5tools_vfd_info_t;
H5TOOLS_DLLVAR const char *volnames[];
@@ -595,6 +598,7 @@ typedef enum {
MPIO_VFD_IDX,
ROS3_VFD_IDX,
HDFS_VFD_IDX,
+ SWMR_VFD_IDX,
} driver_idx;
/* The following include, h5tools_str.h, must be after the