summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@lbl.gov>2017-03-22 22:07:34 (GMT)
committerlrknox <lrknox>2017-03-23 05:04:49 (GMT)
commit9ab96feda6f6a980fe53d01fb786f0a1dab8bab7 (patch)
tree1828a5690c291ef47b17d0676428c0832ab88f14 /tools
parenta533dba4d1589273c890606f665aa06b69fdfa4c (diff)
downloadhdf5-9ab96feda6f6a980fe53d01fb786f0a1dab8bab7.zip
hdf5-9ab96feda6f6a980fe53d01fb786f0a1dab8bab7.tar.gz
hdf5-9ab96feda6f6a980fe53d01fb786f0a1dab8bab7.tar.bz2
Merge pull request #361 in HDFFV/hdf5 from merge_h5clear_revert to develop
* commit '46c9ab600de491657520897322b75659c3bdfb5f': Minor style cleanups Revert "Switch h5clear for cache images to use existing H5Pget_cache_image_config()"
Diffstat (limited to 'tools')
-rw-r--r--tools/src/misc/h5clear.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/tools/src/misc/h5clear.c b/tools/src/misc/h5clear.c
index b6c6ea3..5c33b72 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);
@@ -281,3 +269,4 @@ done:
leave(h5tools_getstatus());
} /* main() */
+