Among attributes of a PCIe bridge upstream port of a discrete graphics card, there are three AER statistics attributes: aer_dev_correctable, aer_dev_nonfatal and aer_dev_fatal. Each consists of a number of key- value pairs, while the library now expects only single value attributes. That affects formatting of lsgpu -p output. In order to print that data correctly in a human readable form, extra formatting effort would be needed. However, users of lsgpu, the only call site of that printing function of the igt_device_scan library, are not necessarily interested in that data. Just drop those attributes from the printout.
Signed-off-by: Janusz Krzysztofik <[email protected]> --- lib/igt_device_scan.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/igt_device_scan.c b/lib/igt_device_scan.c index 61f507a06d..7c58ab84e8 100644 --- a/lib/igt_device_scan.c +++ b/lib/igt_device_scan.c @@ -623,6 +623,12 @@ static void dump_props_and_attrs(const struct igt_device *dev) !strcmp(entry->key, "current_link_width"))) continue; + /* omit multi-line AER statistics data */ + if (!strcmp(entry->key, "aer_dev_correctable") || + !strcmp(entry->key, "aer_dev_nonfatal") || + !strcmp(entry->key, "aer_dev_fatal")) + continue; + _print_key_value((char *)entry->key, (char *)entry->data); } printf("\n"); -- 2.52.0
