Skip to content

Commit

Permalink
core: don't report an big OS error when the insert comes from the user
Browse files Browse the repository at this point in the history
If the "reason" for inserting an object is NULL, dont report
a big user-visible OS error warning. Just let the caller warn
when it gets an error code and if it wants to warn.
That's what lstopo --ps does when it fails to insert a group
for attaching a Misc for showing task binding.

Valentin properly handled this case during the callback->reason
conversion but I removed it mistake when I pushed all this as
commit 0dce1af

Thanks to Philippe Swartvagher for the report.

Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
  • Loading branch information
bgoglin committed Sep 29, 2020
1 parent b478b5f commit e4c4e57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hwloc/topology.c
Expand Up @@ -111,7 +111,7 @@ static void report_insert_error(hwloc_obj_t new, hwloc_obj_t old, const char *ms
report_insert_error_format_obj(newstr, sizeof(newstr), new);
report_insert_error_format_obj(oldstr, sizeof(oldstr), old);

if (!reported && !hwloc_hide_errors()) {
if (reason && !reported && !hwloc_hide_errors()) {
fprintf(stderr, "****************************************************************************\n");
fprintf(stderr, "* hwloc %s received invalid information from the operating system.\n", HWLOC_VERSION);
fprintf(stderr, "*\n");
Expand Down

0 comments on commit e4c4e57

Please sign in to comment.