diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2017-03-22 16:58:40 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2017-03-22 16:58:40 (GMT) |
commit | 9c606c3d901f4190e456730266f25b0a65c88ab9 (patch) | |
tree | 41b9bfa18b2c784c0bcdcc02e75b986e95a50641 /tools/src | |
parent | f09abb150e965200ac1b06a5bc4b374d8969776c (diff) | |
download | hdf5-9c606c3d901f4190e456730266f25b0a65c88ab9.zip hdf5-9c606c3d901f4190e456730266f25b0a65c88ab9.tar.gz hdf5-9c606c3d901f4190e456730266f25b0a65c88ab9.tar.bz2 |
Revert "Switch h5clear for cache images to use existing H5Pget_cache_image_config()"
This reverts commit dd5105fc9912c77f6d6074700d83e5e8282e86c9.
Diffstat (limited to 'tools/src')
-rw-r--r-- | tools/src/misc/h5clear.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/tools/src/misc/h5clear.c b/tools/src/misc/h5clear.c index b6c6ea3..9ec562e 100644 --- a/tools/src/misc/h5clear.c +++ b/tools/src/misc/h5clear.c @@ -246,28 +246,16 @@ main (int argc, const char *argv[]) /* -m option */ if(remove_cache_image) { - H5AC_cache_image_config_t config; - - /* Retrieve cache image config */ - if((fapl = H5Fget_access_plist(fid)) < 0) { - error_msg("H5Fget_access_plist\n"); - h5tools_setstatus(EXIT_FAILURE); - goto done; - } - config.version = H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION; - if(H5Pget_mdc_image_config(fapl, &config) < 0) { - error_msg("H5Pget_mdc_image_config\n"); + if(H5Fget_mdc_image_info(fid, &image_addr, &image_len) < 0) { + error_msg("H5Fget_mdc_image_info\n"); h5tools_setstatus(EXIT_FAILURE); goto done; } - - /* Check for image */ - if(!config.generate_image) + if(image_addr == HADDR_UNDEF && image_len == 0) warn_msg("No cache image in the file\n"); } h5tools_setstatus(EXIT_SUCCESS); - done: if(fname) HDfree(fname); |