diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-04-22 06:25:12 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-22 06:25:12 (GMT) |
commit | 7707859279a60b32d2b6c915442a7c04d44445b4 (patch) | |
tree | 890d16aa2408b270368b36ea4f05ca20fe2f16f6 /tools/lib | |
parent | a4371b6fce577852691dfdeac642dec1dd4b9453 (diff) | |
download | hdf5-7707859279a60b32d2b6c915442a7c04d44445b4.zip hdf5-7707859279a60b32d2b6c915442a7c04d44445b4.tar.gz hdf5-7707859279a60b32d2b6c915442a7c04d44445b4.tar.bz2 |
Merge with develop (#2790)
Diffstat (limited to 'tools/lib')
-rw-r--r-- | tools/lib/h5diff.c | 4 | ||||
-rw-r--r-- | tools/lib/h5tools.c | 18 | ||||
-rw-r--r-- | tools/lib/h5tools.h | 2 | ||||
-rw-r--r-- | tools/lib/h5tools_dump.c | 17 | ||||
-rw-r--r-- | tools/lib/h5tools_ref.c | 10 | ||||
-rw-r--r-- | tools/lib/h5tools_str.c | 16 | ||||
-rw-r--r-- | tools/lib/io_timer.c | 6 |
7 files changed, 12 insertions, 61 deletions
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c index 1ab9236..ea268f3 100644 --- a/tools/lib/h5diff.c +++ b/tools/lib/h5diff.c @@ -1105,10 +1105,6 @@ done: * * Return: Number of differences found * - * Modifications: Compare the graph and make h5diff return 1 for difference if - * 1) the number of objects in file1 is not the same as in file2 - * 2) the graph does not match, i.e same names (absolute path) - * 3) objects with the same name are not of the same type *------------------------------------------------------------------------- */ hsize_t diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index 078ae5a..189aafd 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -817,10 +817,11 @@ done: *------------------------------------------------------------------------- */ herr_t -h5tools_get_vfd_name(hid_t fapl_id, char *drivername, size_t drivername_size) +h5tools_get_vfd_name(hid_t fid, hid_t fapl_id, char *drivername, size_t drivername_size) { - hid_t fapl_vol_id = H5I_INVALID_HID; - herr_t ret_value = SUCCEED; + hid_t fapl_vol_id = H5I_INVALID_HID; + hbool_t is_native = FALSE; + herr_t ret_value = SUCCEED; if (fapl_id < 0) H5TOOLS_GOTO_ERROR(FAIL, "invalid FAPL"); @@ -839,9 +840,11 @@ h5tools_get_vfd_name(hid_t fapl_id, char *drivername, size_t drivername_size) if (H5Pget_vol_id(fapl_id, &fapl_vol_id) < 0) H5TOOLS_ERROR(FAIL, "failed to retrieve VOL ID from FAPL"); - /* TODO: For now, we have no way of determining if an arbitrary - * VOL connector is native-terminal. */ - if (fapl_vol_id == H5VL_NATIVE || fapl_vol_id == H5VL_PASSTHRU) { + /* Query if the file ID is native-terminal */ + if (H5VLobject_is_native(fid, &is_native) < 0) + H5TOOLS_ERROR(FAIL, "failed to determine if file ID is native-terminal"); + + if (is_native) { const char *driver_name; hid_t driver_id; @@ -1072,7 +1075,8 @@ h5tools_fopen(const char *fname, unsigned flags, hid_t fapl_id, hbool_t use_spec done: /* Save the driver name if using a native-terminal VOL connector */ if (drivername && drivername_size && ret_value >= 0) - if (used_fapl_id >= 0 && h5tools_get_vfd_name(used_fapl_id, drivername, drivername_size) < 0) + if (used_fapl_id >= 0 && + h5tools_get_vfd_name(ret_value, used_fapl_id, drivername, drivername_size) < 0) H5TOOLS_ERROR(H5I_INVALID_HID, "failed to retrieve name of VFD used to open file"); if (tmp_fapl_id >= 0) diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h index 2082f2d..753a83b 100644 --- a/tools/lib/h5tools.h +++ b/tools/lib/h5tools.h @@ -667,7 +667,7 @@ H5TOOLS_DLL int h5tools_set_error_file(const char *fname, int is_bin); H5TOOLS_DLL hid_t h5tools_get_fapl(hid_t prev_fapl_id, h5tools_vol_info_t *vol_info, h5tools_vfd_info_t *vfd_info); -H5TOOLS_DLL herr_t h5tools_get_vfd_name(hid_t fapl_id, char *drivername, size_t drivername_size); +H5TOOLS_DLL herr_t h5tools_get_vfd_name(hid_t fid, 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); H5TOOLS_DLL hid_t h5tools_get_little_endian_type(hid_t type); diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index d80ef1f..435ca87 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -232,24 +232,7 @@ h5tools_dump_init(void) * Failure: FAIL * Programmer: * Robb Matzke, Monday, April 26, 1999 - * Modifications: - * Robb Matzke, 1999-06-04 - * The `container' argument is the optional dataset for reference types. * - * Robb Matzke, 1999-09-29 - * Understands the `per_line' property which indicates that every Nth - * element should begin a new line. - * - * Robb Matzke, LLNL, 2003-06-05 - * Do not dereference the memory for a variable-length string here. - * Deref in h5tools_str_sprint() instead so recursive types are - * handled correctly. - * - * Pedro Vicente Nunes, The HDF Group, 2005-10-19 - * pass to the prefix in h5tools_simple_prefix the total position - * instead of the current stripmine position i; this is necessary - * to print the array indices - * new field sm_pos in h5tools_context_t, the current stripmine element position *------------------------------------------------------------------------- */ int diff --git a/tools/lib/h5tools_ref.c b/tools/lib/h5tools_ref.c index d5c1cf9..9f12367 100644 --- a/tools/lib/h5tools_ref.c +++ b/tools/lib/h5tools_ref.c @@ -51,8 +51,6 @@ static int ref_path_table_put(const char *, const H5O_token_t *token); * * Programmer: Quincey Koziol * - * Modifications: - * *------------------------------------------------------------------------- */ static herr_t @@ -160,8 +158,6 @@ init_ref_path_table(void) * * Programmer: Quincey Koziol * - * Modifications: - * *------------------------------------------------------------------------- */ int @@ -187,8 +183,6 @@ term_ref_path_table(void) * * Programmer: REMcG * - * Modifications: - * *------------------------------------------------------------------------- */ int @@ -237,8 +231,6 @@ ref_path_table_lookup(const char *thepath, H5O_token_t *token) * * Programmer: REMcG * - * Modifications: - * *------------------------------------------------------------------------- */ static int @@ -322,8 +314,6 @@ ref_path_table_gen_fake(const char *path, H5O_token_t *token) * * Programmer: REMcG * - * Modifications: - * *------------------------------------------------------------------------- */ const char * diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index d9e26e7..223eb61 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -1336,22 +1336,6 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai if (i) h5tools_str_append(str, "%s", OPT(info->vlen_sep, "," OPTIONAL_LINE_BREAK)); -#ifdef LATER - /* Need to fix so VL data breaks at correct location on end of line -QAK */ - if (info->arr_linebreak && h5tools_str_len(str) >= info->line_ncols) { - int x; - - h5tools_str_append(str, "%s", "\n"); - - /* need to indent some more here */ - if (ctx->indent_level >= 0) - h5tools_str_append(str, "%s", OPT(info->line_pre, "")); - - for (x = 0; x < ctx->indent_level + 1; x++) - h5tools_str_append(str, "%s", OPT(info->line_indent, "")); - } /* end if */ -#endif /* LATER */ - ctx->indent_level++; /* Dump the array element */ diff --git a/tools/lib/io_timer.c b/tools/lib/io_timer.c index ce21b3e..49a4a20 100644 --- a/tools/lib/io_timer.c +++ b/tools/lib/io_timer.c @@ -57,7 +57,6 @@ sub_time(struct timeval *a, struct timeval *b) * SYS_CLOCK for system time). * Return: Pointer to io_time object * Programmer: Bill Wendling, 01. October 2001 - * Modifications: */ io_time_t * io_time_new(clock_type type) @@ -78,7 +77,6 @@ io_time_new(clock_type type) * function. * Return: Nothing * Programmer: Bill Wendling, 01. October 2001 - * Modifications: */ void io_time_destroy(io_time_t *pt) @@ -97,7 +95,6 @@ io_time_destroy(io_time_t *pt) * timer with the pio_timer_new function (shame!). * Return: Nothing * Programmer: Bill Wendling, 04. October 2001 - * Modifications: */ void set_timer_type(io_time_t *pt, clock_type type) @@ -110,7 +107,6 @@ set_timer_type(io_time_t *pt, clock_type type) * Purpose: Get the type of the timer. * Return: MPI_CLOCK or SYS_CLOCK. * Programmer: Bill Wendling, 04. October 2001 - * Modifications: */ clock_type get_timer_type(io_time_t *pt) @@ -124,7 +120,6 @@ get_timer_type(io_time_t *pt) * Purpose: Set the time in a ``io_time_t'' object. * Return: Pointer to the passed in ``io_time_t'' object if SUCCEED; Null otherwise. * Programmer: Bill Wendling, 01. October 2001 - * Modifications: */ io_time_t * io_time_set(io_time_t *pt, timer_type t, int start_stop) @@ -214,7 +209,6 @@ io_time_set(io_time_t *pt, timer_type t, int start_stop) * Purpose: Get the time from a ``io_time_t'' object. * Return: The number of seconds as a DOUBLE. * Programmer: Bill Wendling, 01. October 2001 - * Modifications: */ H5_ATTR_PURE double io_time_get(io_time_t *pt, timer_type t) |