summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorVailin Choi <vchoi@jam.ad.hdfgroup.org>2018-05-14 17:26:48 (GMT)
committerVailin Choi <vchoi@jam.ad.hdfgroup.org>2018-05-14 17:26:48 (GMT)
commitb178d80be0946e3d332ecf575b2f145837cc9454 (patch)
treea40288aab4c8446a5666c898c51afac2c2daac89 /tools
parentea66ac1e67bf2e5ccc59f30e6b648bb39c8f5e42 (diff)
downloadhdf5-b178d80be0946e3d332ecf575b2f145837cc9454.zip
hdf5-b178d80be0946e3d332ecf575b2f145837cc9454.tar.gz
hdf5-b178d80be0946e3d332ecf575b2f145837cc9454.tar.bz2
Changes made based on feedback from pull request #1039.
Diffstat (limited to 'tools')
-rw-r--r--tools/lib/h5diff.c12
-rw-r--r--tools/lib/h5diff_array.c4
-rw-r--r--tools/lib/h5tools.c8
-rw-r--r--tools/lib/h5tools_dump.c2
-rw-r--r--tools/lib/h5tools_ref.c4
-rw-r--r--tools/lib/h5tools_str.c2
-rw-r--r--tools/lib/h5tools_utils.c6
-rw-r--r--tools/lib/h5trav.c10
-rw-r--r--tools/src/h5dump/h5dump.c3
-rw-r--r--tools/src/h5dump/h5dump_ddl.c12
-rw-r--r--tools/src/h5dump/h5dump_xml.c10
-rw-r--r--tools/src/h5format_convert/h5format_convert.c2
-rw-r--r--tools/src/h5ls/h5ls.c6
-rw-r--r--tools/src/h5repack/h5repack.c2
-rw-r--r--tools/src/h5repack/h5repack_refs.c2
15 files changed, 42 insertions, 43 deletions
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c
index 041ac8d..28b1f00 100644
--- a/tools/lib/h5diff.c
+++ b/tools/lib/h5diff.c
@@ -433,7 +433,7 @@ trav_grp_symlinks(const char *path, const H5L_info_t *linfo, void *udata)
HGOTO_DONE(0);
if(h5trav_visit(tinfo->fid, path, TRUE, TRUE,
- trav_grp_objs,trav_grp_symlinks, tinfo, 0) < 0) {
+ trav_grp_objs,trav_grp_symlinks, tinfo, H5O_INFO_BASIC) < 0) {
parallel_print("Error: Could not get file contents\n");
opts->err_stat = 1;
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Error: Could not get file contents");
@@ -465,7 +465,7 @@ trav_grp_symlinks(const char *path, const H5L_info_t *linfo, void *udata)
HGOTO_DONE(0);
if(h5trav_visit(tinfo->fid, path, TRUE, TRUE,
- trav_grp_objs,trav_grp_symlinks, tinfo, 0) < 0) {
+ trav_grp_objs,trav_grp_symlinks, tinfo, H5O_INFO_BASIC) < 0) {
parallel_print("Error: Could not get file contents\n");
opts->err_stat = 1;
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Error: Could not get file contents\n");
@@ -645,7 +645,7 @@ h5diff(const char *fname1,
/* optional data pass */
info1_obj->opts = (diff_opt_t*)opts;
- if(H5Oget_info_by_name2(file1_id, obj1fullname, &oinfo1, 0, H5P_DEFAULT) < 0) {
+ if(H5Oget_info_by_name2(file1_id, obj1fullname, &oinfo1, H5O_INFO_BASIC, H5P_DEFAULT) < 0) {
parallel_print("Error: Could not get file contents\n");
HGOTO_ERROR(1, H5E_tools_min_id_g, "Error: Could not get file contents");
}
@@ -695,7 +695,7 @@ h5diff(const char *fname1,
/* optional data pass */
info2_obj->opts = (diff_opt_t*)opts;
- if(H5Oget_info_by_name2(file2_id, obj2fullname, &oinfo2, 0, H5P_DEFAULT) < 0) {
+ if(H5Oget_info_by_name2(file2_id, obj2fullname, &oinfo2, H5O_INFO_BASIC, H5P_DEFAULT) < 0) {
parallel_print("Error: Could not get file contents\n");
HGOTO_ERROR(1, H5E_tools_min_id_g, "Error: Could not get file contents");
}
@@ -846,7 +846,7 @@ h5diff(const char *fname1,
info1_grp->opts = (diff_opt_t*)opts;
if(h5trav_visit(file1_id, obj1fullname, TRUE, TRUE,
- trav_grp_objs, trav_grp_symlinks, info1_grp, 0) < 0) {
+ trav_grp_objs, trav_grp_symlinks, info1_grp, H5O_INFO_BASIC) < 0) {
parallel_print("Error: Could not get file contents\n");
HGOTO_ERROR(1, H5E_tools_min_id_g, "Could not get file contents");
}
@@ -860,7 +860,7 @@ h5diff(const char *fname1,
info2_grp->opts = (diff_opt_t*)opts;
if(h5trav_visit(file2_id, obj2fullname, TRUE, TRUE,
- trav_grp_objs, trav_grp_symlinks, info2_grp, 0) < 0) {
+ trav_grp_objs, trav_grp_symlinks, info2_grp, H5O_INFO_BASIC) < 0) {
parallel_print("Error: Could not get file contents\n");
HGOTO_ERROR(1, H5E_tools_min_id_g, "Could not get file contents");
} /* end if */
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index e72f738..9d5f062 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -2096,8 +2096,8 @@ static hsize_t diff_region(hid_t obj1_id, hid_t obj2_id, hid_t region1_id, hid_t
if (nfound_b && opts->m_verbose) {
H5O_info_t oi1, oi2;
- H5Oget_info2(obj1_id, &oi1, 0);
- H5Oget_info2(obj2_id, &oi2, 0);
+ H5Oget_info2(obj1_id, &oi1, H5O_INFO_BASIC);
+ H5Oget_info2(obj2_id, &oi2, H5O_INFO_BASIC);
parallel_print("Referenced dataset %lu %lu\n", (unsigned long) oi1.addr, (unsigned long) oi2.addr);
parallel_print( "------------------------------------------------------------\n");
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index 7ba82dd..470df63 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -1758,14 +1758,14 @@ h5tools_is_obj_same(hid_t loc_id1, const char *name1,
hbool_t ret_val = 0;
if ( name1 && HDstrcmp(name1, "."))
- H5Oget_info_by_name2(loc_id1, name1, &oinfo1, 0, H5P_DEFAULT);
+ H5Oget_info_by_name2(loc_id1, name1, &oinfo1, H5O_INFO_BASIC, H5P_DEFAULT);
else
- H5Oget_info2(loc_id1, &oinfo1, 0);
+ H5Oget_info2(loc_id1, &oinfo1, H5O_INFO_BASIC);
if ( name2 && HDstrcmp(name2, "."))
- H5Oget_info_by_name2(loc_id2, name2, &oinfo2, 0, H5P_DEFAULT);
+ H5Oget_info_by_name2(loc_id2, name2, &oinfo2, H5O_INFO_BASIC, H5P_DEFAULT);
else
- H5Oget_info2(loc_id2, &oinfo2, 0);
+ H5Oget_info2(loc_id2, &oinfo2, H5O_INFO_BASIC);
if (oinfo1.fileno == oinfo2.fileno && oinfo1.addr==oinfo2.addr)
ret_val = 1;
diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c
index 42f9d05..69cecb0 100644
--- a/tools/lib/h5tools_dump.c
+++ b/tools/lib/h5tools_dump.c
@@ -1905,7 +1905,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
H5O_info_t oinfo;
obj_t *obj = NULL; /* Found object */
- H5Oget_info2(type, &oinfo, 0);
+ H5Oget_info2(type, &oinfo, H5O_INFO_BASIC);
obj = search_obj(h5dump_type_table, oinfo.addr);
if(obj) {
diff --git a/tools/lib/h5tools_ref.c b/tools/lib/h5tools_ref.c
index a874c0f..e98a8e2 100644
--- a/tools/lib/h5tools_ref.c
+++ b/tools/lib/h5tools_ref.c
@@ -113,7 +113,7 @@ init_ref_path_table(void)
return (-1);
/* Iterate over objects in this file */
- if(h5trav_visit(thefile, "/", TRUE, TRUE, init_ref_path_cb, NULL, NULL, 0) < 0) {
+ if(h5trav_visit(thefile, "/", TRUE, TRUE, init_ref_path_cb, NULL, NULL, H5O_INFO_BASIC) < 0) {
error_msg("unable to construct reference path table\n");
h5tools_setstatus(EXIT_FAILURE);
} /* end if */
@@ -184,7 +184,7 @@ ref_path_table_lookup(const char *thepath)
/* Get the object info now */
/* (returns failure for dangling soft links) */
- if(H5Oget_info_by_name2(thefile, thepath, &oi, 0, H5P_DEFAULT) < 0)
+ if(H5Oget_info_by_name2(thefile, thepath, &oi, H5O_INFO_BASIC, H5P_DEFAULT) < 0)
return HADDR_UNDEF;
/* Return OID */
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index 3d029d2..3d595ca 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -1120,7 +1120,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
const char *path;
obj = H5Rdereference2(container, H5P_DEFAULT, H5R_OBJECT, vp);
- H5Oget_info2(obj, &oi, 0);
+ H5Oget_info2(obj, &oi, H5O_INFO_BASIC);
/* Print object type and close object */
switch(oi.type) {
diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c
index fad3c5b..8ac0d32 100644
--- a/tools/lib/h5tools_utils.c
+++ b/tools/lib/h5tools_utils.c
@@ -507,7 +507,7 @@ find_objs_cb(const char *name, const H5O_info_t *oinfo, const char *already_seen
if(H5Tcommitted(type) > 0) {
H5O_info_t type_oinfo;
- H5Oget_info2(type, &type_oinfo, 0);
+ H5Oget_info2(type, &type_oinfo, H5O_INFO_BASIC);
if(search_obj(info->type_table, type_oinfo.addr) == NULL)
add_obj(info->type_table, type_oinfo.addr, name, FALSE);
} /* end if */
@@ -573,7 +573,7 @@ init_objs(hid_t fid, find_objs_t *info, table_t **group_table,
info->dset_table = *dset_table;
/* Find all shared objects */
- return(h5trav_visit(fid, "/", TRUE, TRUE, find_objs_cb, NULL, info, 0));
+ return(h5trav_visit(fid, "/", TRUE, TRUE, find_objs_cb, NULL, info, H5O_INFO_BASIC));
}
@@ -729,7 +729,7 @@ H5tools_get_symlink_info(hid_t file_id, const char * linkpath, h5tool_link_info_
}
/* get target object info */
- if(H5Oget_info_by_name2(file_id, linkpath, &trg_oinfo, 0, lapl) < 0) {
+ if(H5Oget_info_by_name2(file_id, linkpath, &trg_oinfo, H5O_INFO_BASIC, lapl) < 0) {
if(link_info->opt.msg_mode == 1)
parallel_print("Warning: unable to get object information for <%s>\n", linkpath);
HGOTO_DONE(FAIL);
diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c
index e2df439..917d5f5 100644
--- a/tools/lib/h5trav.c
+++ b/tools/lib/h5trav.c
@@ -358,9 +358,9 @@ trav_fileinfo_add(trav_info_t *info, hid_t loc_id)
size_t idx = info->nused - 1;
if ( info->paths[idx].path && HDstrcmp(info->paths[idx].path, "."))
- H5Oget_info_by_name2(loc_id, info->paths[idx].path, &oinfo, 0, H5P_DEFAULT);
+ H5Oget_info_by_name2(loc_id, info->paths[idx].path, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
else
- H5Oget_info2(loc_id, &oinfo, 0);
+ H5Oget_info2(loc_id, &oinfo, H5O_INFO_BASIC);
info->paths[idx].objno = oinfo.addr;
info->paths[idx].fileno = oinfo.fileno;
@@ -438,7 +438,7 @@ h5trav_getinfo(hid_t file_id, trav_info_t *info)
info_visitor.udata = info;
/* Traverse all objects in the file, visiting each object & link */
- if(traverse(file_id, "/", TRUE, TRUE, &info_visitor, 0) < 0)
+ if(traverse(file_id, "/", TRUE, TRUE, &info_visitor, H5O_INFO_BASIC) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "traverse failed");
done:
@@ -604,7 +604,7 @@ h5trav_gettable(hid_t fid, trav_table_t *table)
table_visitor.udata = table;
/* Traverse all objects in the file, visiting each object & link */
- if(traverse(fid, "/", TRUE, TRUE, &table_visitor, 0) < 0)
+ if(traverse(fid, "/", TRUE, TRUE, &table_visitor, H5O_INFO_BASIC) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "traverse failed");
done:
@@ -1029,7 +1029,7 @@ h5trav_print(hid_t fid)
print_visitor.udata = &print_udata;
/* Traverse all objects in the file, visiting each object & link */
- if(traverse(fid, "/", TRUE, TRUE, &print_visitor, 0) < 0)
+ if(traverse(fid, "/", TRUE, TRUE, &print_visitor, H5O_INFO_BASIC) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "traverse failed");
done:
diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c
index a0d2e6e..a5f0369 100644
--- a/tools/src/h5dump/h5dump.c
+++ b/tools/src/h5dump/h5dump.c
@@ -1,5 +1,4 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-
* Copyright by The HDF Group. *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
@@ -1483,7 +1482,7 @@ main(int argc, const char *argv[])
}
/* Get object info for root group */
- if(H5Oget_info_by_name2(fid, "/", &oi, 0, H5P_DEFAULT) < 0) {
+ if(H5Oget_info_by_name2(fid, "/", &oi, H5O_INFO_BASIC, H5P_DEFAULT) < 0) {
error_msg("internal error (file %s:line %d)\n", __FILE__, __LINE__);
h5tools_setstatus(EXIT_FAILURE);
goto done;
diff --git a/tools/src/h5dump/h5dump_ddl.c b/tools/src/h5dump/h5dump_ddl.c
index d4ce2da..5c47abd 100644
--- a/tools/src/h5dump/h5dump_ddl.c
+++ b/tools/src/h5dump/h5dump_ddl.c
@@ -229,7 +229,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_ATTR
H5O_info_t oinfo;
/* Stat the object */
- if(H5Oget_info_by_name2(group, name, &oinfo, 0, H5P_DEFAULT) < 0) {
+ if(H5Oget_info_by_name2(group, name, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) {
error_msg("unable to get object information for \"%s\"\n", name);
h5tools_setstatus(EXIT_FAILURE);
ret = FAIL;
@@ -706,7 +706,7 @@ dump_named_datatype(hid_t tid, const char *name)
h5tools_dump_header_format->datatypeblockbegin);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- H5Oget_info2(tid, &oinfo, 0);
+ H5Oget_info2(tid, &oinfo, H5O_INFO_BASIC);
/* Must check for uniqueness of all objects if we've traversed an elink,
* otherwise only check if the reference count > 1.
@@ -876,7 +876,7 @@ dump_group(hid_t gid, const char *name)
h5tools_dump_comment(rawoutstream, outputformat, &ctx, gid);
- H5Oget_info2(gid, &oinfo, 0);
+ H5Oget_info2(gid, &oinfo, H5O_INFO_BASIC);
/* Must check for uniqueness of all objects if we've traversed an elink,
* otherwise only check if the reference count > 1.
@@ -1512,7 +1512,7 @@ handle_paths(hid_t fid, const char *path_name, void H5_ATTR_UNUSED * data, int H
handle_udata.fid = fid;
handle_udata.op_name = path_name;
- if(h5trav_visit(fid, "/", TRUE, TRUE, obj_search, lnk_search, &handle_udata, 0) < 0) {
+ if(h5trav_visit(fid, "/", TRUE, TRUE, obj_search, lnk_search, &handle_udata, H5O_INFO_BASIC) < 0) {
error_msg("error traversing information\n");
h5tools_setstatus(EXIT_FAILURE);
}
@@ -1800,7 +1800,7 @@ handle_datasets(hid_t fid, const char *dset, void *data, int pe, const char *dis
} /* end if */
- H5Oget_info2(dsetid, &oinfo, 0);
+ H5Oget_info2(dsetid, &oinfo, H5O_INFO_BASIC);
if(oinfo.rc > 1 || hit_elink) {
obj_t *found_obj; /* Found object */
@@ -2101,7 +2101,7 @@ dump_extlink(hid_t group, const char *linkname, const char *objname)
goto fail;
/* Get object info */
- if (H5Oget_info2(oid, &oi, 0) < 0) {
+ if (H5Oget_info2(oid, &oi, H5O_INFO_BASIC) < 0) {
H5Oclose(oid);
goto fail;
}
diff --git a/tools/src/h5dump/h5dump_xml.c b/tools/src/h5dump/h5dump_xml.c
index 6c04aef..e399d8f 100644
--- a/tools/src/h5dump/h5dump_xml.c
+++ b/tools/src/h5dump/h5dump_xml.c
@@ -180,7 +180,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info_t *linfo, void H5_
H5O_info_t oinfo;
/* Stat the object */
- if(H5Oget_info_by_name2(group, name, &oinfo, 0, H5P_DEFAULT) < 0) {
+ if(H5Oget_info_by_name2(group, name, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0) {
error_msg("unable to get object information for \"%s\"\n", name);
h5tools_setstatus(EXIT_FAILURE);
ret = FAIL;
@@ -881,7 +881,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
obj_t *found_obj; /* Found object */
/* detect a shared datatype, output only once */
- H5Oget_info2(type, &oinfo, 0);
+ H5Oget_info2(type, &oinfo, H5O_INFO_BASIC);
found_obj = search_obj(type_table, oinfo.addr);
if(found_obj) {
@@ -1534,7 +1534,7 @@ xml_dump_datatype(hid_t type)
obj_t *found_obj; /* Found object */
/* Datatype is a shared or named datatype */
- H5Oget_info2(type, &oinfo, 0);
+ H5Oget_info2(type, &oinfo, H5O_INFO_BASIC);
found_obj = search_obj(type_table, oinfo.addr);
if(found_obj) {
@@ -2362,7 +2362,7 @@ xml_dump_named_datatype(hid_t type, const char *name)
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos, (size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
/* Check uniqueness of named datatype */
- H5Oget_info2(type, &oinfo, 0);
+ H5Oget_info2(type, &oinfo, H5O_INFO_BASIC);
if(oinfo.rc > 1) {
obj_t *found_obj; /* Found object */
@@ -2548,7 +2548,7 @@ xml_dump_group(hid_t gid, const char *name)
}
}
- H5Oget_info2(gid, &oinfo, 0);
+ H5Oget_info2(gid, &oinfo, H5O_INFO_BASIC);
if(oinfo.rc > 1) {
obj_t *found_obj; /* Found object */
diff --git a/tools/src/h5format_convert/h5format_convert.c b/tools/src/h5format_convert/h5format_convert.c
index cb1be4d..0fc0289 100644
--- a/tools/src/h5format_convert/h5format_convert.c
+++ b/tools/src/h5format_convert/h5format_convert.c
@@ -430,7 +430,7 @@ main(int argc, const char *argv[])
} else { /* Convert all datasets in the file */
if(verbose_g)
HDfprintf(stdout, "Processing all datasets in the file...\n");
- if(h5trav_visit(fid, "/", TRUE, TRUE, convert_dsets_cb, NULL, &fid, 0) < 0)
+ if(h5trav_visit(fid, "/", TRUE, TRUE, convert_dsets_cb, NULL, &fid, H5O_INFO_BASIC) < 0)
goto done;
} /* end else */
diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c
index 653438d..4bc1526 100644
--- a/tools/src/h5ls/h5ls.c
+++ b/tools/src/h5ls/h5ls.c
@@ -1320,7 +1320,7 @@ print_type(h5tools_str_t *buffer, hid_t type, int ind)
if(H5Tcommitted(type)) {
H5O_info_t oi;
- if(H5Oget_info2(type, &oi, 0) >= 0)
+ if(H5Oget_info2(type, &oi, H5O_INFO_BASIC) >= 0)
h5tools_str_append(buffer,"shared-%lu:"H5_PRINTF_HADDR_FMT" ",
oi.fileno, oi.addr);
else
@@ -2386,7 +2386,7 @@ visit_obj(hid_t file, const char *oname, iter_t *iter)
h5tools_str_reset(&buffer);
/* Retrieve info for object to list */
- if(H5Oget_info_by_name2(file, oname, &oi, H5O_INFO_TIME, H5P_DEFAULT) < 0) {
+ if(H5Oget_info_by_name2(file, oname, &oi, H5O_INFO_BASIC|H5O_INFO_TIME, H5P_DEFAULT) < 0) {
if(iter->symlink_target) {
h5tools_str_append(&buffer, "{**NOT FOUND**}\n");
iter->symlink_target = FALSE;
@@ -2414,7 +2414,7 @@ visit_obj(hid_t file, const char *oname, iter_t *iter)
iter->name_start = iter->base_len;
/* Specified name is a group. List the complete contents of the group. */
- h5trav_visit(file, oname, (hbool_t) (display_root_g || iter->symlink_target), recursive_g, list_obj, list_lnk, iter, H5O_INFO_TIME);
+ h5trav_visit(file, oname, (hbool_t) (display_root_g || iter->symlink_target), recursive_g, list_obj, list_lnk, iter, H5O_INFO_BASIC|H5O_INFO_TIME);
/* Close group */
if(!iter->symlink_target)
diff --git a/tools/src/h5repack/h5repack.c b/tools/src/h5repack/h5repack.c
index aa2d909..a63e56f 100644
--- a/tools/src/h5repack/h5repack.c
+++ b/tools/src/h5repack/h5repack.c
@@ -222,7 +222,7 @@ hid_t copy_named_datatype(hid_t type_in, hid_t fidout,
H5O_info_t oinfo; /* Object info of input dtype */
hid_t ret_value = -1; /* The identifier of the named dtype in the out file */
- if (H5Oget_info2(type_in, &oinfo, 0) < 0)
+ if (H5Oget_info2(type_in, &oinfo, H5O_INFO_BASIC) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Oget_info failed");
if (*named_dt_head_p) {
diff --git a/tools/src/h5repack/h5repack_refs.c b/tools/src/h5repack/h5repack_refs.c
index 80c98b5..a275443 100644
--- a/tools/src/h5repack/h5repack_refs.c
+++ b/tools/src/h5repack/h5repack_refs.c
@@ -807,7 +807,7 @@ MapIdToName(hid_t refobj_id, trav_table_t *travt)
H5O_info_t ref_oinfo; /* Stat for the refobj id */
/* obtain information to identify the referenced object uniquely */
- if(H5Oget_info2(refobj_id, &ref_oinfo, 0) < 0)
+ if(H5Oget_info2(refobj_id, &ref_oinfo, H5O_INFO_BASIC) < 0)
goto out;
if(ref_oinfo.addr == travt->objs[u].objno) {