summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2024-03-04 14:54:24 (GMT)
committerGitHub <noreply@github.com>2024-03-04 14:54:24 (GMT)
commit968cf9e707f733b3674d0047bbf7a958ddbc3eb8 (patch)
treec4d1333d7cf3ae61419eb8c09927cb31828ab5d8
parent7ce8c6f81abdc2d844bc12061239b05a983eda82 (diff)
downloadhdf5-968cf9e707f733b3674d0047bbf7a958ddbc3eb8.zip
hdf5-968cf9e707f733b3674d0047bbf7a958ddbc3eb8.tar.gz
hdf5-968cf9e707f733b3674d0047bbf7a958ddbc3eb8.tar.bz2
Improve error messages when tools attempt to use non-enabled S3 and HDFS VFDs. (#4047)
-rw-r--r--tools/libtest/h5tools_test_utils.c2
-rw-r--r--tools/src/h5dump/h5dump.c5
-rw-r--r--tools/src/h5ls/h5ls.c7
-rw-r--r--tools/src/h5stat/h5stat.c5
4 files changed, 12 insertions, 7 deletions
diff --git a/tools/libtest/h5tools_test_utils.c b/tools/libtest/h5tools_test_utils.c
index 6f3c0a6..32f109b 100644
--- a/tools/libtest/h5tools_test_utils.c
+++ b/tools/libtest/h5tools_test_utils.c
@@ -544,7 +544,7 @@ test_populate_ros3_fa(void)
#ifndef H5_HAVE_ROS3_VFD
puts(" -SKIP-");
- puts(" Read-Only S3 VFD not enabled");
+ puts(" Test is skipped unless HDF5 is configured and built with the Read-Only S3 VFD enabled.");
fflush(stdout);
return 0;
#else
diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c
index 8f2c406..63c2102 100644
--- a/tools/src/h5dump/h5dump.c
+++ b/tools/src/h5dump/h5dump.c
@@ -1169,7 +1169,8 @@ end_collect:
vfd_info_g.info = &ros3_fa_g;
#else
- error_msg("Read-Only S3 VFD not enabled.\n");
+ error_msg(
+ "Read-Only S3 VFD is not available unless enabled when HDF5 is configured and built.\n");
h5tools_setstatus(EXIT_FAILURE);
goto done;
#endif
@@ -1188,7 +1189,7 @@ end_collect:
vfd_info_g.info = &hdfs_fa_g;
#else
- error_msg("HDFS VFD not enabled.\n");
+ error_msg("HDFS VFD is not available unless enabled when HDF5 is configured and built.\n");
h5tools_setstatus(EXIT_FAILURE);
goto done;
#endif
diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c
index 04c5ff3..b3488d5 100644
--- a/tools/src/h5ls/h5ls.c
+++ b/tools/src/h5ls/h5ls.c
@@ -2858,7 +2858,8 @@ main(int argc, char *argv[])
vfd_info.info = &ros3_fa;
#else
- fprintf(rawerrorstream, "Error: Read-Only S3 VFD is not enabled\n\n");
+ fprintf(rawerrorstream, "Error: Read-Only S3 VFD is not available unless enabled when HDF5 is "
+ "configured and built.\n\n");
usage();
leave(EXIT_FAILURE);
#endif
@@ -2881,7 +2882,9 @@ main(int argc, char *argv[])
vfd_info.info = &hdfs_fa;
#else
- fprintf(rawerrorstream, "Error: The HDFS VFD is not enabled\n\n");
+ fprintf(
+ rawerrorstream,
+ "Error: The HDFS VFD is not available unless enabled when HDF5 is configured and built.\n\n");
usage();
leave(EXIT_FAILURE);
#endif
diff --git a/tools/src/h5stat/h5stat.c b/tools/src/h5stat/h5stat.c
index 15232e4..a90ef5e 100644
--- a/tools/src/h5stat/h5stat.c
+++ b/tools/src/h5stat/h5stat.c
@@ -947,7 +947,8 @@ parse_command_line(int argc, const char *const *argv, struct handler_t **hand_re
drivername = drivernames[ROS3_VFD_IDX];
#else
- error_msg("Read-Only S3 VFD not enabled.\n");
+ error_msg(
+ "Read-Only S3 VFD is not available unless enabled when HDF5 is configured and built.\n");
goto error;
#endif
break;
@@ -961,7 +962,7 @@ parse_command_line(int argc, const char *const *argv, struct handler_t **hand_re
drivername = drivernames[HDFS_VFD_IDX];
#else
- error_msg("HDFS VFD not enabled.\n");
+ error_msg("HDFS VFD is not available unless enabled when HDF5 is configured and built.\n");
goto error;
#endif
break;