graphics() improve vendor parsing (linux)

This commit is contained in:
Sebastian Hildebrandt 2023-08-25 08:17:55 +02:00
parent fc06a0e671
commit a94259e9dd

View File

@ -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);