summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/lib/h5tools.c110
-rw-r--r--tools/lib/h5tools.h18
-rw-r--r--tools/libtest/h5tools_test_utils.c10
-rw-r--r--tools/src/h5dump/h5dump.c14
-rw-r--r--tools/src/h5ls/h5ls.c14
-rw-r--r--tools/src/h5repack/h5repack_main.c32
-rw-r--r--tools/src/h5stat/h5stat.c14
7 files changed, 107 insertions, 105 deletions
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index 6f95457..a975f4c 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -446,20 +446,20 @@ h5tools_set_error_file(const char *fname, int is_bin)
*-------------------------------------------------------------------------
*/
static herr_t
-h5tools_set_vfd_fapl(hid_t fapl, h5tools_get_fapl_info_t *get_info)
+h5tools_set_vfd_fapl(hid_t fapl, h5tools_fapl_info_t *fapl_info)
{
herr_t ret_value = SUCCEED;
- switch (get_info->get_type) {
+ switch (fapl_info->type) {
/* Currently, only retrieving a VFD by name is supported */
- case GET_VFD_BY_NAME:
+ case VFD_BY_NAME:
/* Determine which driver the user wants to open the file with */
- if (!HDstrcmp(get_info->u.name, drivernames[SEC2_VFD_IDX])) {
+ if (!HDstrcmp(fapl_info->u.name, drivernames[SEC2_VFD_IDX])) {
/* SEC2 Driver */
if (H5Pset_fapl_sec2(fapl) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_sec2 failed");
}
- else if (!HDstrcmp(get_info->u.name, drivernames[DIRECT_VFD_IDX])) {
+ else if (!HDstrcmp(fapl_info->u.name, drivernames[DIRECT_VFD_IDX])) {
#ifdef H5_HAVE_DIRECT
/* Direct Driver */
if (H5Pset_fapl_direct(fapl, 1024, 4096, 8 * 4096) < 0)
@@ -468,31 +468,31 @@ h5tools_set_vfd_fapl(hid_t fapl, h5tools_get_fapl_info_t *get_info)
H5TOOLS_GOTO_ERROR(FAIL, "Direct VFD is not enabled");
#endif
}
- else if (!HDstrcmp(get_info->u.name, drivernames[LOG_VFD_IDX])) {
+ else if (!HDstrcmp(fapl_info->u.name, drivernames[LOG_VFD_IDX])) {
unsigned long long log_flags = H5FD_LOG_LOC_IO | H5FD_LOG_ALLOC;
/* Log Driver */
if (H5Pset_fapl_log(fapl, NULL, log_flags, (size_t) 0) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_sec2 failed");
}
- else if (!HDstrcmp(get_info->u.name, drivernames[WINDOWS_VFD_IDX])) {
+ else if (!HDstrcmp(fapl_info->u.name, drivernames[WINDOWS_VFD_IDX])) {
#ifdef H5_HAVE_WINDOWS
#else
H5TOOLS_GOTO_ERROR(FAIL, "Windows VFD is not enabled");
#endif
}
- else if (!HDstrcmp(get_info->u.name, drivernames[STDIO_VFD_IDX])) {
+ else if (!HDstrcmp(fapl_info->u.name, drivernames[STDIO_VFD_IDX])) {
/* Stdio Driver */
if (H5Pset_fapl_stdio(fapl) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_stdio failed");
}
- else if (!HDstrcmp(get_info->u.name, drivernames[CORE_VFD_IDX])) {
+ else if (!HDstrcmp(fapl_info->u.name, drivernames[CORE_VFD_IDX])) {
/* Core Driver */
if (H5Pset_fapl_core(fapl, (size_t) H5_MB, TRUE) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_stdio failed");
}
- else if (!HDstrcmp(get_info->u.name, drivernames[FAMILY_VFD_IDX])) {
+ else if (!HDstrcmp(fapl_info->u.name, drivernames[FAMILY_VFD_IDX])) {
/* FAMILY Driver */
/* Set member size to be 0 to indicate the current first member size
@@ -501,17 +501,17 @@ h5tools_set_vfd_fapl(hid_t fapl, h5tools_get_fapl_info_t *get_info)
if (H5Pset_fapl_family(fapl, (hsize_t) 0, H5P_DEFAULT) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_family failed");
}
- else if (!HDstrcmp(get_info->u.name, drivernames[SPLIT_VFD_IDX])) {
+ else if (!HDstrcmp(fapl_info->u.name, drivernames[SPLIT_VFD_IDX])) {
/* SPLIT Driver */
if (H5Pset_fapl_split(fapl, "-m.h5", H5P_DEFAULT, "-r.h5", H5P_DEFAULT) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_split failed");
}
- else if (!HDstrcmp(get_info->u.name, drivernames[MULTI_VFD_IDX])) {
+ else if (!HDstrcmp(fapl_info->u.name, drivernames[MULTI_VFD_IDX])) {
/* MULTI Driver */
if (H5Pset_fapl_multi(fapl, NULL, NULL, NULL, NULL, TRUE) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_multi failed");
}
- else if (!HDstrcmp(get_info->u.name, drivernames[MPIO_VFD_IDX])) {
+ else if (!HDstrcmp(fapl_info->u.name, drivernames[MPIO_VFD_IDX])) {
#ifdef H5_HAVE_PARALLEL
int mpi_initialized, mpi_finalized;
@@ -529,21 +529,21 @@ h5tools_set_vfd_fapl(hid_t fapl, h5tools_get_fapl_info_t *get_info)
H5TOOLS_GOTO_ERROR(FAIL, "MPI-I/O VFD is not enabled");
#endif /* H5_HAVE_PARALLEL */
}
- else if (!HDstrcmp(get_info->u.name, drivernames[ROS3_VFD_IDX])) {
+ else if (!HDstrcmp(fapl_info->u.name, drivernames[ROS3_VFD_IDX])) {
#ifdef H5_HAVE_ROS3_VFD
- if (!get_info->info)
+ if (!fapl_info->info)
H5TOOLS_GOTO_ERROR(FAIL, "Read-only S3 VFD info is invalid");
- if (H5Pset_fapl_ros3(fapl, (H5FD_ros3_fapl_t *)get_info->info) < 0)
+ if (H5Pset_fapl_ros3(fapl, (H5FD_ros3_fapl_t *)fapl_info->info) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_ros3() failed");
#else
H5TOOLS_GOTO_ERROR(FAIL, "Read-only S3 VFD is not enabled");
#endif
}
- else if (!HDstrcmp(get_info->u.name, drivernames[HDFS_VFD_IDX])) {
+ else if (!HDstrcmp(fapl_info->u.name, drivernames[HDFS_VFD_IDX])) {
#ifdef H5_HAVE_LIBHDFS
- if (!get_info->info)
+ if (!fapl_info->info)
H5TOOLS_GOTO_ERROR(FAIL, "HDFS VFD info is invalid");
- if (H5Pset_fapl_hdfs(fapl, (H5FD_hdfs_fapl_t *)get_info->info) < 0)
+ if (H5Pset_fapl_hdfs(fapl, (H5FD_hdfs_fapl_t *)fapl_info->info) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_hdfs() failed");
#else
H5TOOLS_GOTO_ERROR(FAIL, "The HDFS VFD is not enabled");
@@ -554,8 +554,8 @@ h5tools_set_vfd_fapl(hid_t fapl, h5tools_get_fapl_info_t *get_info)
break;
- case GET_VOL_BY_NAME:
- case GET_VOL_BY_ID:
+ case VOL_BY_NAME:
+ case VOL_BY_ID:
default:
H5TOOLS_GOTO_ERROR(FAIL, "invalid VFD retrieval type");
}
@@ -575,67 +575,67 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-h5tools_set_vol_fapl(hid_t fapl, h5tools_get_fapl_info_t *get_info)
+h5tools_set_vol_fapl(hid_t fapl, h5tools_fapl_info_t *fapl_info)
{
htri_t connector_is_registered;
hid_t connector_id = H5I_INVALID_HID;
herr_t ret_value = SUCCEED;
- switch (get_info->get_type) {
- case GET_VOL_BY_NAME:
+ switch (fapl_info->type) {
+ case VOL_BY_NAME:
/* Retrieve VOL connector by name */
- if ((connector_is_registered = H5VLis_connector_registered_by_name(get_info->u.name)) < 0)
+ if ((connector_is_registered = H5VLis_connector_registered_by_name(fapl_info->u.name)) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "can't check if VOL connector is registered");
if (connector_is_registered) {
- if ((connector_id = H5VLget_connector_id_by_name(get_info->u.name)) < 0)
+ if ((connector_id = H5VLget_connector_id_by_name(fapl_info->u.name)) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "can't get VOL connector ID");
}
else {
/* Check for VOL connectors that ship with the library */
- if (!HDstrcmp(get_info->u.name, H5VL_NATIVE_NAME)) {
+ if (!HDstrcmp(fapl_info->u.name, H5VL_NATIVE_NAME)) {
connector_id = H5VL_NATIVE;
}
- else if (!HDstrcmp(get_info->u.name, H5VL_PASSTHRU_NAME)) {
+ else if (!HDstrcmp(fapl_info->u.name, H5VL_PASSTHRU_NAME)) {
connector_id = H5VL_PASSTHRU;
}
else {
- if ((connector_id = H5VLregister_connector_by_name(get_info->u.name, H5P_DEFAULT)) < 0)
+ if ((connector_id = H5VLregister_connector_by_name(fapl_info->u.name, H5P_DEFAULT)) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "can't register VOL connector");
}
}
break;
- case GET_VOL_BY_ID:
+ case VOL_BY_ID:
/* Retrieve VOL connector by ID */
- if ((connector_is_registered = H5VLis_connector_registered_by_value((H5VL_class_value_t) get_info->u.id)) < 0)
+ if ((connector_is_registered = H5VLis_connector_registered_by_value((H5VL_class_value_t) fapl_info->u.id)) < 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) get_info->u.id)) < 0)
+ if ((connector_id = H5VLget_connector_id_by_value((H5VL_class_value_t) fapl_info->u.id)) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "can't get VOL connector ID");
}
else {
/* Check for VOL connectors that ship with the library */
- if (get_info->u.id == H5VL_NATIVE_VALUE) {
+ if (fapl_info->u.id == H5VL_NATIVE_VALUE) {
connector_id = H5VL_NATIVE;
}
- else if (get_info->u.id == H5VL_PASSTHRU_VALUE) {
+ else if (fapl_info->u.id == H5VL_PASSTHRU_VALUE) {
connector_id = H5VL_PASSTHRU;
}
else {
- if ((connector_id = H5VLregister_connector_by_value((H5VL_class_value_t) get_info->u.id, H5P_DEFAULT)) < 0)
+ if ((connector_id = H5VLregister_connector_by_value((H5VL_class_value_t) fapl_info->u.id, H5P_DEFAULT)) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "can't register VOL connector");
}
}
break;
- case GET_VFD_BY_NAME:
+ case VFD_BY_NAME:
default:
H5TOOLS_GOTO_ERROR(FAIL, "invalid VOL retrieval type");
}
- if (H5Pset_vol(fapl, connector_id, get_info->info) < 0)
+ if (H5Pset_vol(fapl, connector_id, fapl_info->info) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "can't set VOL connector on FAPL");
done:
@@ -658,14 +658,14 @@ done:
*-------------------------------------------------------------------------
*/
hid_t
-h5tools_get_fapl(hid_t fapl, h5tools_get_fapl_info_t *get_info)
+h5tools_get_fapl(hid_t fapl, h5tools_fapl_info_t *fapl_info)
{
hid_t new_fapl = H5I_INVALID_HID;
hid_t ret_value = H5I_INVALID_HID;
if (fapl < 0)
H5TOOLS_GOTO_ERROR(FAIL, "invalid FAPL");
- if (!get_info)
+ if (!fapl_info)
H5TOOLS_GOTO_ERROR(FAIL, "invalid FAPL retrieval info");
/* Make a copy of the FAPL if necessary, or create a FAPL if
@@ -679,12 +679,12 @@ h5tools_get_fapl(hid_t fapl, h5tools_get_fapl_info_t *get_info)
H5TOOLS_GOTO_ERROR(H5I_INVALID_HID, "H5Pcopy failed");
}
- if (GET_VFD_BY_NAME == get_info->get_type) {
- if (h5tools_set_vfd_fapl(new_fapl, get_info) < 0)
+ if (VFD_BY_NAME == fapl_info->type) {
+ if (h5tools_set_vfd_fapl(new_fapl, fapl_info) < 0)
H5TOOLS_GOTO_ERROR(H5I_INVALID_HID, "failed to set VFD on FAPL");
}
- else if (GET_VOL_BY_NAME == get_info->get_type || GET_VOL_BY_ID == get_info->get_type) {
- if (h5tools_set_vol_fapl(new_fapl, get_info) < 0)
+ else if (VOL_BY_NAME == fapl_info->type || VOL_BY_ID == fapl_info->type) {
+ if (h5tools_set_vol_fapl(new_fapl, fapl_info) < 0)
H5TOOLS_GOTO_ERROR(H5I_INVALID_HID, "failed to set VOL on FAPL");
}
else
@@ -885,14 +885,14 @@ h5tools_fopen(const char *fname, unsigned flags, hid_t fapl, hbool_t use_specifi
* connector being looked at, also try using each of the available VFL drivers.
*/
for (volnum = 0; volnum < NUM_VOLS; volnum++) {
- h5tools_get_fapl_info_t get_vol_info;
+ h5tools_fapl_info_t vol_info;
- get_vol_info.get_type = GET_VOL_BY_NAME;
- get_vol_info.info = NULL;
- get_vol_info.u.name = volnames[volnum];
+ vol_info.type = VOL_BY_NAME;
+ vol_info.info = NULL;
+ vol_info.u.name = volnames[volnum];
/* Get a FAPL for the current VOL connector */
- if ((tmp_vol_fapl = h5tools_get_fapl(fapl, &get_vol_info)) < 0)
+ if ((tmp_vol_fapl = h5tools_get_fapl(fapl, &vol_info)) < 0)
continue;
/* TODO: For now, we have no way of determining if an arbitrary
@@ -904,18 +904,20 @@ h5tools_fopen(const char *fname, unsigned flags, hid_t fapl, hbool_t use_specifi
* VFL drivers as well.
*/
for (drivernum = 0; drivernum < NUM_DRIVERS; drivernum++) {
- h5tools_get_fapl_info_t get_vfd_info;
+ h5tools_fapl_info_t vfd_info;
- /* Skip the log VFD as it prints out to standard out */
+ /* Skip the log VFD as it prints out to standard out
+ * and is fundamentally SEC2 anyway.
+ */
if (drivernum == LOG_VFD_IDX)
continue;
- get_vfd_info.get_type = GET_VFD_BY_NAME;
- get_vfd_info.info = NULL;
- get_vfd_info.u.name = drivernames[drivernum];
+ vfd_info.type = VFD_BY_NAME;
+ vfd_info.info = NULL;
+ vfd_info.u.name = drivernames[drivernum];
/* Using the current VOL FAPL as a base, get the correct FAPL for the given VFL driver */
- if ((tmp_vfd_fapl = h5tools_get_fapl(tmp_vol_fapl, &get_vfd_info)) < 0)
+ if ((tmp_vfd_fapl = h5tools_get_fapl(tmp_vol_fapl, &vfd_info)) < 0)
continue;
if ((fid = h5tools_fopen(fname, flags, tmp_vfd_fapl, TRUE, drivername, drivername_size)) >= 0) {
diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h
index 1b01c35..5244f7be 100644
--- a/tools/lib/h5tools.h
+++ b/tools/lib/h5tools.h
@@ -540,23 +540,23 @@ typedef struct h5tools_context_t {
} h5tools_context_t;
typedef enum {
- GET_VFD_BY_NAME,
- GET_VOL_BY_NAME,
- GET_VOL_BY_ID
-} h5tools_get_fapl_type_t;
+ VFD_BY_NAME,
+ VOL_BY_NAME,
+ VOL_BY_ID
+} h5tools_fapl_info_type_t;
-typedef struct h5tools_get_fapl_info_t {
- h5tools_get_fapl_type_t get_type;
+typedef struct h5tools_fapl_info_t {
+ h5tools_fapl_info_type_t type;
/* Pointer to information to be passed to the driver/connector for its setup */
const void *info;
- /* Field specifying either the driver's/connector's name, or the driver's/connector's ID */
+ /* Field specifying either the driver's/connector's name or ID */
union {
const char *name;
long id;
} u;
-} h5tools_get_fapl_info_t;
+} h5tools_fapl_info_t;
H5TOOLS_DLLVAR const char *volnames[];
H5TOOLS_DLLVAR const char *drivernames[];
@@ -637,7 +637,7 @@ H5TOOLS_DLL int h5tools_set_attr_output_file(const char *fname, int is_bin);
H5TOOLS_DLL int h5tools_set_input_file(const char *fname, int is_bin);
H5TOOLS_DLL int h5tools_set_output_file(const char *fname, int is_bin);
H5TOOLS_DLL int h5tools_set_error_file(const char *fname, int is_bin);
-H5TOOLS_DLL hid_t h5tools_get_fapl(hid_t fapl, h5tools_get_fapl_info_t *get_info);
+H5TOOLS_DLL hid_t h5tools_get_fapl(hid_t fapl, h5tools_fapl_info_t *fapl_info);
H5TOOLS_DLL herr_t h5tools_get_vfd_name(hid_t fapl_id, char *drivername, size_t drivername_size);
H5TOOLS_DLL hid_t h5tools_fopen(const char *fname, unsigned flags, hid_t fapl,
hbool_t use_specific_driver, char *drivername, size_t drivername_size);
diff --git a/tools/libtest/h5tools_test_utils.c b/tools/libtest/h5tools_test_utils.c
index 160e06f..2f9958b 100644
--- a/tools/libtest/h5tools_test_utils.c
+++ b/tools/libtest/h5tools_test_utils.c
@@ -1147,7 +1147,7 @@ test_set_configured_fapl(void)
TESTING("programmatic fapl set");
for (i = 0; i < n_cases; i++) {
- h5tools_get_fapl_info_t get_fapl_info;
+ h5tools_fapl_info_t fapl_info;
hid_t result;
testcase C = cases[i];
@@ -1170,10 +1170,10 @@ test_set_configured_fapl(void)
#endif /* UTIL_TEST_DEBUG */
/* test */
- get_fapl_info.get_type = GET_VFD_BY_NAME;
- get_fapl_info.info = C.conf_fa;
- get_fapl_info.u.name = C.vfdname;
- result = h5tools_get_fapl(H5P_DEFAULT, &get_fapl_info);
+ fapl_info.type = VFD_BY_NAME;
+ fapl_info.info = C.conf_fa;
+ fapl_info.u.name = C.vfdname;
+ result = h5tools_get_fapl(H5P_DEFAULT, &fapl_info);
if (C.expected == 0)
JSVERIFY( result, H5I_INVALID_HID, C.message)
else
diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c
index 1848d3d..e49141d 100644
--- a/tools/src/h5dump/h5dump.c
+++ b/tools/src/h5dump/h5dump.c
@@ -1415,16 +1415,16 @@ main(int argc, const char *argv[])
h5trav_set_index(sort_by, sort_order);
if (driver != NULL) {
- h5tools_get_fapl_info_t get_fapl_info;
+ h5tools_fapl_info_t fapl_info;
/* Currently, only retrieval of VFDs is supported. */
- get_fapl_info.get_type = GET_VFD_BY_NAME;
- get_fapl_info.info = NULL;
- get_fapl_info.u.name = driver;
+ fapl_info.type = VFD_BY_NAME;
+ fapl_info.info = NULL;
+ fapl_info.u.name = driver;
if (!HDstrcmp(driver, drivernames[ROS3_VFD_IDX])) {
#ifdef H5_HAVE_ROS3_VFD
- get_fapl_info.info = (void *)&ros3_fa;
+ fapl_info.info = (void *)&ros3_fa;
#else
error_msg("Read-Only S3 VFD not enabled.\n");
h5tools_setstatus(EXIT_FAILURE);
@@ -1433,7 +1433,7 @@ main(int argc, const char *argv[])
}
else if (!HDstrcmp(driver, drivernames[HDFS_VFD_IDX])) {
#ifdef H5_HAVE_LIBHDFS
- get_fapl_info.info = (void *)&hdfs_fa;
+ fapl_info.info = (void *)&hdfs_fa;
#else
error_msg("The HDFS VFD is not enabled.\n");
h5tools_setstatus(EXIT_FAILURE);
@@ -1441,7 +1441,7 @@ main(int argc, const char *argv[])
#endif
}
- if ((fapl_id = h5tools_get_fapl(H5P_DEFAULT, &get_fapl_info)) < 0) {
+ if ((fapl_id = h5tools_get_fapl(H5P_DEFAULT, &fapl_info)) < 0) {
error_msg("unable to create FAPL for file access\n");
h5tools_setstatus(EXIT_FAILURE);
goto done;
diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c
index 16e6a4c..476b6dc 100644
--- a/tools/src/h5ls/h5ls.c
+++ b/tools/src/h5ls/h5ls.c
@@ -3141,16 +3141,16 @@ main(int argc, const char *argv[])
}
if (preferred_driver) {
- h5tools_get_fapl_info_t get_fapl_info;
+ h5tools_fapl_info_t fapl_info;
/* Currently, only retrieval of VFDs is supported. */
- get_fapl_info.get_type = GET_VFD_BY_NAME;
- get_fapl_info.info = NULL;
- get_fapl_info.u.name = preferred_driver;
+ fapl_info.type = VFD_BY_NAME;
+ fapl_info.info = NULL;
+ fapl_info.u.name = preferred_driver;
if (!HDstrcmp(preferred_driver, drivernames[ROS3_VFD_IDX])) {
#ifdef H5_HAVE_ROS3_VFD
- get_fapl_info.info = (void *)&ros3_fa;
+ fapl_info.info = (void *)&ros3_fa;
#else
HDfprintf(rawerrorstream, "Error: Read-Only S3 VFD is not enabled\n\n");
leave(EXIT_FAILURE);
@@ -3158,14 +3158,14 @@ main(int argc, const char *argv[])
}
else if (!HDstrcmp(preferred_driver, drivernames[HDFS_VFD_IDX])) {
#ifdef H5_HAVE_LIBHDFS
- get_fapl_info.info = (void *)&hdfs_fa;
+ fapl_info.info = (void *)&hdfs_fa;
#else
HDfprintf(rawerrorstream, "Error: The HDFS VFD is not enabled\n\n");
leave(EXIT_FAILURE);
#endif
}
- if ((fapl_id = h5tools_get_fapl(H5P_DEFAULT, &get_fapl_info)) < 0) {
+ if ((fapl_id = h5tools_get_fapl(H5P_DEFAULT, &fapl_info)) < 0) {
HDfprintf(rawerrorstream, "Error: Unable to create FAPL for file access\n\n");
leave(EXIT_FAILURE);
}
diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c
index f0a94ab..1761fb4 100644
--- a/tools/src/h5repack/h5repack_main.c
+++ b/tools/src/h5repack/h5repack_main.c
@@ -432,16 +432,16 @@ set_sort_order(const char *form)
static
int parse_command_line(int argc, const char **argv, pack_opt_t* options)
{
- h5tools_get_fapl_info_t get_in_vol_info;
- h5tools_get_fapl_info_t get_out_vol_info;
+ h5tools_fapl_info_t in_vol_info;
+ h5tools_fapl_info_t out_vol_info;
hbool_t custom_in_fapl = FALSE;
hbool_t custom_out_fapl = FALSE;
hid_t tmp_fapl = H5I_INVALID_HID;
int bound, opt;
int ret_value = 0;
- HDmemset(&get_in_vol_info, 0, sizeof(h5tools_get_fapl_info_t));
- HDmemset(&get_out_vol_info, 0, sizeof(h5tools_get_fapl_info_t));
+ HDmemset(&in_vol_info, 0, sizeof(h5tools_fapl_info_t));
+ HDmemset(&out_vol_info, 0, sizeof(h5tools_fapl_info_t));
/* parse command line options */
while (EOF != (opt = get_option(argc, argv, s_opts, l_opts))) {
@@ -682,35 +682,35 @@ int parse_command_line(int argc, const char **argv, pack_opt_t* options)
break;
case '1':
- get_in_vol_info.get_type = GET_VOL_BY_ID;
- get_in_vol_info.u.id = HDatol(opt_arg);
+ in_vol_info.type = VOL_BY_ID;
+ in_vol_info.u.id = HDatol(opt_arg);
custom_in_fapl = TRUE;
break;
case '2':
- get_in_vol_info.get_type = GET_VOL_BY_NAME;
- get_in_vol_info.u.name = opt_arg;
+ in_vol_info.type = VOL_BY_NAME;
+ in_vol_info.u.name = opt_arg;
custom_in_fapl = TRUE;
break;
case '3':
- get_in_vol_info.info = opt_arg;
+ in_vol_info.info = opt_arg;
break;
case '4':
- get_out_vol_info.get_type = GET_VOL_BY_ID;
- get_out_vol_info.u.id = HDatol(opt_arg);
+ out_vol_info.type = VOL_BY_ID;
+ out_vol_info.u.id = HDatol(opt_arg);
custom_out_fapl = TRUE;
break;
case '5':
- get_out_vol_info.get_type = GET_VOL_BY_NAME;
- get_out_vol_info.u.name = opt_arg;
+ out_vol_info.type = VOL_BY_NAME;
+ out_vol_info.u.name = opt_arg;
custom_out_fapl = TRUE;
break;
case '6':
- get_out_vol_info.info = opt_arg;
+ out_vol_info.info = opt_arg;
break;
default:
@@ -747,7 +747,7 @@ int parse_command_line(int argc, const char **argv, pack_opt_t* options)
/* Setup FAPL for input and output file accesses */
if (custom_in_fapl) {
- if ((tmp_fapl = h5tools_get_fapl(options->fin_fapl, &get_in_vol_info)) < 0) {
+ if ((tmp_fapl = h5tools_get_fapl(options->fin_fapl, &in_vol_info)) < 0) {
error_msg("failed to setup FAPL for input file\n");
h5tools_setstatus(EXIT_FAILURE);
ret_value = -1;
@@ -767,7 +767,7 @@ int parse_command_line(int argc, const char **argv, pack_opt_t* options)
}
if (custom_out_fapl) {
- if ((tmp_fapl = h5tools_get_fapl(options->fout_fapl, &get_out_vol_info)) < 0) {
+ if ((tmp_fapl = h5tools_get_fapl(options->fout_fapl, &out_vol_info)) < 0) {
error_msg("failed to setup FAPL for output file\n");
h5tools_setstatus(EXIT_FAILURE);
ret_value = -1;
diff --git a/tools/src/h5stat/h5stat.c b/tools/src/h5stat/h5stat.c
index c1d3cfe..fdf49cd 100644
--- a/tools/src/h5stat/h5stat.c
+++ b/tools/src/h5stat/h5stat.c
@@ -1813,16 +1813,16 @@ main(int argc, const char *argv[])
goto done;
if (drivername) {
- h5tools_get_fapl_info_t get_fapl_info;
+ h5tools_fapl_info_t fapl_info;
/* Currently, only retrieval of VFDs is supported. */
- get_fapl_info.get_type = GET_VFD_BY_NAME;
- get_fapl_info.info = NULL;
- get_fapl_info.u.name = drivername;
+ fapl_info.type = VFD_BY_NAME;
+ fapl_info.info = NULL;
+ fapl_info.u.name = drivername;
if (!HDstrcmp(drivername, drivernames[ROS3_VFD_IDX])) {
#ifdef H5_HAVE_ROS3_VFD
- get_fapl_info.info = (void *)&ros3_fa;
+ fapl_info.info = (void *)&ros3_fa;
#else
error_msg("Read-Only S3 VFD not enabled.\n");
goto done;
@@ -1830,14 +1830,14 @@ main(int argc, const char *argv[])
}
else if (!HDstrcmp(drivername, drivernames[HDFS_VFD_IDX])) {
#ifdef H5_HAVE_LIBHDFS
- get_fapl_info.info = (void *)&hdfs_fa;
+ fapl_info.info = (void *)&hdfs_fa;
#else
error_msg("HDFS VFD not enabled.\n");
goto done;
#endif
}
- if ((fapl_id = h5tools_get_fapl(H5P_DEFAULT, &get_fapl_info)) < 0) {
+ if ((fapl_id = h5tools_get_fapl(H5P_DEFAULT, &fapl_info)) < 0) {
error_msg("Unable to create FAPL for file access\n");
goto done;
}