summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@koziol.gov>2020-04-25 02:13:31 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-05-20 14:37:20 (GMT)
commit828504f46af4498431abf7ab68144a9f8461eec1 (patch)
treee84f5e74e2f693c2e80ab4f13fd0caf401eacf76
parent3454833bf7b48d96ec4c30f3a257398f4b1a6faf (diff)
downloadhdf5-828504f46af4498431abf7ab68144a9f8461eec1.zip
hdf5-828504f46af4498431abf7ab68144a9f8461eec1.tar.gz
hdf5-828504f46af4498431abf7ab68144a9f8461eec1.tar.bz2
Extend h5debug to support 3-D datasets for chunks.
-rw-r--r--tools/src/misc/h5debug.c10
1 files 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 <filename> <B-tree node address> <# of dimensions> <slowest chunk dim>...<fastest chunk dim>\n");
HDexit(4);