Skip to content

Commit 659f102

Browse files
committed
synthetic/import: ignore unknown attributes instead of failing
This avoids breaking backward compat when adding attributes in future releases. Signed-off-by: Brice Goglin <[email protected]>
1 parent 02eaabc commit 659f102

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

hwloc/topology-synthetic.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -387,10 +387,9 @@ hwloc_synthetic_parse_attrs(const char *attrs, const char **next_posp,
387387
attrs += index_string_length;
388388

389389
} else {
390-
if (verbose)
391-
fprintf(stderr, "Unknown attribute at '%s'\n", attrs);
392-
errno = EINVAL;
393-
return -1;
390+
size_t length = strcspn(attrs, " )");
391+
fprintf(stderr, "Ignoring unknown attribute at '%s'\n", attrs);
392+
attrs += length;
394393
}
395394

396395
if (' ' == *attrs)

0 commit comments

Comments
 (0)