| 1827 | } |
| 1828 | |
| 1829 | QVector<Device> scanSystemDevices() { |
| 1830 | QVector<Device> out; |
| 1831 | QDir base("/sys/bus/pci/devices"); |
| 1832 | for (const QString &entry : base.entryList( |
| 1833 | QDir::Dirs | QDir::NoDotAndDotDot)) { |
| 1834 | QString path = base.absoluteFilePath(entry); |
| 1835 | QString cls = readHexId(path + "/class"); |
| 1836 | QString prefix2 = cls.left(2); |
| 1837 | if (prefix2 == "01" || prefix2 == "02" || prefix2 == "03" |
| 1838 | || prefix2 == "04" || cls.startsWith("0c03")) |
| 1839 | continue; |
| 1840 | |
| 1841 | Device d = makePciDevice(path); |
| 1842 | |
| 1843 | if (d.name.contains("Dummy", Qt::CaseInsensitive)) |
| 1844 | continue; |
| 1845 | if (d.name.contains("Placeholder", Qt::CaseInsensitive)) |
| 1846 | continue; |
| 1847 | |
| 1848 | d.rawLocation = entry; |
| 1849 | out.append(d); |
| 1850 | } |
| 1851 | return out; |
| 1852 | } |
| 1853 | |
| 1854 | QVector<Device> scanBlacklistedMissing( |
| 1855 | const QVector<DeviceCategory> &found) { |
no test coverage detected