From ed833f1c8d07d32eaa9319c8e3220b5033485abd Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Fri, 24 Apr 2020 21:13:31 -0500 Subject: Extend h5debug to support 3-D datasets for chunks. --- tools/src/misc/h5debug.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/src/misc/h5debug.c b/tools/src/misc/h5debug.c index a167709..c1940f7 100644 --- a/tools/src/misc/h5debug.c +++ b/tools/src/misc/h5debug.c @@ -251,7 +251,7 @@ main(int argc, char *argv[]) hid_t fid, fapl; H5VL_object_t *vol_obj; H5F_t *f; - haddr_t addr = 0, extra = 0, extra2 = 0, extra3 = 0, extra4 = 0; + haddr_t addr = 0, extra = 0, extra2 = 0, extra3 = 0, extra4 = 0, extra5 = 0; uint8_t sig[H5F_SIGNATURE_LEN]; size_t u; H5E_auto2_t func; @@ -327,6 +327,8 @@ main(int argc, char *argv[]) extra3 = (haddr_t)HDstrtoll(argv[5], NULL, 0); if(argc > 6) extra4 = (haddr_t)HDstrtoll(argv[6], NULL, 0); + if(argc > 7) + extra5 = (haddr_t)HDstrtoll(argv[7], NULL, 0); /* * Read the signature at the specified file position. @@ -410,10 +412,12 @@ main(int argc, char *argv[]) dim[1] = (uint32_t)extra3; if(ndims > 2) dim[2] = (uint32_t)extra4; + if(ndims > 3) + dim[3] = (uint32_t)extra5; /* Check for dimension error */ - if(ndims > 3) { - HDfprintf(stderr, "ERROR: Only 3 dimensions support currently (fix h5debug)\n"); + if(ndims > 4) { + HDfprintf(stderr, "ERROR: Only 4 dimensions support currently (fix h5debug)\n"); HDfprintf(stderr, "B-tree chunked storage node usage:\n"); HDfprintf(stderr, "\th5debug <# of dimensions> ...\n"); HDexit(4); -- cgit v0.12