diff options
Diffstat (limited to 'tools/lib/h5tools_str.c')
-rw-r--r-- | tools/lib/h5tools_str.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index 2286b4e..7ad5db7 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -841,14 +841,17 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai if (h5tools_is_zero(vp, H5Tget_size(type))) { h5tools_str_append(str, "NULL"); } else { + haddr_t objno; /* Compact form of object's location */ + obj = H5Rdereference(container, H5R_DATASET_REGION, vp); region = H5Rget_region(container, H5R_DATASET_REGION, vp); H5Gget_objinfo(obj, ".", FALSE, &sb); + objno = (haddr_t)sb.objno[0] | ((haddr_t)sb.objno[1] << (8 * sizeof(long))); if (info->dset_hidefileno) - h5tools_str_append(str, info->dset_format, sb.u.obj.objno); + h5tools_str_append(str, info->dset_format, objno); else - h5tools_str_append(str, info->dset_format, sb.fileno, sb.u.obj.objno); + h5tools_str_append(str, info->dset_format, sb.fileno[0], objno); h5tools_str_dump_region(str, region, info); H5Sclose(region); @@ -862,7 +865,9 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai if (h5tools_is_zero(vp, H5Tget_size(type))) { h5tools_str_append(str, "NULL"); } else { + haddr_t objno; /* Compact form of object's location */ const char *path; + otype = H5Rget_obj_type(container, H5R_OBJECT, vp); obj = H5Rdereference(container, H5R_OBJECT, vp); H5Gget_objinfo(obj, ".", FALSE, &sb); @@ -887,10 +892,11 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai } /* Print OID */ + objno = (haddr_t)sb.objno[0] | ((haddr_t)sb.objno[1] << (8 * sizeof(long))); if (info->obj_hidefileno) - h5tools_str_append(str, info->obj_format, sb.u.obj.objno); + h5tools_str_append(str, info->obj_format, objno); else - h5tools_str_append(str, info->obj_format, sb.fileno,sb.u.obj.objno); + h5tools_str_append(str, info->obj_format, sb.fileno[0], objno); /* Print name */ path = lookup_ref_path(*(haddr_t *)vp); |