diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2020-04-14 11:31:01 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2020-04-14 11:31:01 (GMT) |
commit | 28d2596f6551198ea45b35098a037a556b824505 (patch) | |
tree | 88fba8a6b8319f14be46aa8fea00b3fed90df5dc /tools | |
parent | e9ad3bad4e8f1331ba28855be283fbd023da1ff0 (diff) | |
download | hdf5-28d2596f6551198ea45b35098a037a556b824505.zip hdf5-28d2596f6551198ea45b35098a037a556b824505.tar.gz hdf5-28d2596f6551198ea45b35098a037a556b824505.tar.bz2 |
Changed identifiers and command-line options from "id" to "value" in tools
code to be in agreement with H5VL API terminology.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lib/h5tools.c | 24 | ||||
-rw-r--r-- | tools/lib/h5tools.h | 6 | ||||
-rw-r--r-- | tools/src/h5repack/h5repack_main.c | 16 | ||||
-rw-r--r-- | tools/test/h5repack/testfiles/h5repack-help.txt | 8 |
4 files changed, 27 insertions, 27 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..b5a92fb 100644 --- a/tools/src/h5repack/h5repack_main.c +++ b/tools/src/h5repack/h5repack_main.c @@ -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 |