From a94259e9ddec8fcbfa5b97d3eeff82dff25c15b4 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Fri, 25 Aug 2023 08:17:55 +0200 Subject: [PATCH] graphics() improve vendor parsing (linux) --- lib/graphics.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/graphics.js b/lib/graphics.js index 82e0bac..2664d8f 100644 --- a/lib/graphics.js +++ b/lib/graphics.js @@ -228,7 +228,12 @@ function graphics(callback) { let i = 1; lines.forEach((line) => { let subsystem = ''; - if (i < lines.length && lines[i]) { subsystem = lines[i]; } // get next line; + if (i < lines.length && lines[i]) { // get next line; + subsystem = lines[i]; + if (subsystem.indexOf(':') > 0) { + subsystem = subsystem.split(':')[1]; + } + } if ('' !== line.trim()) { if (' ' !== line[0] && '\t' !== line[0]) { // first line of new entry let isExternal = (pciIDs.indexOf(line.split(' ')[0]) >= 0);