summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/lib/h5diff_array.c42
-rw-r--r--tools/lib/h5tools.c15
-rw-r--r--tools/lib/h5tools_str.c4
-rw-r--r--tools/libtest/h5tools_test_utils.c8
-rw-r--r--tools/src/h5copy/h5copy.c17
-rw-r--r--tools/src/h5diff/h5diff_common.c16
-rw-r--r--tools/src/h5diff/ph5diff_main.c2
-rw-r--r--tools/src/h5dump/h5dump.c18
-rw-r--r--tools/src/h5ls/h5ls.c13
-rw-r--r--tools/src/h5perf/pio_engine.c18
-rw-r--r--tools/src/h5perf/pio_perf.c8
-rw-r--r--tools/src/h5perf/sio_engine.c61
-rw-r--r--tools/src/h5perf/sio_perf.c8
-rw-r--r--tools/src/h5repack/h5repack_copy.c6
-rw-r--r--tools/src/h5repack/h5repack_main.c17
-rw-r--r--tools/src/h5stat/h5stat.c24
-rw-r--r--tools/src/misc/h5repart.c8
-rw-r--r--tools/test/h5copy/h5copygentest.c2
-rw-r--r--tools/test/h5diff/testfiles/h5diff_10.txt5
-rw-r--r--tools/test/h5diff/testfiles/h5diff_600.txt5
-rw-r--r--tools/test/h5diff/testfiles/h5diff_603.txt5
-rw-r--r--tools/test/h5diff/testfiles/h5diff_606.txt5
-rw-r--r--tools/test/h5diff/testfiles/h5diff_612.txt5
-rw-r--r--tools/test/h5diff/testfiles/h5diff_615.txt5
-rw-r--r--tools/test/h5diff/testfiles/h5diff_621.txt5
-rw-r--r--tools/test/h5diff/testfiles/h5diff_622.txt5
-rw-r--r--tools/test/h5diff/testfiles/h5diff_623.txt5
-rw-r--r--tools/test/h5diff/testfiles/h5diff_624.txt5
-rw-r--r--tools/test/h5dump/h5dumpgentest.c30
-rw-r--r--tools/test/h5jam/h5jamgentest.c6
-rw-r--r--tools/test/h5repack/h5repacktst.c6
-rw-r--r--tools/test/h5repack/testfiles/h5repack-help.txt5
-rw-r--r--tools/test/h5stat/h5stat_gentest.c14
-rw-r--r--tools/test/h5stat/testfiles/h5stat_help1.ddl4
-rw-r--r--tools/test/h5stat/testfiles/h5stat_help2.ddl4
-rw-r--r--tools/test/h5stat/testfiles/h5stat_nofile.ddl4
-rw-r--r--tools/test/misc/h5perf_gentest.c54
-rw-r--r--tools/test/perform/iopipe.c2
-rw-r--r--tools/testfiles/h5dump-help.txt6
-rw-r--r--tools/testfiles/pbits/tnofilename-with-packed-bits.ddl6
-rw-r--r--tools/testfiles/pbits/tpbitsIncomplete.ddl6
-rw-r--r--tools/testfiles/pbits/tpbitsLengthExceeded.ddl6
-rw-r--r--tools/testfiles/pbits/tpbitsLengthPositive.ddl6
-rw-r--r--tools/testfiles/pbits/tpbitsMaxExceeded.ddl6
-rw-r--r--tools/testfiles/pbits/tpbitsOffsetExceeded.ddl6
-rw-r--r--tools/testfiles/pbits/tpbitsOffsetNegative.ddl6
46 files changed, 297 insertions, 217 deletions
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index a7156b5..9fa3ccc 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -31,33 +31,29 @@
#define UI_FORMAT "%-15u %-15u %-15u\n"
#define LI_FORMAT "%-15ld %-15ld %-15ld\n"
#define ULI_FORMAT "%-15lu %-15lu %-15lu\n"
-#define LLI_FORMAT "%-15" H5_PRINTF_LL_WIDTH "d %-15" H5_PRINTF_LL_WIDTH "d %-15" H5_PRINTF_LL_WIDTH "d\n"
-#define ULLI_FORMAT "%-15" H5_PRINTF_LL_WIDTH "u %-15" H5_PRINTF_LL_WIDTH "u %-15" H5_PRINTF_LL_WIDTH "u\n"
+#define LLI_FORMAT "%-15lld %-15lld %-15lld\n"
+#define ULLI_FORMAT "%-15llu %-15llu %-15llu\n"
/* with -p option */
-#define F_FORMAT_P "%-15.10g %-15.10g %-15.10g %-14.10g\n"
-#define LD_FORMAT_P "%-15.10Lg %-15.10Lg %-15.10Lg %-14.10Lg\n"
-#define I_FORMAT_P "%-15d %-15d %-15d %-14f\n"
-#define UI_FORMAT_P "%-15u %-15u %-15u %-14f\n"
-#define LI_FORMAT_P "%-15ld %-15ld %-15ld %-14f\n"
-#define ULI_FORMAT_P "%-15lu %-15lu %-15lu %-14f\n"
-#define LLI_FORMAT_P \
- "%-15" H5_PRINTF_LL_WIDTH "d %-15" H5_PRINTF_LL_WIDTH "d %-15" H5_PRINTF_LL_WIDTH "d %-14f\n"
-#define ULLI_FORMAT_P \
- "%-15" H5_PRINTF_LL_WIDTH "u %-15" H5_PRINTF_LL_WIDTH "u %-15" H5_PRINTF_LL_WIDTH "d %-14f\n"
-#define SPACES " "
+#define F_FORMAT_P "%-15.10g %-15.10g %-15.10g %-14.10g\n"
+#define LD_FORMAT_P "%-15.10Lg %-15.10Lg %-15.10Lg %-14.10Lg\n"
+#define I_FORMAT_P "%-15d %-15d %-15d %-14f\n"
+#define UI_FORMAT_P "%-15u %-15u %-15u %-14f\n"
+#define LI_FORMAT_P "%-15ld %-15ld %-15ld %-14f\n"
+#define ULI_FORMAT_P "%-15lu %-15lu %-15lu %-14f\n"
+#define LLI_FORMAT_P "%-15lld %-15lld %-15lld %-14f\n"
+#define ULLI_FORMAT_P "%-15llu %-15llu %-15lld %-14f\n"
+#define SPACES " "
/* not comparable */
-#define F_FORMAT_P_NOTCOMP "%-15.10g %-15.10g %-15.10g not comparable\n"
-#define LD_FORMAT_P_NOTCOMP "%-15.10Lg %-15.10Lg %-15.10Lg not comparable\n"
-#define I_FORMAT_P_NOTCOMP "%-15d %-15d %-15d not comparable\n"
-#define UI_FORMAT_P_NOTCOMP "%-15u %-15u %-15u not comparable\n"
-#define LI_FORMAT_P_NOTCOMP "%-15ld %-15ld %-15ld not comparable\n"
-#define ULI_FORMAT_P_NOTCOMP "%-15lu %-15lu %-15lu not comparable\n"
-#define LLI_FORMAT_P_NOTCOMP \
- "%-15" H5_PRINTF_LL_WIDTH "d %-15" H5_PRINTF_LL_WIDTH "d %-15" H5_PRINTF_LL_WIDTH "d not comparable\n"
-#define ULLI_FORMAT_P_NOTCOMP \
- "%-15" H5_PRINTF_LL_WIDTH "u %-15" H5_PRINTF_LL_WIDTH "u %-15" H5_PRINTF_LL_WIDTH "d not comparable\n"
+#define F_FORMAT_P_NOTCOMP "%-15.10g %-15.10g %-15.10g not comparable\n"
+#define LD_FORMAT_P_NOTCOMP "%-15.10Lg %-15.10Lg %-15.10Lg not comparable\n"
+#define I_FORMAT_P_NOTCOMP "%-15d %-15d %-15d not comparable\n"
+#define UI_FORMAT_P_NOTCOMP "%-15u %-15u %-15u not comparable\n"
+#define LI_FORMAT_P_NOTCOMP "%-15ld %-15ld %-15ld not comparable\n"
+#define ULI_FORMAT_P_NOTCOMP "%-15lu %-15lu %-15lu not comparable\n"
+#define LLI_FORMAT_P_NOTCOMP "%-15lld %-15lld %-15lld not comparable\n"
+#define ULLI_FORMAT_P_NOTCOMP "%-15llu %-15llu %-15lld not comparable\n"
/* if system EPSILON is defined, use the system EPSILON; otherwise, use
constants that are close to most EPSILON values */
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index a88b164..e829b48 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -602,7 +602,7 @@ h5tools_set_fapl_vfd(hid_t fapl_id, h5tools_vfd_info_t *vfd_info)
#ifdef H5_HAVE_ROS3_VFD
if (!vfd_info->info)
H5TOOLS_GOTO_ERROR(FAIL, "Read-only S3 VFD info is invalid");
- if (H5Pset_fapl_ros3(fapl_id, (H5FD_ros3_fapl_t *)vfd_info->info) < 0)
+ if (H5Pset_fapl_ros3(fapl_id, (const H5FD_ros3_fapl_t *)vfd_info->info) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_ros3() failed");
#else
H5TOOLS_GOTO_ERROR(FAIL, "Read-only S3 VFD is not enabled");
@@ -653,7 +653,7 @@ h5tools_set_fapl_vfd(hid_t fapl_id, h5tools_vfd_info_t *vfd_info)
done:
if (ret_value < 0) {
/* Clear error message unless asked for */
- if (enable_error_stack <= 1)
+ if ((H5tools_ERR_STACK_g >= 0) && (enable_error_stack <= 1))
H5Epop(H5tools_ERR_STACK_g, 1);
}
@@ -758,7 +758,7 @@ done:
H5TOOLS_ERROR(FAIL, "failed to decrement refcount on VOL connector ID");
/* Clear error message unless asked for */
- if (enable_error_stack <= 1)
+ if ((H5tools_ERR_STACK_g >= 0) && (enable_error_stack <= 1))
H5Epop(H5tools_ERR_STACK_g, 1);
}
@@ -815,7 +815,7 @@ done:
}
/* Clear error message unless asked for */
- if (enable_error_stack <= 1)
+ if ((H5tools_ERR_STACK_g >= 0) && (enable_error_stack <= 1))
H5Epop(H5tools_ERR_STACK_g, 1);
}
@@ -1094,8 +1094,10 @@ done:
H5Pclose(tmp_fapl_id);
/* Clear error message unless asked for */
- if (ret_value < 0 && enable_error_stack <= 1)
- H5Epop(H5tools_ERR_STACK_g, 1);
+ if (ret_value < 0) {
+ if ((H5tools_ERR_STACK_g >= 0) && (enable_error_stack <= 1))
+ H5Epop(H5tools_ERR_STACK_g, 1);
+ }
return ret_value;
}
@@ -1966,6 +1968,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
else {
if ((region_space = H5Ropen_region(&tref, H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
if (!h5tools_is_zero(&tref, H5Tget_size(H5T_STD_REF))) {
+
region_type = H5Sget_select_type(region_space);
if (region_type == H5S_SEL_POINTS)
render_bin_output_region_points(region_space, region_id, stream,
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index 5976044..5ade61f 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -660,8 +660,8 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
H5TOOLS_START_DEBUG(" ");
/* Build default formats for long long types */
if (!fmt_llong[0]) {
- HDsnprintf(fmt_llong, sizeof(fmt_llong), "%%%sd", H5_PRINTF_LL_WIDTH);
- HDsnprintf(fmt_ullong, sizeof(fmt_ullong), "%%%su", H5_PRINTF_LL_WIDTH);
+ HDsnprintf(fmt_llong, sizeof(fmt_llong), "%%lld");
+ HDsnprintf(fmt_ullong, sizeof(fmt_ullong), "%%llu");
}
/* Append value depending on data type */
diff --git a/tools/libtest/h5tools_test_utils.c b/tools/libtest/h5tools_test_utils.c
index cff77b4..db9efc4 100644
--- a/tools/libtest/h5tools_test_utils.c
+++ b/tools/libtest/h5tools_test_utils.c
@@ -1074,7 +1074,7 @@ test_set_configured_fapl(void)
&wrong_fa,
},
{
- "(common) should fail: unrecoginzed vfd name",
+ "(common) should fail: unrecognized vfd name",
0,
UTIL_TEST_DEFAULT,
"unknown",
@@ -1206,10 +1206,12 @@ test_set_configured_fapl(void)
vfd_info.u.name = C.vfdname;
vfd_info.fname = "ignore";
result = h5tools_get_fapl(H5P_DEFAULT, NULL, &vfd_info);
- if (C.expected == 0)
+ if (C.expected == 0) {
JSVERIFY(result, H5I_INVALID_HID, C.message)
- else
+ }
+ else {
JSVERIFY_NOT(result, H5I_INVALID_HID, C.message)
+ }
#if UTIL_TEST_DEBUG
HDfprintf(stderr, "after test\n");
diff --git a/tools/src/h5copy/h5copy.c b/tools/src/h5copy/h5copy.c
index 6f10fee..eacd05b 100644
--- a/tools/src/h5copy/h5copy.c
+++ b/tools/src/h5copy/h5copy.c
@@ -19,7 +19,7 @@
#define PROGRAMNAME "h5copy"
/* command-line options: short and long-named parameters */
-static const char * s_opts = "d:f:hi:o:ps:vVE";
+static const char * s_opts = "d:f:hi:o:ps:vVE*";
static struct h5_long_options l_opts[] = {{"destination", require_arg, 'd'},
{"flag", require_arg, 'f'},
{"help", no_arg, 'h'},
@@ -29,7 +29,7 @@ static struct h5_long_options l_opts[] = {{"destination", require_arg, 'd'},
{"source", require_arg, 's'},
{"verbose", no_arg, 'v'},
{"version", no_arg, 'V'},
- {"enable-error-stack", no_arg, 'E'},
+ {"enable-error-stack", optional_arg, 'E'},
{NULL, 0, '\0'}};
char * fname_src = NULL;
char * fname_dst = NULL;
@@ -93,15 +93,17 @@ usage(void)
PRINTVALSTREAM(rawoutstream, " -o, --output output file name\n");
PRINTVALSTREAM(rawoutstream, " -s, --source source object name\n");
PRINTVALSTREAM(rawoutstream, " -d, --destination destination object name\n");
+ PRINTVALSTREAM(rawoutstream, " ERROR\n");
+ PRINTVALSTREAM(rawoutstream,
+ " --enable-error-stack Prints messages from the HDF5 error stack as they occur.\n");
+ PRINTVALSTREAM(rawoutstream,
+ " Optional value 2 also prints file open errors.\n");
PRINTVALSTREAM(rawoutstream, " OPTIONS\n");
PRINTVALSTREAM(rawoutstream, " -h, --help Print a usage message and exit\n");
PRINTVALSTREAM(rawoutstream,
" -p, --parents No error if existing, make parent groups as needed\n");
PRINTVALSTREAM(rawoutstream, " -v, --verbose Print information about OBJECTS and OPTIONS\n");
PRINTVALSTREAM(rawoutstream, " -V, --version Print version number and exit\n");
- PRINTVALSTREAM(rawoutstream, " --enable-error-stack\n");
- PRINTVALSTREAM(rawoutstream,
- " Prints messages from the HDF5 error stack as they occur.\n");
PRINTVALSTREAM(rawoutstream, " -f, --flag Flag type\n\n");
PRINTVALSTREAM(rawoutstream, " Flag type is one of the following strings:\n\n");
PRINTVALSTREAM(rawoutstream, " shallow Copy only immediate members for groups\n\n");
@@ -288,7 +290,10 @@ main(int argc, char *argv[])
break;
case 'E':
- enable_error_stack = 1;
+ if (H5_optarg != NULL)
+ enable_error_stack = HDatoi(H5_optarg);
+ else
+ enable_error_stack = 1;
break;
default:
diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c
index 77a6785..2619a9d 100644
--- a/tools/src/h5diff/h5diff_common.c
+++ b/tools/src/h5diff/h5diff_common.c
@@ -25,7 +25,7 @@ static int check_d_input(const char *);
* Command-line options: The user can specify short or long-named
* parameters.
*/
-static const char * s_opts = "hVrv*qn:d:p:NcelxE:A:S";
+static const char * s_opts = "hVrv*qn:d:p:NcelxE:A:S*";
static struct h5_long_options l_opts[] = {{"help", no_arg, 'h'},
{"version", no_arg, 'V'},
{"report", no_arg, 'r'},
@@ -41,7 +41,7 @@ static struct h5_long_options l_opts[] = {{"help", no_arg, 'h'},
{"no-dangling-links", no_arg, 'x'},
{"exclude-path", require_arg, 'E'},
{"exclude-attribute", require_arg, 'A'},
- {"enable-error-stack", no_arg, 'S'},
+ {"enable-error-stack", optional_arg, 'S'},
{"vol-value-1", require_arg, '1'},
{"vol-name-1", require_arg, '2'},
{"vol-info-1", require_arg, '3'},
@@ -300,7 +300,10 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
break;
case 'S':
- enable_error_stack = 1;
+ if (H5_optarg != NULL)
+ enable_error_stack = HDatoi(H5_optarg);
+ else
+ enable_error_stack = 1;
break;
case 'E':
@@ -652,6 +655,10 @@ usage(void)
PRINTVALSTREAM(rawoutstream, " [obj1] Name of an HDF5 object, in absolute path\n");
PRINTVALSTREAM(rawoutstream, " [obj2] Name of an HDF5 object, in absolute path\n");
PRINTVALSTREAM(rawoutstream, "\n");
+ PRINTVALSTREAM(rawoutstream, " ERROR\n");
+ PRINTVALSTREAM(rawoutstream,
+ " --enable-error-stack Prints messages from the HDF5 error stack as they occur.\n");
+ PRINTVALSTREAM(rawoutstream, " Optional value 2 also prints file open errors.\n");
PRINTVALSTREAM(rawoutstream, " OPTIONS\n");
PRINTVALSTREAM(rawoutstream, " -h, --help\n");
PRINTVALSTREAM(rawoutstream, " Print a usage message and exit.\n");
@@ -674,9 +681,6 @@ usage(void)
PRINTVALSTREAM(rawoutstream, " 3 : All level 2 information plus file names.\n");
PRINTVALSTREAM(rawoutstream, " -q, --quiet\n");
PRINTVALSTREAM(rawoutstream, " Quiet mode. Do not produce output.\n");
- PRINTVALSTREAM(rawoutstream, " --enable-error-stack\n");
- PRINTVALSTREAM(rawoutstream,
- " Prints messages from the HDF5 error stack as they occur.\n");
PRINTVALSTREAM(rawoutstream,
" --vol-value-1 Value (ID) of the VOL connector to use for opening the\n");
PRINTVALSTREAM(rawoutstream, " first HDF5 file specified\n");
diff --git a/tools/src/h5diff/ph5diff_main.c b/tools/src/h5diff/ph5diff_main.c
index 8e5c3e8..75fb9a4 100644
--- a/tools/src/h5diff/ph5diff_main.c
+++ b/tools/src/h5diff/ph5diff_main.c
@@ -312,5 +312,5 @@ h5diff_exit(int status)
/* Always exit(0), since MPI implementations do weird stuff when they
* receive a non-zero exit value. - QAK
*/
- HDexit(0);
+ HDexit(status);
}
diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c
index 8c04bc7..22b869c 100644
--- a/tools/src/h5dump/h5dump.c
+++ b/tools/src/h5dump/h5dump.c
@@ -25,8 +25,8 @@ static const char *xml_dtd_uri_g = NULL;
static hbool_t use_custom_vol_g = FALSE;
static hbool_t use_custom_vfd_g = FALSE;
-static h5tools_vol_info_t vol_info_g;
-static h5tools_vfd_info_t vfd_info_g;
+static h5tools_vol_info_t vol_info_g = {0};
+static h5tools_vfd_info_t vfd_info_g = {0};
#ifdef H5_HAVE_ROS3_VFD
/* Default "anonymous" S3 configuration */
@@ -165,6 +165,12 @@ usage(const char *prog)
PRINTVALSTREAM(rawoutstream, " OPTIONS\n");
PRINTVALSTREAM(rawoutstream, " -h, --help Print a usage message and exit\n");
PRINTVALSTREAM(rawoutstream, " -V, --version Print version number and exit\n");
+ PRINTVALSTREAM(rawoutstream, "--------------- Error Options ---------------\n");
+ PRINTVALSTREAM(rawoutstream,
+ " --enable-error-stack Prints messages from the HDF5 error stack as they occur.\n");
+ PRINTVALSTREAM(rawoutstream,
+ " Optional value 2 also prints file open errors.\n");
+ PRINTVALSTREAM(rawoutstream, " Default setting disables any error reporting.\n");
PRINTVALSTREAM(rawoutstream, "--------------- File Options ---------------\n");
PRINTVALSTREAM(rawoutstream, " -n, --contents Print a list of the file contents and exit\n");
PRINTVALSTREAM(rawoutstream, " Optional value 1 also prints attributes.\n");
@@ -254,10 +260,6 @@ usage(const char *prog)
PRINTVALSTREAM(rawoutstream, " -q Q, --sort_by=Q Sort groups and attributes by index Q\n");
PRINTVALSTREAM(rawoutstream, " -z Z, --sort_order=Z Sort groups and attributes by order Z\n");
PRINTVALSTREAM(rawoutstream,
- " --enable-error-stack Prints messages from the HDF5 error stack as they occur.\n");
- PRINTVALSTREAM(rawoutstream,
- " Optional value 2 also prints file open errors.\n");
- PRINTVALSTREAM(rawoutstream,
" --no-compact-subset Disable compact form of subsetting and allow the use\n");
PRINTVALSTREAM(rawoutstream, " of \"[\" in dataset names.\n");
PRINTVALSTREAM(rawoutstream,
@@ -1236,6 +1238,8 @@ end_collect:
h5tools_setstatus(EXIT_FAILURE);
goto done;
}
+
+ vfd_info_g.info = &ros3_fa_g;
#else
error_msg("Read-Only S3 VFD not enabled.\n");
h5tools_setstatus(EXIT_FAILURE);
@@ -1253,6 +1257,8 @@ end_collect:
h5tools_setstatus(EXIT_FAILURE);
goto done;
}
+
+ vfd_info_g.info = &hdfs_fa_g;
#else
error_msg("HDFS VFD not enabled.\n");
h5tools_setstatus(EXIT_FAILURE);
diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c
index 873cec2..389cede 100644
--- a/tools/src/h5ls/h5ls.c
+++ b/tools/src/h5ls/h5ls.c
@@ -1663,7 +1663,6 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ain
hid_t space = H5I_INVALID_HID;
hid_t type = H5I_INVALID_HID;
hsize_t size[H5S_MAX_RANK];
- hsize_t nelmts = 1;
int ndims;
int i;
H5S_class_t space_type;
@@ -1705,10 +1704,8 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ain
case H5S_SIMPLE:
/* simple dataspace */
h5tools_str_append(&buffer, " {");
- for (i = 0; i < ndims; i++) {
+ for (i = 0; i < ndims; i++)
h5tools_str_append(&buffer, "%s%" PRIuHSIZE, i ? ", " : "", size[i]);
- nelmts *= size[i];
- }
h5tools_str_append(&buffer, "}\n");
h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos, (size_t)info->line_ncols,
(hsize_t)0, (hsize_t)0);
@@ -2528,7 +2525,7 @@ done:
* were borrowed from the GNU less(1).
*
* Return: Success: Number of columns.
- * Failure: Some default number of columms.
+ * Failure: Some default number of columns.
*-------------------------------------------------------------------------
*/
static int
@@ -2726,9 +2723,9 @@ main(int argc, char *argv[])
}
else if (!HDstrcmp(argv[argno], "--enable-error-stack")) {
enable_error_stack = 1;
- /* deprecated --errors */
}
else if (!HDstrcmp(argv[argno], "--errors")) {
+ /* deprecated --errors */
enable_error_stack = 1;
}
else if (!HDstrcmp(argv[argno], "--follow-symlinks")) {
@@ -2883,6 +2880,8 @@ main(int argc, char *argv[])
usage();
leave(EXIT_FAILURE);
}
+
+ vfd_info.info = &ros3_fa;
#else
HDfprintf(rawerrorstream, "Error: Read-Only S3 VFD is not enabled\n\n");
usage();
@@ -2904,6 +2903,8 @@ main(int argc, char *argv[])
usage();
leave(EXIT_FAILURE);
}
+
+ vfd_info.info = &hdfs_fa;
#else
HDfprintf(rawerrorstream, "Error: The HDFS VFD is not enabled\n\n");
usage();
diff --git a/tools/src/h5perf/pio_engine.c b/tools/src/h5perf/pio_engine.c
index 1baaca2..9d08938 100644
--- a/tools/src/h5perf/pio_engine.c
+++ b/tools/src/h5perf/pio_engine.c
@@ -234,7 +234,7 @@ do_pio(parameters param)
}
if ((snbytes % pio_mpi_nprocs_g) != 0) {
HDfprintf(stderr,
- "Dataset size (%" H5_PRINTF_LL_WIDTH "d) must be a multiple of the "
+ "Dataset size (%lld) must be a multiple of the "
"number of processes (%d)\n",
(long long)snbytes, pio_mpi_nprocs_g);
GOTOERROR(FAIL);
@@ -243,7 +243,7 @@ do_pio(parameters param)
if (!param.dim2d) {
if (((size_t)(snbytes / pio_mpi_nprocs_g) % buf_size) != 0) {
HDfprintf(stderr,
- "Dataset size/process (%" H5_PRINTF_LL_WIDTH "d) must be a multiple of the "
+ "Dataset size/process (%lld) must be a multiple of the "
"transfer buffer size (%zu)\n",
(long long)(snbytes / pio_mpi_nprocs_g), buf_size);
GOTOERROR(FAIL);
@@ -252,7 +252,7 @@ do_pio(parameters param)
else {
if (((size_t)snbytes % buf_size) != 0) {
HDfprintf(stderr,
- "Dataset side size (%" H5_PRINTF_LL_WIDTH "d) must be a multiple of the "
+ "Dataset side size (%lld) must be a multiple of the "
"transfer buffer size (%zu)\n",
(long long)snbytes, buf_size);
GOTOERROR(FAIL);
@@ -625,15 +625,13 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nby
if (!parms->dim2d) {
HDfprintf(output,
"Debug(do_write): "
- "buf_size=%zu, bytes_begin=%" H5_PRINTF_LL_WIDTH "d, bytes_count=%" H5_PRINTF_LL_WIDTH
- "d\n",
+ "buf_size=%zu, bytes_begin=%lld, bytes_count=%lld\n",
buf_size, (long long)bytes_begin[0], (long long)bytes_count);
}
else {
HDfprintf(output,
"Debug(do_write): "
- "linear buf_size=%zu, bytes_begin=(%" H5_PRINTF_LL_WIDTH "d,%" H5_PRINTF_LL_WIDTH
- "d), bytes_count=%" H5_PRINTF_LL_WIDTH "d\n",
+ "linear buf_size=%zu, bytes_begin=(%lld,%lld), bytes_count=%lld\n",
buf_size * blk_size, (long long)bytes_begin[0], (long long)bytes_begin[1],
(long long)bytes_count);
}
@@ -1640,15 +1638,13 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nbyt
if (!parms->dim2d) {
HDfprintf(output,
"Debug(do_write): "
- "buf_size=%zu, bytes_begin=%" H5_PRINTF_LL_WIDTH "d, bytes_count=%" H5_PRINTF_LL_WIDTH
- "d\n",
+ "buf_size=%zu, bytes_begin=%lld, bytes_count=%lld\n",
buf_size, (long long)bytes_begin[0], (long long)bytes_count);
}
else {
HDfprintf(output,
"Debug(do_write): "
- "linear buf_size=%zu, bytes_begin=(%" H5_PRINTF_LL_WIDTH "d,%" H5_PRINTF_LL_WIDTH
- "d), bytes_count=%" H5_PRINTF_LL_WIDTH "d\n",
+ "linear buf_size=%zu, bytes_begin=(%lld,%lld), bytes_count=%lld\n",
buf_size * blk_size, (long long)bytes_begin[0], (long long)bytes_begin[1],
(long long)bytes_count);
}
diff --git a/tools/src/h5perf/pio_perf.c b/tools/src/h5perf/pio_perf.c
index ec0115b..9c68faf 100644
--- a/tools/src/h5perf/pio_perf.c
+++ b/tools/src/h5perf/pio_perf.c
@@ -1121,25 +1121,25 @@ recover_size_and_print(long long val, const char *end)
if (val >= ONE_MB && (val % ONE_MB) == 0) {
if (val >= ONE_GB && (val % ONE_GB) == 0)
HDfprintf(output,
- "%" H5_PRINTF_LL_WIDTH "d"
+ "%lld"
"GB%s",
val / ONE_GB, end);
else
HDfprintf(output,
- "%" H5_PRINTF_LL_WIDTH "d"
+ "%lld"
"MB%s",
val / ONE_MB, end);
}
else {
HDfprintf(output,
- "%" H5_PRINTF_LL_WIDTH "d"
+ "%lld"
"KB%s",
val / ONE_KB, end);
}
}
else {
HDfprintf(output,
- "%" H5_PRINTF_LL_WIDTH "d"
+ "%lld"
"%s",
val, end);
}
diff --git a/tools/src/h5perf/sio_engine.c b/tools/src/h5perf/sio_engine.c
index bdd2c08..e113e82 100644
--- a/tools/src/h5perf/sio_engine.c
+++ b/tools/src/h5perf/sio_engine.c
@@ -123,7 +123,6 @@ static hid_t h5dxpl = H5I_INVALID_HID; /* Dataset transfer property
* Purpose: SIO Engine where IO are executed.
* Return: results
* Programmer: Christian Chilan, April, 2008
- * Modifications:
*/
void
do_sio(parameters param, results *res)
@@ -134,18 +133,20 @@ do_sio(parameters param, results *res)
iotype iot; /* API type */
char base_name[256]; /* test file base name */
/* return codes */
- herr_t ret_code = 0; /*return code */
+ herr_t ret_code = 0; /* return code */
- char fname[FILENAME_MAX]; /* test file name */
- int i;
- /* HDF5 variables */
- herr_t hrc; /*HDF5 return code */
+ char *fname = NULL;
+ int i;
- /* Sanity check parameters */
+ /* HDF5 variables */
+ herr_t hrc; /* HDF5 return code */
/* IO type */
iot = param.io_type;
+ if (NULL == (fname = HDcalloc(FILENAME_MAX, sizeof(char))))
+ GOTOERROR(FAIL);
+
switch (iot) {
case POSIXIO:
fd.posixfd = -1;
@@ -178,7 +179,7 @@ do_sio(parameters param, results *res)
if ((param.dset_size[i] % param.buf_size[i]) != 0) {
HDfprintf(stderr,
- "Dataset size[%d] (%" H5_PRINTF_LL_WIDTH "d) must be a multiple of the "
+ "Dataset size[%d] (%lld) must be a multiple of the "
"transfer buffer size[%d] (%zu)\n",
param.rank, (long long)param.dset_size[i], param.rank, param.buf_size[i]);
GOTOERROR(FAIL);
@@ -267,8 +268,8 @@ done:
}
/* release generic resources */
- if (buffer)
- free(buffer);
+ HDfree(buffer);
+ HDfree(fname);
res->ret_code = ret_code;
}
@@ -521,7 +522,7 @@ do_write(results *res, file_descr *fd, parameters *parms, void *buffer)
} /* end if */
} /* end if */
- HDsprintf(dname, "Dataset_%ld", (unsigned long)parms->num_bytes);
+ HDsnprintf(dname, sizeof(dname), "Dataset_%ld", (unsigned long)parms->num_bytes);
h5ds_id =
H5Dcreate2(fd->h5fd, dname, ELMT_H5_TYPE, h5dset_space_id, H5P_DEFAULT, h5dcpl, H5P_DEFAULT);
@@ -850,7 +851,7 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer)
break;
case HDF5:
- HDsprintf(dname, "Dataset_%ld", (long)parms->num_bytes);
+ HDsnprintf(dname, sizeof(dname), "Dataset_%ld", (long)parms->num_bytes);
h5ds_id = H5Dopen2(fd->h5fd, dname, H5P_DEFAULT);
if (h5ds_id < 0) {
HDfprintf(stderr, "HDF5 Dataset open failed\n");
@@ -1125,7 +1126,6 @@ done:
* Purpose: Sets file driver.
* Return: SUCCESS or FAIL
* Programmer: Christian Chilan, April, 2008
- * Modifications:
*/
hid_t
@@ -1164,9 +1164,11 @@ set_vfd(parameters *param)
H5FD_mem_t memb_map[H5FD_MEM_NTYPES];
hid_t memb_fapl[H5FD_MEM_NTYPES];
const char *memb_name[H5FD_MEM_NTYPES];
- char sv[H5FD_MEM_NTYPES][1024];
haddr_t memb_addr[H5FD_MEM_NTYPES];
H5FD_mem_t mt;
+ struct {
+ char arr[H5FD_MEM_NTYPES][1024];
+ } *sv = NULL;
HDmemset(memb_map, 0, sizeof memb_map);
HDmemset(memb_fapl, 0, sizeof memb_fapl);
@@ -1174,16 +1176,22 @@ set_vfd(parameters *param)
HDmemset(memb_addr, 0, sizeof memb_addr);
HDassert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES);
+
+ if (NULL == (sv = HDcalloc(1, sizeof(*sv))))
+ return -1;
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) {
memb_fapl[mt] = H5P_DEFAULT;
- HDsprintf(sv[mt], "%%s-%c.h5", multi_letters[mt]);
- memb_name[mt] = sv[mt];
+ HDsnprintf(sv->arr[mt], 1024, "%%s-%c.h5", multi_letters[mt]);
+ memb_name[mt] = sv->arr[mt];
memb_addr[mt] = (haddr_t)MAX(mt - 1, 0) * (HADDR_MAX / 10);
}
if (H5Pset_fapl_multi(my_fapl, memb_map, memb_fapl, memb_name, memb_addr, FALSE) < 0) {
+ HDfree(sv);
return -1;
}
+
+ HDfree(sv);
}
else if (vfd == family) {
hsize_t fam_size = 1 * 1024 * 1024; /*100 MB*/
@@ -1262,14 +1270,18 @@ done:
* Purpose: Cleanup temporary file unless HDF5_NOCLEANUP is set.
* Return: void
* Programmer: Albert Cheng 2001/12/12
- * Modifications: Support for file drivers. Christian Chilan, April, 2008
*/
static void
do_cleanupfile(iotype iot, char *filename)
{
- char temp[4096 + sizeof("-?.h5")];
- int j;
- hid_t driver;
+ char * temp = NULL;
+ size_t temp_sz;
+ int j;
+ hid_t driver;
+
+ temp_sz = (4096 + sizeof("-?.h5")) * sizeof(char);
+ if (NULL == (temp = HDcalloc(1, temp_sz)))
+ goto done;
if (clean_file_g == -1)
clean_file_g = (HDgetenv(HDF5_NOCLEANUP) == NULL) ? 1 : 0;
@@ -1286,7 +1298,7 @@ do_cleanupfile(iotype iot, char *filename)
if (driver == H5FD_FAMILY) {
for (j = 0; /*void*/; j++) {
- HDsnprintf(temp, sizeof temp, filename, j);
+ HDsnprintf(temp, temp_sz, filename, j);
if (HDaccess(temp, F_OK) < 0)
break;
@@ -1305,10 +1317,10 @@ do_cleanupfile(iotype iot, char *filename)
}
else if (driver == H5FD_MULTI) {
H5FD_mem_t mt;
- assert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES);
+ HDassert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES);
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) {
- HDsnprintf(temp, sizeof temp, "%s-%c.h5", filename, multi_letters[mt]);
+ HDsnprintf(temp, temp_sz, "%s-%c.h5", filename, multi_letters[mt]);
HDremove(temp); /*don't care if it fails*/
}
}
@@ -1325,4 +1337,7 @@ do_cleanupfile(iotype iot, char *filename)
break;
}
}
+
+done:
+ HDfree(temp);
}
diff --git a/tools/src/h5perf/sio_perf.c b/tools/src/h5perf/sio_perf.c
index dc2e15e..5432d6c 100644
--- a/tools/src/h5perf/sio_perf.c
+++ b/tools/src/h5perf/sio_perf.c
@@ -674,25 +674,25 @@ recover_size_and_print(long long val, const char *end)
if (val >= ONE_MB && (val % ONE_MB) == 0) {
if (val >= ONE_GB && (val % ONE_GB) == 0)
HDfprintf(output,
- "%" H5_PRINTF_LL_WIDTH "d"
+ "%lld"
"GB%s",
val / ONE_GB, end);
else
HDfprintf(output,
- "%" H5_PRINTF_LL_WIDTH "d"
+ "%lld"
"MB%s",
val / ONE_MB, end);
}
else {
HDfprintf(output,
- "%" H5_PRINTF_LL_WIDTH "d"
+ "%lld"
"KB%s",
val / ONE_KB, end);
}
}
else {
HDfprintf(output,
- "%" H5_PRINTF_LL_WIDTH "d"
+ "%lld"
"%s",
val, end);
}
diff --git a/tools/src/h5repack/h5repack_copy.c b/tools/src/h5repack/h5repack_copy.c
index c38a431..25df5c7 100644
--- a/tools/src/h5repack/h5repack_copy.c
+++ b/tools/src/h5repack/h5repack_copy.c
@@ -1531,7 +1531,7 @@ print_dataset_info(hid_t dcpl_id, char *objname, double ratio, int pr, pack_opt_
{
unsigned level = cd_values[0];
- HDsprintf(temp, "(%d)", level);
+ HDsnprintf(temp, sizeof(temp), "(%d)", level);
HDstrcat(strfilter, temp);
}
#endif
@@ -1545,7 +1545,7 @@ print_dataset_info(hid_t dcpl_id, char *objname, double ratio, int pr, pack_opt_
unsigned options_mask = cd_values[0]; /* from dcpl, not filt*/
unsigned ppb = cd_values[1];
- HDsprintf(temp, "(%d,", ppb);
+ HDsnprintf(temp, sizeof(temp), "(%d,", ppb);
HDstrcat(strfilter, temp);
if (options_mask & H5_SZIP_EC_OPTION_MASK)
HDstrcpy(temp, "EC) ");
@@ -1588,7 +1588,7 @@ print_dataset_info(hid_t dcpl_id, char *objname, double ratio, int pr, pack_opt_
HDstrcpy(str, "dset ");
HDstrcat(str, strfilter);
- HDsprintf(temp, " (%.3f:1)", ratio);
+ HDsnprintf(temp, sizeof(temp), " (%.3f:1)", ratio);
HDstrcat(str, temp);
if (options->verbose == 2)
HDprintf(FORMAT_OBJ_TIME, str, read_time, write_time, objname);
diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c
index 4c88bd7..a805b3d 100644
--- a/tools/src/h5repack/h5repack_main.c
+++ b/tools/src/h5repack/h5repack_main.c
@@ -31,7 +31,7 @@ const char *outfile = NULL;
* Command-line options: The user can specify short or long-named
* parameters.
*/
-static const char *s_opts = "a:b:c:d:e:f:hi:j:k:l:m:no:q:s:t:u:v*z:EG:LM:P:S:T:VXWY:Z:1:2:3:4:5:6:7:8:9:0:";
+static const char *s_opts = "a:b:c:d:e:f:hi:j:k:l:m:no:q:s:t:u:v*z:E*G:LM:P:S:T:VXWY:Z:1:2:3:4:5:6:7:8:9:0:";
static struct h5_long_options l_opts[] = {{"alignment", require_arg, 'a'},
{"block", require_arg, 'b'},
{"compact", require_arg, 'c'},
@@ -52,7 +52,7 @@ static struct h5_long_options l_opts[] = {{"alignment", require_arg, 'a'},
{"ublock", require_arg, 'u'},
{"verbose", optional_arg, 'v'},
{"sort_order", require_arg, 'z'},
- {"enable-error-stack", no_arg, 'E'},
+ {"enable-error-stack", optional_arg, 'E'},
{"fs_pagesize", require_arg, 'G'},
{"latest", no_arg, 'L'},
{"metadata_block_size", require_arg, 'M'},
@@ -92,6 +92,11 @@ usage(const char *prog)
PRINTSTREAM(rawoutstream, "usage: %s [OPTIONS] file1 file2\n", prog);
PRINTVALSTREAM(rawoutstream, " file1 Input HDF5 File\n");
PRINTVALSTREAM(rawoutstream, " file2 Output HDF5 File\n");
+ PRINTVALSTREAM(rawoutstream, " ERROR\n");
+ PRINTVALSTREAM(rawoutstream,
+ " --enable-error-stack Prints messages from the HDF5 error stack as they occur.\n");
+ PRINTVALSTREAM(rawoutstream,
+ " Optional value 2 also prints file open errors.\n");
PRINTVALSTREAM(rawoutstream, " OPTIONS\n");
PRINTVALSTREAM(rawoutstream, " -h, --help Print a usage message and exit\n");
PRINTVALSTREAM(rawoutstream, " -v N, --verbose=N Verbose mode, print object information.\n");
@@ -99,9 +104,6 @@ usage(const char *prog)
PRINTVALSTREAM(rawoutstream, " -V, --version Print version number and exit\n");
PRINTVALSTREAM(rawoutstream, " -n, --native Use a native HDF5 type when repacking\n");
PRINTVALSTREAM(rawoutstream,
- " --enable-error-stack Prints messages from the HDF5 error stack as they\n");
- PRINTVALSTREAM(rawoutstream, " occur\n");
- PRINTVALSTREAM(rawoutstream,
" --src-vol-value Value (ID) of the VOL connector to use for opening the\n");
PRINTVALSTREAM(rawoutstream, " input HDF5 file specified\n");
PRINTVALSTREAM(rawoutstream,
@@ -771,7 +773,10 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
break;
case 'E':
- enable_error_stack = 1;
+ if (H5_optarg != NULL)
+ enable_error_stack = HDatoi(H5_optarg);
+ else
+ enable_error_stack = 1;
break;
case '1':
diff --git a/tools/src/h5stat/h5stat.c b/tools/src/h5stat/h5stat.c
index 1fbc03c..5dcd03e 100644
--- a/tools/src/h5stat/h5stat.c
+++ b/tools/src/h5stat/h5stat.c
@@ -169,7 +169,7 @@ struct handler_t {
char **obj;
};
-static const char *s_opts = "Aa:Ddm:EFfhGgl:sSTO:Vw:H:";
+static const char *s_opts = "Aa:Ddm:E*FfhGgl:sSTO:Vw:H:";
/* e.g. "filemetadata" has to precede "file"; "groupmetadata" has to precede "group" etc. */
static struct h5_long_options l_opts[] = {{"help", no_arg, 'h'},
{"filemetadata", no_arg, 'F'},
@@ -181,7 +181,7 @@ static struct h5_long_options l_opts[] = {{"help", no_arg, 'h'},
{"object", require_arg, 'O'},
{"version", no_arg, 'V'},
{"attribute", no_arg, 'A'},
- {"enable-error-stack", no_arg, 'E'},
+ {"enable-error-stack", optional_arg, 'E'},
{"numattrs", require_arg, 'a'},
{"freespace", no_arg, 's'},
{"summary", no_arg, 'S'},
@@ -211,6 +211,9 @@ usage(const char *prog)
HDfflush(stdout);
HDfprintf(stdout, "Usage: %s [OPTIONS] file\n", prog);
HDfprintf(stdout, "\n");
+ HDfprintf(stdout, " ERROR\n");
+ HDfprintf(stdout, " --enable-error-stack Prints messages from the HDF5 error stack as they occur\n");
+ HDfprintf(stdout, " Optional value 2 also prints file open errors\n");
HDfprintf(stdout, " OPTIONS\n");
HDfprintf(stdout, " -h, --help Print a usage message and exit\n");
HDfprintf(stdout, " -V, --version Print version number and exit\n");
@@ -235,7 +238,6 @@ usage(const char *prog)
HDfprintf(stdout, " than 0. The default threshold is 10.\n");
HDfprintf(stdout, " -s, --freespace Print free space information\n");
HDfprintf(stdout, " -S, --summary Print summary of file space information\n");
- HDfprintf(stdout, " --enable-error-stack Prints messages from the HDF5 error stack as they occur\n");
HDfprintf(stdout, " --s3-cred=<cred> Access file on S3, using provided credential\n");
HDfprintf(stdout, " <cred> :: (region,id,key)\n");
HDfprintf(stdout, " If <cred> == \"(,,)\", no authentication is used.\n");
@@ -852,7 +854,10 @@ parse_command_line(int argc, const char *const *argv, struct handler_t **hand_re
break;
case 'E':
- enable_error_stack = 1;
+ if (H5_optarg != NULL)
+ enable_error_stack = HDatoi(H5_optarg);
+ else
+ enable_error_stack = 1;
break;
case 'F':
@@ -1709,6 +1714,15 @@ main(int argc, char *argv[])
vfd_info.u.name = drivername;
vfd_info.fname = fname;
+#ifdef H5_HAVE_ROS3_VFD
+ if (!HDstrcmp(drivername, drivernames[ROS3_VFD_IDX]))
+ vfd_info.info = &ros3_fa;
+#endif
+#ifdef H5_HAVE_LIBHDFS
+ if (!HDstrcmp(drivername, drivernames[HDFS_VFD_IDX]))
+ vfd_info.info = &hdfs_fa;
+#endif
+
if ((fapl_id = h5tools_get_fapl(H5P_DEFAULT, NULL, &vfd_info)) < 0) {
error_msg("Unable to create FAPL for file access\n");
goto done;
@@ -1739,7 +1753,7 @@ main(int argc, char *argv[])
warn_msg("Unable to retrieve file size\n");
HDassert(iter.filesize != 0);
- /* Get storge info for file-level structures */
+ /* Get storage info for file-level structures */
if (H5Fget_info2(fid, &finfo) < 0)
warn_msg("Unable to retrieve file info\n");
else {
diff --git a/tools/src/misc/h5repart.c b/tools/src/misc/h5repart.c
index f4cef6a..078883d 100644
--- a/tools/src/misc/h5repart.c
+++ b/tools/src/misc/h5repart.c
@@ -242,7 +242,7 @@ main(int argc, char *argv[])
if (argno >= argc)
usage(prog_name);
src_gen_name = argv[argno++];
- HDsprintf(src_name, src_gen_name, src_membno);
+ HDsnprintf(src_name, NAMELEN, src_gen_name, src_membno);
src_is_family = strcmp(src_name, src_gen_name);
if ((src = HDopen(src_name, O_RDONLY)) < 0) {
@@ -264,7 +264,7 @@ main(int argc, char *argv[])
if (argno >= argc)
usage(prog_name);
dst_gen_name = argv[argno++];
- HDsprintf(dst_name, dst_gen_name, dst_membno);
+ HDsnprintf(dst_name, NAMELEN, dst_gen_name, dst_membno);
dst_is_family = HDstrcmp(dst_name, dst_gen_name);
if ((dst = HDopen(dst_name, O_RDWR | O_CREAT | O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0) {
@@ -356,7 +356,7 @@ main(int argc, char *argv[])
dst_offset = dst_offset + (off_t)n;
break;
}
- HDsprintf(src_name, src_gen_name, ++src_membno);
+ HDsnprintf(src_name, NAMELEN, src_gen_name, ++src_membno);
if ((src = HDopen(src_name, O_RDONLY)) < 0 && ENOENT == errno) {
dst_offset = dst_offset + (off_t)n;
break;
@@ -404,7 +404,7 @@ main(int argc, char *argv[])
}
}
HDclose(dst);
- HDsprintf(dst_name, dst_gen_name, ++dst_membno);
+ HDsnprintf(dst_name, NAMELEN, dst_gen_name, ++dst_membno);
if ((dst = HDopen(dst_name, O_RDWR | O_CREAT | O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0) {
HDperror(dst_name);
HDexit(EXIT_FAILURE);
diff --git a/tools/test/h5copy/h5copygentest.c b/tools/test/h5copy/h5copygentest.c
index c1f8349..e415c97 100644
--- a/tools/test/h5copy/h5copygentest.c
+++ b/tools/test/h5copy/h5copygentest.c
@@ -923,7 +923,7 @@ out:
/*-------------------------------------------------------------------------
* Function: Test_Extlink_Copy
*
- * Purpose: gerenate external link files
+ * Purpose: generate external link files
*
*------------------------------------------------------------------------*/
static void
diff --git a/tools/test/h5diff/testfiles/h5diff_10.txt b/tools/test/h5diff/testfiles/h5diff_10.txt
index 853aede..b1d607e 100644
--- a/tools/test/h5diff/testfiles/h5diff_10.txt
+++ b/tools/test/h5diff/testfiles/h5diff_10.txt
@@ -4,6 +4,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
[obj1] Name of an HDF5 object, in absolute path
[obj2] Name of an HDF5 object, in absolute path
+ ERROR
+ --enable-error-stack Prints messages from the HDF5 error stack as they occur.
+ Optional value 2 also prints file open errors.
OPTIONS
-h, --help
Print a usage message and exit.
@@ -22,8 +25,6 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
- --enable-error-stack
- Prints messages from the HDF5 error stack as they occur.
--vol-value-1 Value (ID) of the VOL connector to use for opening the
first HDF5 file specified
--vol-name-1 Name of the VOL connector to use for opening the first
diff --git a/tools/test/h5diff/testfiles/h5diff_600.txt b/tools/test/h5diff/testfiles/h5diff_600.txt
index 2893b78..5236964 100644
--- a/tools/test/h5diff/testfiles/h5diff_600.txt
+++ b/tools/test/h5diff/testfiles/h5diff_600.txt
@@ -4,6 +4,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
[obj1] Name of an HDF5 object, in absolute path
[obj2] Name of an HDF5 object, in absolute path
+ ERROR
+ --enable-error-stack Prints messages from the HDF5 error stack as they occur.
+ Optional value 2 also prints file open errors.
OPTIONS
-h, --help
Print a usage message and exit.
@@ -22,8 +25,6 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
- --enable-error-stack
- Prints messages from the HDF5 error stack as they occur.
--vol-value-1 Value (ID) of the VOL connector to use for opening the
first HDF5 file specified
--vol-name-1 Name of the VOL connector to use for opening the first
diff --git a/tools/test/h5diff/testfiles/h5diff_603.txt b/tools/test/h5diff/testfiles/h5diff_603.txt
index 4317282..e7bad17 100644
--- a/tools/test/h5diff/testfiles/h5diff_603.txt
+++ b/tools/test/h5diff/testfiles/h5diff_603.txt
@@ -5,6 +5,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
[obj1] Name of an HDF5 object, in absolute path
[obj2] Name of an HDF5 object, in absolute path
+ ERROR
+ --enable-error-stack Prints messages from the HDF5 error stack as they occur.
+ Optional value 2 also prints file open errors.
OPTIONS
-h, --help
Print a usage message and exit.
@@ -23,8 +26,6 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
- --enable-error-stack
- Prints messages from the HDF5 error stack as they occur.
--vol-value-1 Value (ID) of the VOL connector to use for opening the
first HDF5 file specified
--vol-name-1 Name of the VOL connector to use for opening the first
diff --git a/tools/test/h5diff/testfiles/h5diff_606.txt b/tools/test/h5diff/testfiles/h5diff_606.txt
index c32142f..410528d 100644
--- a/tools/test/h5diff/testfiles/h5diff_606.txt
+++ b/tools/test/h5diff/testfiles/h5diff_606.txt
@@ -5,6 +5,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
[obj1] Name of an HDF5 object, in absolute path
[obj2] Name of an HDF5 object, in absolute path
+ ERROR
+ --enable-error-stack Prints messages from the HDF5 error stack as they occur.
+ Optional value 2 also prints file open errors.
OPTIONS
-h, --help
Print a usage message and exit.
@@ -23,8 +26,6 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
- --enable-error-stack
- Prints messages from the HDF5 error stack as they occur.
--vol-value-1 Value (ID) of the VOL connector to use for opening the
first HDF5 file specified
--vol-name-1 Name of the VOL connector to use for opening the first
diff --git a/tools/test/h5diff/testfiles/h5diff_612.txt b/tools/test/h5diff/testfiles/h5diff_612.txt
index a080f29..ffc191e 100644
--- a/tools/test/h5diff/testfiles/h5diff_612.txt
+++ b/tools/test/h5diff/testfiles/h5diff_612.txt
@@ -5,6 +5,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
[obj1] Name of an HDF5 object, in absolute path
[obj2] Name of an HDF5 object, in absolute path
+ ERROR
+ --enable-error-stack Prints messages from the HDF5 error stack as they occur.
+ Optional value 2 also prints file open errors.
OPTIONS
-h, --help
Print a usage message and exit.
@@ -23,8 +26,6 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
- --enable-error-stack
- Prints messages from the HDF5 error stack as they occur.
--vol-value-1 Value (ID) of the VOL connector to use for opening the
first HDF5 file specified
--vol-name-1 Name of the VOL connector to use for opening the first
diff --git a/tools/test/h5diff/testfiles/h5diff_615.txt b/tools/test/h5diff/testfiles/h5diff_615.txt
index a9bd76c..2ff50e9 100644
--- a/tools/test/h5diff/testfiles/h5diff_615.txt
+++ b/tools/test/h5diff/testfiles/h5diff_615.txt
@@ -5,6 +5,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
[obj1] Name of an HDF5 object, in absolute path
[obj2] Name of an HDF5 object, in absolute path
+ ERROR
+ --enable-error-stack Prints messages from the HDF5 error stack as they occur.
+ Optional value 2 also prints file open errors.
OPTIONS
-h, --help
Print a usage message and exit.
@@ -23,8 +26,6 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
- --enable-error-stack
- Prints messages from the HDF5 error stack as they occur.
--vol-value-1 Value (ID) of the VOL connector to use for opening the
first HDF5 file specified
--vol-name-1 Name of the VOL connector to use for opening the first
diff --git a/tools/test/h5diff/testfiles/h5diff_621.txt b/tools/test/h5diff/testfiles/h5diff_621.txt
index cf1af15..7db4959 100644
--- a/tools/test/h5diff/testfiles/h5diff_621.txt
+++ b/tools/test/h5diff/testfiles/h5diff_621.txt
@@ -5,6 +5,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
[obj1] Name of an HDF5 object, in absolute path
[obj2] Name of an HDF5 object, in absolute path
+ ERROR
+ --enable-error-stack Prints messages from the HDF5 error stack as they occur.
+ Optional value 2 also prints file open errors.
OPTIONS
-h, --help
Print a usage message and exit.
@@ -23,8 +26,6 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
- --enable-error-stack
- Prints messages from the HDF5 error stack as they occur.
--vol-value-1 Value (ID) of the VOL connector to use for opening the
first HDF5 file specified
--vol-name-1 Name of the VOL connector to use for opening the first
diff --git a/tools/test/h5diff/testfiles/h5diff_622.txt b/tools/test/h5diff/testfiles/h5diff_622.txt
index 3b325de..db77f88 100644
--- a/tools/test/h5diff/testfiles/h5diff_622.txt
+++ b/tools/test/h5diff/testfiles/h5diff_622.txt
@@ -5,6 +5,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
[obj1] Name of an HDF5 object, in absolute path
[obj2] Name of an HDF5 object, in absolute path
+ ERROR
+ --enable-error-stack Prints messages from the HDF5 error stack as they occur.
+ Optional value 2 also prints file open errors.
OPTIONS
-h, --help
Print a usage message and exit.
@@ -23,8 +26,6 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
- --enable-error-stack
- Prints messages from the HDF5 error stack as they occur.
--vol-value-1 Value (ID) of the VOL connector to use for opening the
first HDF5 file specified
--vol-name-1 Name of the VOL connector to use for opening the first
diff --git a/tools/test/h5diff/testfiles/h5diff_623.txt b/tools/test/h5diff/testfiles/h5diff_623.txt
index be34fb4..11739be 100644
--- a/tools/test/h5diff/testfiles/h5diff_623.txt
+++ b/tools/test/h5diff/testfiles/h5diff_623.txt
@@ -5,6 +5,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
[obj1] Name of an HDF5 object, in absolute path
[obj2] Name of an HDF5 object, in absolute path
+ ERROR
+ --enable-error-stack Prints messages from the HDF5 error stack as they occur.
+ Optional value 2 also prints file open errors.
OPTIONS
-h, --help
Print a usage message and exit.
@@ -23,8 +26,6 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
- --enable-error-stack
- Prints messages from the HDF5 error stack as they occur.
--vol-value-1 Value (ID) of the VOL connector to use for opening the
first HDF5 file specified
--vol-name-1 Name of the VOL connector to use for opening the first
diff --git a/tools/test/h5diff/testfiles/h5diff_624.txt b/tools/test/h5diff/testfiles/h5diff_624.txt
index ebb76af..6af9fe3 100644
--- a/tools/test/h5diff/testfiles/h5diff_624.txt
+++ b/tools/test/h5diff/testfiles/h5diff_624.txt
@@ -5,6 +5,9 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
[obj1] Name of an HDF5 object, in absolute path
[obj2] Name of an HDF5 object, in absolute path
+ ERROR
+ --enable-error-stack Prints messages from the HDF5 error stack as they occur.
+ Optional value 2 also prints file open errors.
OPTIONS
-h, --help
Print a usage message and exit.
@@ -23,8 +26,6 @@ usage: h5diff [OPTIONS] file1 file2 [obj1[ obj2]]
3 : All level 2 information plus file names.
-q, --quiet
Quiet mode. Do not produce output.
- --enable-error-stack
- Prints messages from the HDF5 error stack as they occur.
--vol-value-1 Value (ID) of the VOL connector to use for opening the
first HDF5 file specified
--vol-name-1 Name of the VOL connector to use for opening the first
diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c
index 339b563..949aa43 100644
--- a/tools/test/h5dump/h5dumpgentest.c
+++ b/tools/test/h5dump/h5dumpgentest.c
@@ -582,7 +582,7 @@ gent_attribute(void)
dims[0] = 24;
space = H5Screate_simple(1, dims, NULL);
attr = H5Acreate2(root, "/attr1", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT);
- HDsprintf(buf, "attribute of root group");
+ HDsnprintf(buf, sizeof(buf), "attribute of root group");
H5Awrite(attr, H5T_NATIVE_SCHAR, buf);
H5Sclose(space);
H5Aclose(attr);
@@ -1382,7 +1382,7 @@ gent_all(void)
dims[0] = 10;
space = H5Screate_simple(1, dims, NULL);
attr = H5Acreate2(group, "attr1", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT);
- HDsprintf(buf, "abcdefghi");
+ HDsnprintf(buf, sizeof(buf), "abcdefghi");
H5Awrite(attr, H5T_NATIVE_SCHAR, buf);
H5Sclose(space);
H5Aclose(attr);
@@ -1418,7 +1418,7 @@ gent_all(void)
dims[0] = 27;
space = H5Screate_simple(1, dims, NULL);
attr = H5Acreate2(dataset, "attr1", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT);
- HDsprintf(buf, "1st attribute of dset1.1.1");
+ HDsnprintf(buf, sizeof(buf), "1st attribute of dset1.1.1");
H5Awrite(attr, H5T_NATIVE_SCHAR, buf);
H5Sclose(space);
H5Aclose(attr);
@@ -1426,7 +1426,7 @@ gent_all(void)
dims[0] = 27;
space = H5Screate_simple(1, dims, NULL);
attr = H5Acreate2(dataset, "attr2", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT);
- HDsprintf(buf, "2nd attribute of dset1.1.1");
+ HDsnprintf(buf, sizeof(buf), "2nd attribute of dset1.1.1");
H5Awrite(attr, H5T_NATIVE_SCHAR, buf);
H5Sclose(space);
H5Aclose(attr);
@@ -1625,7 +1625,7 @@ gent_many(void)
dims[0] = 10;
space2 = H5Screate_simple(1, dims, NULL);
attr = H5Acreate2(dataset, "attr1", H5T_STD_I8BE, space2, H5P_DEFAULT, H5P_DEFAULT);
- HDsprintf(buf, "abcdefghi");
+ HDsnprintf(buf, sizeof(buf), "abcdefghi");
H5Awrite(attr, H5T_NATIVE_CHAR, buf);
H5Sclose(space2);
H5Aclose(attr);
@@ -1963,9 +1963,9 @@ gent_str2(void)
dims[0] = 3;
space2 = H5Screate_simple(1, dims, NULL);
attr = H5Acreate2(dataset, "attr1", fxdlenstr2, space2, H5P_DEFAULT, H5P_DEFAULT);
- HDsprintf(&(buf2[0 * LENSTR2]), "0123456789");
- HDsprintf(&(buf2[1 * LENSTR2]), "abcdefghij");
- HDsprintf(&(buf2[2 * LENSTR2]), "ABCDEFGHIJ");
+ HDsnprintf(&(buf2[0 * LENSTR2]), LENSTR2, "0123456789");
+ HDsnprintf(&(buf2[1 * LENSTR2]), LENSTR2, "abcdefghij");
+ HDsnprintf(&(buf2[2 * LENSTR2]), LENSTR2, "ABCDEFGHIJ");
H5Awrite(attr, fxdlenstr2, buf2);
H5Sclose(space2);
H5Tclose(fxdlenstr2);
@@ -1977,7 +1977,7 @@ gent_str2(void)
for (i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
- HDsprintf(buf, "This is row %1d of type H5T_STR_NULLTERM of", i);
+ HDsnprintf(buf, sizeof(buf), "This is row %1d of type H5T_STR_NULLTERM of", i);
H5Tset_size(memtype, HDstrlen(buf) + 1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
@@ -1990,7 +1990,7 @@ gent_str2(void)
for (i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
- HDsprintf(buf, "This is row %1d of type H5T_STR_NULLTERM of string array", i);
+ HDsnprintf(buf, sizeof(buf), "This is row %1d of type H5T_STR_NULLTERM of string array", i);
H5Tset_size(memtype, HDstrlen(buf) + 1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
@@ -2009,7 +2009,7 @@ gent_str2(void)
for (i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
- HDsprintf(buf, "This is row %1d of type H5T_STR_NULLPAD of", i);
+ HDsnprintf(buf, sizeof(buf), "This is row %1d of type H5T_STR_NULLPAD of", i);
H5Tset_size(memtype, HDstrlen(buf) + 1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
@@ -2022,7 +2022,7 @@ gent_str2(void)
for (i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
- HDsprintf(buf, "This is row %1d of type H5T_STR_NULLPAD of string array", i);
+ HDsnprintf(buf, sizeof(buf), "This is row %1d of type H5T_STR_NULLPAD of string array", i);
H5Tset_size(memtype, HDstrlen(buf) + 1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
@@ -2041,7 +2041,7 @@ gent_str2(void)
for (i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
- HDsprintf(buf, "This is row %1d of type H5T_STR_SPACEPAD of", i);
+ HDsnprintf(buf, sizeof(buf), "This is row %1d of type H5T_STR_SPACEPAD of", i);
H5Tset_size(memtype, HDstrlen(buf) + 1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
@@ -2054,7 +2054,7 @@ gent_str2(void)
for (i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
- HDsprintf(buf, "This is row %1d of type H5T_STR_SPACEPAD of string array", i);
+ HDsnprintf(buf, sizeof(buf), "This is row %1d of type H5T_STR_SPACEPAD of string array", i);
H5Tset_size(memtype, HDstrlen(buf) + 1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
@@ -3923,7 +3923,7 @@ gent_large_objname(void)
group = H5Gcreate2(fid, "this_is_a_large_group_name", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
for (i = 0; i < 50; ++i) {
- HDsprintf(grp_name, "this_is_a_large_group_name%d", i);
+ HDsnprintf(grp_name, sizeof(grp_name), "this_is_a_large_group_name%d", i);
group2 = H5Gcreate2(group, grp_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group2);
}
diff --git a/tools/test/h5jam/h5jamgentest.c b/tools/test/h5jam/h5jamgentest.c
index 5632cc0..16604b3 100644
--- a/tools/test/h5jam/h5jamgentest.c
+++ b/tools/test/h5jam/h5jamgentest.c
@@ -152,7 +152,7 @@ gent_ub(const char *filename, size_t ub_size, size_t ub_fill)
goto error;
if ((attr = H5Acreate2(group, "attr1", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
- if (HDsprintf(buf, "abcdefghi") < 0)
+ if (HDsnprintf(buf, sizeof(buf), "abcdefghi") < 0)
goto error;
if (H5Awrite(attr, H5T_NATIVE_SCHAR, buf) < 0)
goto error;
@@ -206,7 +206,7 @@ gent_ub(const char *filename, size_t ub_size, size_t ub_fill)
goto error;
if ((attr = H5Acreate2(dataset, "attr1", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
- if (HDsprintf(buf, "1st attribute of dset1.1.1") < 0)
+ if (HDsnprintf(buf, sizeof(buf), "1st attribute of dset1.1.1") < 0)
goto error;
if (H5Awrite(attr, H5T_NATIVE_SCHAR, buf) < 0)
goto error;
@@ -220,7 +220,7 @@ gent_ub(const char *filename, size_t ub_size, size_t ub_fill)
goto error;
if ((attr = H5Acreate2(dataset, "attr2", H5T_STD_I8BE, space, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
- if (HDsprintf(buf, "2nd attribute of dset1.1.1") < 0)
+ if (HDsnprintf(buf, sizeof(buf), "2nd attribute of dset1.1.1") < 0)
goto error;
if (H5Awrite(attr, H5T_NATIVE_SCHAR, buf) < 0)
goto error;
diff --git a/tools/test/h5repack/h5repacktst.c b/tools/test/h5repack/h5repacktst.c
index 8b114e4..028939a 100644
--- a/tools/test/h5repack/h5repacktst.c
+++ b/tools/test/h5repack/h5repacktst.c
@@ -3157,7 +3157,7 @@ make_early(void)
goto out;
if ((tid = H5Tcopy(H5T_NATIVE_DOUBLE)) < 0)
goto out;
- HDsprintf(name, "%d", i);
+ HDsnprintf(name, sizeof(name), "%d", i);
if ((H5Tcommit2(fid, name, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
if (H5Tclose(tid) < 0)
@@ -3181,7 +3181,7 @@ make_early(void)
for (i = 0; i < iter; i++) {
if ((tid = H5Tcopy(H5T_NATIVE_DOUBLE)) < 0)
goto out;
- HDsprintf(name, "%d", i);
+ HDsnprintf(name, sizeof(name), "%d", i);
if ((H5Tcommit2(fid, name, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto out;
if (H5Tclose(tid) < 0)
@@ -3240,7 +3240,7 @@ make_layout(hid_t loc_id)
*-------------------------------------------------------------------------
*/
for (i = 0; i < 4; i++) {
- HDsprintf(name, "dset%d", i + 1);
+ HDsnprintf(name, sizeof(name), "dset%d", i + 1);
if (write_dset(loc_id, RANK, dims, name, H5T_NATIVE_INT, buf) < 0)
goto error;
}
diff --git a/tools/test/h5repack/testfiles/h5repack-help.txt b/tools/test/h5repack/testfiles/h5repack-help.txt
index c1caf52..bff70af 100644
--- a/tools/test/h5repack/testfiles/h5repack-help.txt
+++ b/tools/test/h5repack/testfiles/h5repack-help.txt
@@ -1,14 +1,15 @@
usage: h5repack [OPTIONS] file1 file2
file1 Input HDF5 File
file2 Output HDF5 File
+ ERROR
+ --enable-error-stack Prints messages from the HDF5 error stack as they occur.
+ Optional value 2 also prints file open errors.
OPTIONS
-h, --help Print a usage message and exit
-v N, --verbose=N Verbose mode, print object information.
N - is an integer greater than 1, 2 displays read/write timing
-V, --version Print version number and exit
-n, --native Use a native HDF5 type when repacking
- --enable-error-stack Prints messages from the HDF5 error stack as they
- occur
--src-vol-value Value (ID) of the VOL connector to use for opening the
input HDF5 file specified
--src-vol-name Name of the VOL connector to use for opening the input
diff --git a/tools/test/h5stat/h5stat_gentest.c b/tools/test/h5stat/h5stat_gentest.c
index c775d6a..4d21a43 100644
--- a/tools/test/h5stat/h5stat_gentest.c
+++ b/tools/test/h5stat/h5stat_gentest.c
@@ -88,7 +88,7 @@ gen_newgrat_file(const char *fname)
/* Create NUM_GRPS groups in the root group */
for (i = 1; i <= NUM_GRPS; i++) {
- HDsprintf(name, "%s%d", GROUP_NAME, i);
+ HDsnprintf(name, sizeof(name), "%s%d", GROUP_NAME, i);
if ((gid = H5Gcreate2(fid, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
if (H5Gclose(gid) < 0)
@@ -109,7 +109,7 @@ gen_newgrat_file(const char *fname)
/* Create NUM_ATTRS for the dataset */
for (i = 1; i <= NUM_ATTRS; i++) {
- HDsprintf(attrname, "%s%d", ATTR_NAME, i);
+ HDsnprintf(attrname, sizeof(attrname), "%s%d", ATTR_NAME, i);
if ((attr_id = H5Acreate2(did, attrname, tid, sid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
if (H5Aclose(attr_id) < 0)
@@ -211,7 +211,7 @@ gen_threshold_file(const char *fname)
/* Create 11 attributes for the dataset */
for (i = 1; i <= (THRES_NUM + 1); i++) {
- HDsprintf(name, "%s%d", THRES_ATTR_NAME, i);
+ HDsnprintf(name, sizeof(name), "%s%d", THRES_ATTR_NAME, i);
if ((attr_id = H5Acreate2(did, name, H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
if (H5Aclose(attr_id) < 0)
@@ -240,7 +240,7 @@ gen_threshold_file(const char *fname)
/* Create 10 attributes for the 2-D dataset */
for (i = 1; i <= THRES_NUM; i++) {
- HDsprintf(name, "%s%d", THRES_ATTR_NAME, i);
+ HDsnprintf(name, sizeof(name), "%s%d", THRES_ATTR_NAME, i);
if ((attr_id = H5Acreate2(did, name, H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT)) < 0)
goto error;
if (H5Aclose(attr_id) < 0)
@@ -264,7 +264,7 @@ gen_threshold_file(const char *fname)
/* Create 10 1-D datasets with non-zero dimension size for the group */
for (i = 1; i <= THRES_NUM; i++) {
/* set up dataset name */
- HDsprintf(name, "%s%d", THRES_DSET_NAME, i);
+ HDsnprintf(name, sizeof(name), "%s%d", THRES_DSET_NAME, i);
/* Create the dataset */
if ((did = H5Dcreate2(gid, name, H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -286,7 +286,7 @@ gen_threshold_file(const char *fname)
/* Create 25 attributes for the group */
for (i = 1; i <= THRES_NUM_25; i++) {
/* Set up attribute name */
- HDsprintf(name, "%s%d", THRES_ATTR_GRP_NAME, i);
+ HDsnprintf(name, sizeof(name), "%s%d", THRES_ATTR_GRP_NAME, i);
/* Create the attribute */
if ((attr_id = H5Acreate2(gid, name, H5T_NATIVE_INT, sid2, H5P_DEFAULT, H5P_DEFAULT)) < 0)
@@ -308,7 +308,7 @@ gen_threshold_file(const char *fname)
/* Create 9 1-D datasets with non-zero dimension size for the group */
for (i = 1; i < THRES_NUM; i++) {
/* set up dataset name */
- HDsprintf(name, "%s%d", THRES_DSET_NAME, i);
+ HDsnprintf(name, sizeof(name), "%s%d", THRES_DSET_NAME, i);
/* Create the dataset */
if ((did = H5Dcreate2(gid, name, H5T_NATIVE_UCHAR, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
diff --git a/tools/test/h5stat/testfiles/h5stat_help1.ddl b/tools/test/h5stat/testfiles/h5stat_help1.ddl
index 2ba7772..1f65f0d 100644
--- a/tools/test/h5stat/testfiles/h5stat_help1.ddl
+++ b/tools/test/h5stat/testfiles/h5stat_help1.ddl
@@ -1,5 +1,8 @@
Usage: h5stat [OPTIONS] file
+ ERROR
+ --enable-error-stack Prints messages from the HDF5 error stack as they occur
+ Optional value 2 also prints file open errors
OPTIONS
-h, --help Print a usage message and exit
-V, --version Print version number and exit
@@ -22,7 +25,6 @@ Usage: h5stat [OPTIONS] file
than 0. The default threshold is 10.
-s, --freespace Print free space information
-S, --summary Print summary of file space information
- --enable-error-stack Prints messages from the HDF5 error stack as they occur
--s3-cred=<cred> Access file on S3, using provided credential
<cred> :: (region,id,key)
If <cred> == "(,,)", no authentication is used.
diff --git a/tools/test/h5stat/testfiles/h5stat_help2.ddl b/tools/test/h5stat/testfiles/h5stat_help2.ddl
index 2ba7772..1f65f0d 100644
--- a/tools/test/h5stat/testfiles/h5stat_help2.ddl
+++ b/tools/test/h5stat/testfiles/h5stat_help2.ddl
@@ -1,5 +1,8 @@
Usage: h5stat [OPTIONS] file
+ ERROR
+ --enable-error-stack Prints messages from the HDF5 error stack as they occur
+ Optional value 2 also prints file open errors
OPTIONS
-h, --help Print a usage message and exit
-V, --version Print version number and exit
@@ -22,7 +25,6 @@ Usage: h5stat [OPTIONS] file
than 0. The default threshold is 10.
-s, --freespace Print free space information
-S, --summary Print summary of file space information
- --enable-error-stack Prints messages from the HDF5 error stack as they occur
--s3-cred=<cred> Access file on S3, using provided credential
<cred> :: (region,id,key)
If <cred> == "(,,)", no authentication is used.
diff --git a/tools/test/h5stat/testfiles/h5stat_nofile.ddl b/tools/test/h5stat/testfiles/h5stat_nofile.ddl
index 2ba7772..1f65f0d 100644
--- a/tools/test/h5stat/testfiles/h5stat_nofile.ddl
+++ b/tools/test/h5stat/testfiles/h5stat_nofile.ddl
@@ -1,5 +1,8 @@
Usage: h5stat [OPTIONS] file
+ ERROR
+ --enable-error-stack Prints messages from the HDF5 error stack as they occur
+ Optional value 2 also prints file open errors
OPTIONS
-h, --help Print a usage message and exit
-V, --version Print version number and exit
@@ -22,7 +25,6 @@ Usage: h5stat [OPTIONS] file
than 0. The default threshold is 10.
-s, --freespace Print free space information
-S, --summary Print summary of file space information
- --enable-error-stack Prints messages from the HDF5 error stack as they occur
--s3-cred=<cred> Access file on S3, using provided credential
<cred> :: (region,id,key)
If <cred> == "(,,)", no authentication is used.
diff --git a/tools/test/misc/h5perf_gentest.c b/tools/test/misc/h5perf_gentest.c
index 248fd92..7589144 100644
--- a/tools/test/misc/h5perf_gentest.c
+++ b/tools/test/misc/h5perf_gentest.c
@@ -104,7 +104,7 @@ main(int argc, char *argv[])
}
if (strlen(fname) <= 0)
- HDsprintf(fname, FNAME);
+ HDsnprintf(fname, sizeof(fname), FNAME);
create_perf_test_file(fname, ngrps, ndsets, nattrs, (hsize_t)nrows, (hsize_t)dim0, (hsize_t)chunk, vlen,
z, l);
@@ -324,7 +324,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
fid = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
add_attrs(fid, 0);
- HDsprintf(name, "a cmp ds of %d rows", nrows);
+ HDsnprintf(name, sizeof(name), "a cmp ds of %d rows", nrows);
did = H5Dcreate(fid, name, cmp_tid, sid_large, H5P_DEFAULT, dcpl, H5P_DEFAULT);
H5Dwrite(did, cmp_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_comp_large);
add_attrs(did, 0);
@@ -344,7 +344,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
add_attrs(gid1, 0);
for (i = 0; i < ngrps; i++) {
/* create sub groups */
- HDsprintf(name, "g%02d", i);
+ HDsnprintf(name, sizeof(name), "g%02d", i);
gid2 = H5Gcreate(gid1, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (i < 10)
add_attrs(gid2, 0);
@@ -357,14 +357,14 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
add_attrs(gid1, 0);
for (j = 0; j < ndsets; j += 12) {
/* 1 add a null dataset */
- HDsprintf(name, "%05d null dataset", j);
+ HDsnprintf(name, sizeof(name), "%05d null dataset", j);
did = H5Dcreate(gid1, name, H5T_STD_I32LE, sid_null, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (!j)
add_attrs(did, j);
H5Dclose(did);
/* 2 add scalar int point */
- HDsprintf(name, "%05d scalar int point", j);
+ HDsnprintf(name, sizeof(name), "%05d scalar int point", j);
did = H5Dcreate(gid1, name, H5T_NATIVE_INT, sid_scalar, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &j);
if (!j)
@@ -372,7 +372,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
H5Dclose(did);
/* 3 scalar vlen string */
- HDsprintf(name, "%05d scalar vlen string", j);
+ HDsnprintf(name, sizeof(name), "%05d scalar vlen string", j);
did = H5Dcreate(gid1, name, tid_vlen_s, sid_scalar, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Dwrite(did, tid_vlen_s, H5S_ALL, H5S_ALL, H5P_DEFAULT, &buf_vlen_s[0]);
if (!j)
@@ -380,7 +380,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
H5Dclose(did);
/* 4 add fixed-length float array */
- HDsprintf(name, "%05d fixed-length float array", j);
+ HDsnprintf(name, sizeof(name), "%05d fixed-length float array", j);
did = H5Dcreate(gid1, name, tid_array_f, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
H5Dwrite(did, tid_array_f, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_float_a);
if (!j)
@@ -388,7 +388,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
H5Dclose(did);
/* 5 add fixed-length strings */
- HDsprintf(name, "%05d fixed-length strings", j);
+ HDsnprintf(name, sizeof(name), "%05d fixed-length strings", j);
did = H5Dcreate(gid1, name, tid_str, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
H5Dwrite(did, tid_str, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_str);
if (!j)
@@ -396,7 +396,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
H5Dclose(did);
/* 6 add compound data */
- HDsprintf(name, "%05d compound data", j);
+ HDsnprintf(name, sizeof(name), "%05d compound data", j);
did = H5Dcreate(gid1, name, cmp_tid, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
H5Dwrite(did, cmp_tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_comp);
if (!j)
@@ -404,7 +404,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
H5Dclose(did);
/* 7 add 2D double */
- HDsprintf(name, "%05d 2D double", j);
+ HDsnprintf(name, sizeof(name), "%05d 2D double", j);
strcpy(tmp_name1, name);
did = H5Dcreate(gid1, name, H5T_NATIVE_DOUBLE, sid_2d, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Dwrite(did, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_double2d[0]);
@@ -413,7 +413,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
H5Dclose(did);
/* 8 add 1D int array */
- HDsprintf(name, "%05d 1D int array", j);
+ HDsnprintf(name, sizeof(name), "%05d 1D int array", j);
did = H5Dcreate(gid1, name, H5T_NATIVE_INT, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_int);
if (!j)
@@ -421,7 +421,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
H5Dclose(did);
/* 9 add vlen int array */
- HDsprintf(name, "%05d vlen int array", j);
+ HDsnprintf(name, sizeof(name), "%05d vlen int array", j);
strcpy(tmp_name2, name);
did = H5Dcreate(gid1, name, tid_vlen_i, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
H5Dwrite(did, tid_vlen_i, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_vlen_i);
@@ -430,7 +430,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
H5Dclose(did);
/* 10 add vlen strings */
- HDsprintf(name, "%05d vlen strings", j);
+ HDsnprintf(name, sizeof(name), "%05d vlen strings", j);
strcpy(tmp_name3, name);
did = H5Dcreate(gid1, name, tid_vlen_s, sid_1d, H5P_DEFAULT, dcpl, H5P_DEFAULT);
H5Dwrite(did, tid_vlen_s, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_vlen_s);
@@ -441,7 +441,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
/* 11 add object refs */
H5Rcreate(&buf_ref[0], gid1, ".", H5R_OBJECT, (hid_t)-1);
H5Rcreate(&buf_ref[1], gid1, tmp_name3, H5R_OBJECT, (hid_t)-1);
- HDsprintf(name, "%05d obj refs", j);
+ HDsnprintf(name, sizeof(name), "%05d obj refs", j);
did = H5Dcreate(gid1, name, H5T_STD_REF_OBJ, sid_2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Dwrite(did, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_ref);
if (!j)
@@ -456,7 +456,7 @@ create_perf_test_file(const char *fname, int ngrps, int ndsets, int nattrs, hsiz
H5Sselect_hyperslab(sid_1d, H5S_SELECT_SET, &start, &stride, &count, NULL);
H5Rcreate(&buf_reg_ref[1], gid1, tmp_name2, H5R_DATASET_REGION, sid_1d);
H5Sselect_none(sid_1d);
- HDsprintf(name, "%05d region refs", j);
+ HDsnprintf(name, sizeof(name), "%05d region refs", j);
did = H5Dcreate(gid1, name, H5T_STD_REF_DSETREG, sid_2, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Dwrite(did, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf_reg_ref);
if (!j)
@@ -572,11 +572,11 @@ add_attrs(hid_t oid, int idx)
/* 1 scalar point */
sid = H5Screate(H5S_SCALAR);
- HDsprintf(name, "%05d scalar int", idx);
+ HDsnprintf(name, sizeof(name), "%05d scalar int", idx);
nattrs += add_attr(oid, name, H5T_NATIVE_UINT, sid, &i);
- HDsprintf(name, "%05d scalar ulong", idx);
+ HDsnprintf(name, sizeof(name), "%05d scalar ulong", idx);
nattrs += add_attr(oid, name, H5T_NATIVE_INT64, sid, &l);
- HDsprintf(name, "%05d scalar str", idx);
+ HDsnprintf(name, sizeof(name), "%05d scalar str", idx);
tid = H5Tcopy(H5T_C_S1);
H5Tset_size(tid, H5T_VARIABLE);
nattrs += add_attr(oid, name, tid, sid, &s[2]);
@@ -586,24 +586,24 @@ add_attrs(hid_t oid, int idx)
/* 4 single point */
sid = H5Screate_simple(1, dims1, NULL);
H5Rcreate(&ref, oid, ".", H5R_OBJECT, (hid_t)-1);
- HDsprintf(name, "%05d single float", idx);
+ HDsnprintf(name, sizeof(name), "%05d single float", idx);
nattrs += add_attr(oid, name, H5T_NATIVE_FLOAT, sid, &f);
- HDsprintf(name, "%05d single double", idx);
+ HDsnprintf(name, sizeof(name), "%05d single double", idx);
nattrs += add_attr(oid, name, H5T_NATIVE_DOUBLE, sid, &d);
- HDsprintf(name, "%05d single obj_ref", idx);
+ HDsnprintf(name, sizeof(name), "%05d single obj_ref", idx);
nattrs += add_attr(oid, name, H5T_STD_REF_OBJ, sid, &ref);
H5Sclose(sid);
/* 7 fixed length 1D array */
sid = H5Screate_simple(1, dims1, NULL);
tid = H5Tarray_create(H5T_NATIVE_FLOAT, 1, dims2);
- HDsprintf(name, "%05d array float", idx);
+ HDsnprintf(name, sizeof(name), "%05d array float", idx);
nattrs += add_attr(oid, name, tid, sid, &f_array[0]);
H5Tclose(tid);
tid = H5Tcopy(H5T_C_S1);
H5Tset_size(tid, strlen(s[0]) + 1);
tid1 = H5Tarray_create(tid, 1, dims2);
- HDsprintf(name, "%05d array str", idx);
+ HDsnprintf(name, sizeof(name), "%05d array str", idx);
nattrs += add_attr(oid, name, tid1, sid, s);
H5Tclose(tid1);
H5Tclose(tid);
@@ -612,7 +612,7 @@ add_attrs(hid_t oid, int idx)
/* 9 fixed length 2D int arrays */
sid = H5Screate_simple(1, dims2, NULL);
tid = H5Tarray_create(H5T_NATIVE_INT, 2, dims3);
- HDsprintf(name, "%05d array int 2D", idx);
+ HDsnprintf(name, sizeof(name), "%05d array int 2D", idx);
nattrs += add_attr(oid, name, tid, sid, int3d[0][0]);
H5Tclose(tid);
H5Sclose(sid);
@@ -621,12 +621,12 @@ add_attrs(hid_t oid, int idx)
sid = H5Screate_simple(1, dims2, NULL);
tid = H5Tcopy(H5T_C_S1);
H5Tset_size(tid, H5T_VARIABLE);
- HDsprintf(name, "%05d vlen strings", idx);
+ HDsnprintf(name, sizeof(name), "%05d vlen strings", idx);
nattrs += add_attr(oid, name, tid, sid, s_vlen);
H5Tclose(tid);
tid = H5Tvlen_create(H5T_NATIVE_INT);
;
- HDsprintf(name, "%05d vlen int array", idx);
+ HDsnprintf(name, sizeof(name), "%05d vlen int array", idx);
nattrs += add_attr(oid, name, tid, sid, i_vlen);
H5Tclose(tid);
H5Sclose(sid);
@@ -640,7 +640,7 @@ add_attrs(hid_t oid, int idx)
offset += sizeof(H5T_NATIVE_INT);
H5Tinsert(tid, "City", offset, tid1);
offset += sizeof(char *);
- HDsprintf(name, "%05d compound data", idx);
+ HDsnprintf(name, sizeof(name), "%05d compound data", idx);
nattrs += add_attr(oid, name, tid, sid, cmp_data);
H5Tclose(tid1);
H5Tclose(tid);
diff --git a/tools/test/perform/iopipe.c b/tools/test/perform/iopipe.c
index 2aa9e25..37f07a1 100644
--- a/tools/test/perform/iopipe.c
+++ b/tools/test/perform/iopipe.c
@@ -71,7 +71,7 @@ print_stats(const char *prefix,
((double)(r_start->ru_stime.tv_sec) + (double)(r_start->ru_stime.tv_usec) / 1000000.0);
#endif
e_time = t_stop - t_start;
- H5_bandwidth(bw, (double)nbytes, e_time);
+ H5_bandwidth(bw, sizeof(bw), (double)nbytes, e_time);
#ifdef H5_HAVE_GETRUSAGE
HDprintf(HEADING "%1.2fuser %1.2fsystem %1.2felapsed %s\n", prefix, u_time, s_time, e_time, bw);
diff --git a/tools/testfiles/h5dump-help.txt b/tools/testfiles/h5dump-help.txt
index 53c666b..e20df73 100644
--- a/tools/testfiles/h5dump-help.txt
+++ b/tools/testfiles/h5dump-help.txt
@@ -2,6 +2,10 @@ usage: h5dump [OPTIONS] files
OPTIONS
-h, --help Print a usage message and exit
-V, --version Print version number and exit
+--------------- Error Options ---------------
+ --enable-error-stack Prints messages from the HDF5 error stack as they occur.
+ Optional value 2 also prints file open errors.
+ Default setting disables any error reporting.
--------------- File Options ---------------
-n, --contents Print a list of the file contents and exit
Optional value 1 also prints attributes.
@@ -66,8 +70,6 @@ usage: h5dump [OPTIONS] files
-m T, --format=T Set the floating point output format
-q Q, --sort_by=Q Sort groups and attributes by index Q
-z Z, --sort_order=Z Sort groups and attributes by order Z
- --enable-error-stack Prints messages from the HDF5 error stack as they occur.
- Optional value 2 also prints file open errors.
--no-compact-subset Disable compact form of subsetting and allow the use
of "[" in dataset names.
-w N, --width=N Set the number of columns of output. A value of 0 (zero)
diff --git a/tools/testfiles/pbits/tnofilename-with-packed-bits.ddl b/tools/testfiles/pbits/tnofilename-with-packed-bits.ddl
index 53c666b..e20df73 100644
--- a/tools/testfiles/pbits/tnofilename-with-packed-bits.ddl
+++ b/tools/testfiles/pbits/tnofilename-with-packed-bits.ddl
@@ -2,6 +2,10 @@ usage: h5dump [OPTIONS] files
OPTIONS
-h, --help Print a usage message and exit
-V, --version Print version number and exit
+--------------- Error Options ---------------
+ --enable-error-stack Prints messages from the HDF5 error stack as they occur.
+ Optional value 2 also prints file open errors.
+ Default setting disables any error reporting.
--------------- File Options ---------------
-n, --contents Print a list of the file contents and exit
Optional value 1 also prints attributes.
@@ -66,8 +70,6 @@ usage: h5dump [OPTIONS] files
-m T, --format=T Set the floating point output format
-q Q, --sort_by=Q Sort groups and attributes by index Q
-z Z, --sort_order=Z Sort groups and attributes by order Z
- --enable-error-stack Prints messages from the HDF5 error stack as they occur.
- Optional value 2 also prints file open errors.
--no-compact-subset Disable compact form of subsetting and allow the use
of "[" in dataset names.
-w N, --width=N Set the number of columns of output. A value of 0 (zero)
diff --git a/tools/testfiles/pbits/tpbitsIncomplete.ddl b/tools/testfiles/pbits/tpbitsIncomplete.ddl
index 53c666b..e20df73 100644
--- a/tools/testfiles/pbits/tpbitsIncomplete.ddl
+++ b/tools/testfiles/pbits/tpbitsIncomplete.ddl
@@ -2,6 +2,10 @@ usage: h5dump [OPTIONS] files
OPTIONS
-h, --help Print a usage message and exit
-V, --version Print version number and exit
+--------------- Error Options ---------------
+ --enable-error-stack Prints messages from the HDF5 error stack as they occur.
+ Optional value 2 also prints file open errors.
+ Default setting disables any error reporting.
--------------- File Options ---------------
-n, --contents Print a list of the file contents and exit
Optional value 1 also prints attributes.
@@ -66,8 +70,6 @@ usage: h5dump [OPTIONS] files
-m T, --format=T Set the floating point output format
-q Q, --sort_by=Q Sort groups and attributes by index Q
-z Z, --sort_order=Z Sort groups and attributes by order Z
- --enable-error-stack Prints messages from the HDF5 error stack as they occur.
- Optional value 2 also prints file open errors.
--no-compact-subset Disable compact form of subsetting and allow the use
of "[" in dataset names.
-w N, --width=N Set the number of columns of output. A value of 0 (zero)
diff --git a/tools/testfiles/pbits/tpbitsLengthExceeded.ddl b/tools/testfiles/pbits/tpbitsLengthExceeded.ddl
index 53c666b..e20df73 100644
--- a/tools/testfiles/pbits/tpbitsLengthExceeded.ddl
+++ b/tools/testfiles/pbits/tpbitsLengthExceeded.ddl
@@ -2,6 +2,10 @@ usage: h5dump [OPTIONS] files
OPTIONS
-h, --help Print a usage message and exit
-V, --version Print version number and exit
+--------------- Error Options ---------------
+ --enable-error-stack Prints messages from the HDF5 error stack as they occur.
+ Optional value 2 also prints file open errors.
+ Default setting disables any error reporting.
--------------- File Options ---------------
-n, --contents Print a list of the file contents and exit
Optional value 1 also prints attributes.
@@ -66,8 +70,6 @@ usage: h5dump [OPTIONS] files
-m T, --format=T Set the floating point output format
-q Q, --sort_by=Q Sort groups and attributes by index Q
-z Z, --sort_order=Z Sort groups and attributes by order Z
- --enable-error-stack Prints messages from the HDF5 error stack as they occur.
- Optional value 2 also prints file open errors.
--no-compact-subset Disable compact form of subsetting and allow the use
of "[" in dataset names.
-w N, --width=N Set the number of columns of output. A value of 0 (zero)
diff --git a/tools/testfiles/pbits/tpbitsLengthPositive.ddl b/tools/testfiles/pbits/tpbitsLengthPositive.ddl
index 53c666b..e20df73 100644
--- a/tools/testfiles/pbits/tpbitsLengthPositive.ddl
+++ b/tools/testfiles/pbits/tpbitsLengthPositive.ddl
@@ -2,6 +2,10 @@ usage: h5dump [OPTIONS] files
OPTIONS
-h, --help Print a usage message and exit
-V, --version Print version number and exit
+--------------- Error Options ---------------
+ --enable-error-stack Prints messages from the HDF5 error stack as they occur.
+ Optional value 2 also prints file open errors.
+ Default setting disables any error reporting.
--------------- File Options ---------------
-n, --contents Print a list of the file contents and exit
Optional value 1 also prints attributes.
@@ -66,8 +70,6 @@ usage: h5dump [OPTIONS] files
-m T, --format=T Set the floating point output format
-q Q, --sort_by=Q Sort groups and attributes by index Q
-z Z, --sort_order=Z Sort groups and attributes by order Z
- --enable-error-stack Prints messages from the HDF5 error stack as they occur.
- Optional value 2 also prints file open errors.
--no-compact-subset Disable compact form of subsetting and allow the use
of "[" in dataset names.
-w N, --width=N Set the number of columns of output. A value of 0 (zero)
diff --git a/tools/testfiles/pbits/tpbitsMaxExceeded.ddl b/tools/testfiles/pbits/tpbitsMaxExceeded.ddl
index 53c666b..e20df73 100644
--- a/tools/testfiles/pbits/tpbitsMaxExceeded.ddl
+++ b/tools/testfiles/pbits/tpbitsMaxExceeded.ddl
@@ -2,6 +2,10 @@ usage: h5dump [OPTIONS] files
OPTIONS
-h, --help Print a usage message and exit
-V, --version Print version number and exit
+--------------- Error Options ---------------
+ --enable-error-stack Prints messages from the HDF5 error stack as they occur.
+ Optional value 2 also prints file open errors.
+ Default setting disables any error reporting.
--------------- File Options ---------------
-n, --contents Print a list of the file contents and exit
Optional value 1 also prints attributes.
@@ -66,8 +70,6 @@ usage: h5dump [OPTIONS] files
-m T, --format=T Set the floating point output format
-q Q, --sort_by=Q Sort groups and attributes by index Q
-z Z, --sort_order=Z Sort groups and attributes by order Z
- --enable-error-stack Prints messages from the HDF5 error stack as they occur.
- Optional value 2 also prints file open errors.
--no-compact-subset Disable compact form of subsetting and allow the use
of "[" in dataset names.
-w N, --width=N Set the number of columns of output. A value of 0 (zero)
diff --git a/tools/testfiles/pbits/tpbitsOffsetExceeded.ddl b/tools/testfiles/pbits/tpbitsOffsetExceeded.ddl
index 53c666b..e20df73 100644
--- a/tools/testfiles/pbits/tpbitsOffsetExceeded.ddl
+++ b/tools/testfiles/pbits/tpbitsOffsetExceeded.ddl
@@ -2,6 +2,10 @@ usage: h5dump [OPTIONS] files
OPTIONS
-h, --help Print a usage message and exit
-V, --version Print version number and exit
+--------------- Error Options ---------------
+ --enable-error-stack Prints messages from the HDF5 error stack as they occur.
+ Optional value 2 also prints file open errors.
+ Default setting disables any error reporting.
--------------- File Options ---------------
-n, --contents Print a list of the file contents and exit
Optional value 1 also prints attributes.
@@ -66,8 +70,6 @@ usage: h5dump [OPTIONS] files
-m T, --format=T Set the floating point output format
-q Q, --sort_by=Q Sort groups and attributes by index Q
-z Z, --sort_order=Z Sort groups and attributes by order Z
- --enable-error-stack Prints messages from the HDF5 error stack as they occur.
- Optional value 2 also prints file open errors.
--no-compact-subset Disable compact form of subsetting and allow the use
of "[" in dataset names.
-w N, --width=N Set the number of columns of output. A value of 0 (zero)
diff --git a/tools/testfiles/pbits/tpbitsOffsetNegative.ddl b/tools/testfiles/pbits/tpbitsOffsetNegative.ddl
index 53c666b..e20df73 100644
--- a/tools/testfiles/pbits/tpbitsOffsetNegative.ddl
+++ b/tools/testfiles/pbits/tpbitsOffsetNegative.ddl
@@ -2,6 +2,10 @@ usage: h5dump [OPTIONS] files
OPTIONS
-h, --help Print a usage message and exit
-V, --version Print version number and exit
+--------------- Error Options ---------------
+ --enable-error-stack Prints messages from the HDF5 error stack as they occur.
+ Optional value 2 also prints file open errors.
+ Default setting disables any error reporting.
--------------- File Options ---------------
-n, --contents Print a list of the file contents and exit
Optional value 1 also prints attributes.
@@ -66,8 +70,6 @@ usage: h5dump [OPTIONS] files
-m T, --format=T Set the floating point output format
-q Q, --sort_by=Q Sort groups and attributes by index Q
-z Z, --sort_order=Z Sort groups and attributes by order Z
- --enable-error-stack Prints messages from the HDF5 error stack as they occur.
- Optional value 2 also prints file open errors.
--no-compact-subset Disable compact form of subsetting and allow the use
of "[" in dataset names.
-w N, --width=N Set the number of columns of output. A value of 0 (zero)