summaryrefslogtreecommitdiffstats
path: root/tools/src/h5stat/h5stat.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/src/h5stat/h5stat.c')
-rw-r--r--tools/src/h5stat/h5stat.c26
1 files changed, 5 insertions, 21 deletions
diff --git a/tools/src/h5stat/h5stat.c b/tools/src/h5stat/h5stat.c
index 9ad9203..1fbc03c 100644
--- a/tools/src/h5stat/h5stat.c
+++ b/tools/src/h5stat/h5stat.c
@@ -1704,26 +1704,10 @@ main(int argc, char *argv[])
if (drivername) {
h5tools_vfd_info_t vfd_info;
- vfd_info.info = NULL;
- vfd_info.name = drivername;
- vfd_info.fname = fname;
-
- if (!HDstrcmp(drivername, drivernames[ROS3_VFD_IDX])) {
-#ifdef H5_HAVE_ROS3_VFD
- vfd_info.info = (void *)&ros3_fa;
-#else
- error_msg("Read-Only S3 VFD not enabled.\n");
- goto done;
-#endif
- }
- else if (!HDstrcmp(drivername, drivernames[HDFS_VFD_IDX])) {
-#ifdef H5_HAVE_LIBHDFS
- vfd_info.info = (void *)&hdfs_fa;
-#else
- error_msg("HDFS VFD not enabled.\n");
- goto done;
-#endif
- }
+ vfd_info.type = VFD_BY_NAME;
+ vfd_info.info = NULL;
+ vfd_info.u.name = drivername;
+ vfd_info.fname = fname;
if ((fapl_id = h5tools_get_fapl(H5P_DEFAULT, NULL, &vfd_info)) < 0) {
error_msg("Unable to create FAPL for file access\n");
@@ -1740,7 +1724,7 @@ main(int argc, char *argv[])
HDprintf("Filename: %s\n", fname);
- fid = h5tools_fopen(fname, H5F_ACC_RDONLY, fapl_id, (fapl_id == H5P_DEFAULT) ? FALSE : TRUE, NULL, 0);
+ fid = h5tools_fopen(fname, H5F_ACC_RDONLY, fapl_id, (fapl_id != H5P_DEFAULT), NULL, 0);
if (fid < 0) {
error_msg("unable to open file \"%s\"\n", fname);