summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/lib/h5tools.c24
-rw-r--r--tools/lib/h5tools.h6
-rw-r--r--tools/src/h5repack/h5repack_main.c20
-rw-r--r--tools/test/h5repack/testfiles/h5repack-help.txt8
4 files changed, 29 insertions, 29 deletions
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index 72f0dac..2f641d0 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -531,9 +531,9 @@ h5tools_set_vfd_fapl(hid_t fapl, h5tools_fapl_info_t *fapl_info)
}
else if (!HDstrcmp(fapl_info->u.name, drivernames[ROS3_VFD_IDX])) {
#ifdef H5_HAVE_ROS3_VFD
- if (!fapl_info->info)
+ if (!fapl_info->info_string)
H5TOOLS_GOTO_ERROR(FAIL, "Read-only S3 VFD info is invalid");
- if (H5Pset_fapl_ros3(fapl, (H5FD_ros3_fapl_t *)fapl_info->info) < 0)
+ if (H5Pset_fapl_ros3(fapl, (H5FD_ros3_fapl_t *)fapl_info->info_string) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_ros3() failed");
#else
H5TOOLS_GOTO_ERROR(FAIL, "Read-only S3 VFD is not enabled");
@@ -541,9 +541,9 @@ h5tools_set_vfd_fapl(hid_t fapl, h5tools_fapl_info_t *fapl_info)
}
else if (!HDstrcmp(fapl_info->u.name, drivernames[HDFS_VFD_IDX])) {
#ifdef H5_HAVE_LIBHDFS
- if (!fapl_info->info)
+ if (!fapl_info->info_string)
H5TOOLS_GOTO_ERROR(FAIL, "HDFS VFD info is invalid");
- if (H5Pset_fapl_hdfs(fapl, (H5FD_hdfs_fapl_t *)fapl_info->info) < 0)
+ if (H5Pset_fapl_hdfs(fapl, (H5FD_hdfs_fapl_t *)fapl_info->info_string) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_hdfs() failed");
#else
H5TOOLS_GOTO_ERROR(FAIL, "The HDFS VFD is not enabled");
@@ -555,7 +555,7 @@ h5tools_set_vfd_fapl(hid_t fapl, h5tools_fapl_info_t *fapl_info)
break;
case VOL_BY_NAME:
- case VOL_BY_ID:
+ case VOL_BY_VALUE:
default:
H5TOOLS_GOTO_ERROR(FAIL, "invalid VFD retrieval type");
}
@@ -612,24 +612,24 @@ h5tools_set_vol_fapl(hid_t fapl_id, h5tools_fapl_info_t *fapl_info)
break;
- case VOL_BY_ID:
+ case VOL_BY_VALUE:
/* Retrieve VOL connector by ID */
- if ((connector_is_registered = H5VLis_connector_registered_by_value((H5VL_class_value_t) fapl_info->u.id)) < 0)
+ if ((connector_is_registered = H5VLis_connector_registered_by_value(fapl_info->u.value)) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "can't check if VOL connector is registered");
if (connector_is_registered) {
- if ((connector_id = H5VLget_connector_id_by_value((H5VL_class_value_t) fapl_info->u.id)) < 0)
+ if ((connector_id = H5VLget_connector_id_by_value(fapl_info->u.value)) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "can't get VOL connector ID");
}
else {
/* Check for VOL connectors that ship with the library */
- if (fapl_info->u.id == H5VL_NATIVE_VALUE) {
+ if (fapl_info->u.value == H5VL_NATIVE_VALUE) {
connector_id = H5VL_NATIVE;
}
- else if (fapl_info->u.id == H5VL_PASSTHRU_VALUE) {
+ else if (fapl_info->u.value == H5VL_PASSTHRU_VALUE) {
connector_id = H5VL_PASSTHRU;
}
else {
- if ((connector_id = H5VLregister_connector_by_value((H5VL_class_value_t) fapl_info->u.id, H5P_DEFAULT)) < 0)
+ if ((connector_id = H5VLregister_connector_by_value(fapl_info->u.value, H5P_DEFAULT)) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "can't register VOL connector");
}
}
@@ -698,7 +698,7 @@ h5tools_get_fapl(hid_t prev_fapl_id, h5tools_fapl_info_t *fapl_info)
if (h5tools_set_vfd_fapl(new_fapl_id, fapl_info) < 0)
H5TOOLS_GOTO_ERROR(H5I_INVALID_HID, "failed to set VFD on FAPL");
}
- else if (VOL_BY_NAME == fapl_info->type || VOL_BY_ID == fapl_info->type) {
+ else if (VOL_BY_NAME == fapl_info->type || VOL_BY_VALUE == fapl_info->type) {
if (h5tools_set_vol_fapl(new_fapl_id, fapl_info) < 0)
H5TOOLS_GOTO_ERROR(H5I_INVALID_HID, "failed to set VOL on FAPL");
}
diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h
index fd09a14..b931dc8 100644
--- a/tools/lib/h5tools.h
+++ b/tools/lib/h5tools.h
@@ -542,7 +542,7 @@ typedef struct h5tools_context_t {
typedef enum {
VFD_BY_NAME,
VOL_BY_NAME,
- VOL_BY_ID
+ VOL_BY_VALUE
} h5tools_fapl_info_type_t;
typedef struct h5tools_fapl_info_t {
@@ -553,8 +553,8 @@ typedef struct h5tools_fapl_info_t {
/* Field specifying either the driver's/connector's name or ID */
union {
- const char *name;
- long id;
+ const char *name; /* VOL and VFD */
+ H5VL_class_value_t value; /* VOL only */
} u;
} h5tools_fapl_info_t;
diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c
index 5997449..03da8d9 100644
--- a/tools/src/h5repack/h5repack_main.c
+++ b/tools/src/h5repack/h5repack_main.c
@@ -62,10 +62,10 @@ static struct long_options l_opts[] = {
{ "sort_by", require_arg, 'q' },
{ "sort_order", require_arg, 'z' },
{ "enable-error-stack", no_arg, 'E' },
- { "src-vol-id", require_arg, '1' },
+ { "src-vol-value", require_arg, '1' },
{ "src-vol-name", require_arg, '2' },
{ "src-vol-info", require_arg, '3' },
- { "dst-vol-id", require_arg, '4' },
+ { "dst-vol-value", require_arg, '4' },
{ "dst-vol-name", require_arg, '5' },
{ "dst-vol-info", require_arg, '6' },
{ NULL, 0, '\0' }
@@ -92,14 +92,14 @@ static void usage(const char *prog) {
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-id ID of the VOL connector to use for opening the input\n");
- PRINTVALSTREAM(rawoutstream, " HDF5 file specified\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, " --src-vol-name Name of the VOL connector to use for opening the input\n");
PRINTVALSTREAM(rawoutstream, " HDF5 file specified\n");
PRINTVALSTREAM(rawoutstream, " --src-vol-info VOL-specific info to pass to the VOL connector used for\n");
PRINTVALSTREAM(rawoutstream, " opening the input HDF5 file specified\n");
- PRINTVALSTREAM(rawoutstream, " --dst-vol-id ID of the VOL connector to use for opening the output\n");
- PRINTVALSTREAM(rawoutstream, " HDF5 file specified\n");
+ PRINTVALSTREAM(rawoutstream, " --dst-vol-value Value (ID) of the VOL connector to use for opening the\n");
+ PRINTVALSTREAM(rawoutstream, " output HDF5 file specified\n");
PRINTVALSTREAM(rawoutstream, " --dst-vol-name Name of the VOL connector to use for opening the output\n");
PRINTVALSTREAM(rawoutstream, " HDF5 file specified\n");
PRINTVALSTREAM(rawoutstream, " --dst-vol-info VOL-specific info to pass to the VOL connector used for\n");
@@ -682,8 +682,8 @@ int parse_command_line(int argc, const char **argv, pack_opt_t* options)
break;
case '1':
- in_vol_info.type = VOL_BY_ID;
- in_vol_info.u.id = HDatol(opt_arg);
+ in_vol_info.type = VOL_BY_VALUE;
+ in_vol_info.u.value = (H5VL_class_value_t)HDatoi(opt_arg);
custom_in_fapl = TRUE;
break;
@@ -698,8 +698,8 @@ int parse_command_line(int argc, const char **argv, pack_opt_t* options)
break;
case '4':
- out_vol_info.type = VOL_BY_ID;
- out_vol_info.u.id = HDatol(opt_arg);
+ out_vol_info.type = VOL_BY_VALUE;
+ out_vol_info.u.value = (H5VL_class_value_t)HDatoi(opt_arg);
custom_out_fapl = TRUE;
break;
diff --git a/tools/test/h5repack/testfiles/h5repack-help.txt b/tools/test/h5repack/testfiles/h5repack-help.txt
index fe02584..00fae24 100644
--- a/tools/test/h5repack/testfiles/h5repack-help.txt
+++ b/tools/test/h5repack/testfiles/h5repack-help.txt
@@ -8,14 +8,14 @@ usage: h5repack [OPTIONS] file1 file2
-n, --native Use a native HDF5 type when repacking
--enable-error-stack Prints messages from the HDF5 error stack as they
occur
- --src-vol-id ID of the VOL connector to use for opening the input
- HDF5 file specified
+ --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
HDF5 file specified
--src-vol-info VOL-specific info to pass to the VOL connector used for
opening the input HDF5 file specified
- --dst-vol-id ID of the VOL connector to use for opening the output
- HDF5 file specified
+ --dst-vol-value Value (ID) of the VOL connector to use for opening the
+ output HDF5 file specified
--dst-vol-name Name of the VOL connector to use for opening the output
HDF5 file specified
--dst-vol-info VOL-specific info to pass to the VOL connector used for