summaryrefslogtreecommitdiffstats
path: root/modules-available/statistics/inc/hardwareparser.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2021-09-21 16:52:06 +0200
committerSimon Rettberg2021-09-21 16:52:06 +0200
commit0156024a414ea1503e539cb2a30d05a422d4cd16 (patch)
treea92eb114deb3a0e44252a2c3d90928b5c6a673d1 /modules-available/statistics/inc/hardwareparser.inc.php
parent[statistics] Query builder WIP (diff)
downloadslx-admin-0156024a414ea1503e539cb2a30d05a422d4cd16.tar.gz
slx-admin-0156024a414ea1503e539cb2a30d05a422d4cd16.tar.xz
slx-admin-0156024a414ea1503e539cb2a30d05a422d4cd16.zip
Passthrough WIP
Diffstat (limited to 'modules-available/statistics/inc/hardwareparser.inc.php')
-rw-r--r--modules-available/statistics/inc/hardwareparser.inc.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/modules-available/statistics/inc/hardwareparser.inc.php b/modules-available/statistics/inc/hardwareparser.inc.php
index d356e226..87dcc4cf 100644
--- a/modules-available/statistics/inc/hardwareparser.inc.php
+++ b/modules-available/statistics/inc/hardwareparser.inc.php
@@ -308,29 +308,29 @@ class HardwareParser
foreach ($out as $entry) {
if (!isset($pci[$entry['class']])) {
$class = 'c.' . $entry['class'];
- $res = Page_Statistics::getPciId('CLASS', $class);
- if ($res === false || $res['dateline'] < $NOW) {
+ $res = PciId::getPciId('CLASS', $class);
+ if ($res === false) {
$pci[$entry['class']]['lookupClass'] = 'do-lookup';
$pci[$entry['class']]['class'] = $class;
} else {
- $pci[$entry['class']]['class'] = $res['value'];
+ $pci[$entry['class']]['class'] = $res;
}
}
$new = array(
'ven' => $entry['ven'],
'dev' => $entry['ven'] . ':' . $entry['dev'],
);
- $res = Page_Statistics::getPciId('VENDOR', $new['ven']);
- if ($res === false || $res['dateline'] < $NOW) {
+ $res = PciId::getPciId('VENDOR', $new['ven']);
+ if ($res === false) {
$new['lookupVen'] = 'do-lookup';
} else {
- $new['ven'] = $res['value'];
+ $new['ven'] = $res;
}
- $res = Page_Statistics::getPciId('DEVICE', $new['dev']);
- if ($res === false || $res['dateline'] < $NOW) {
+ $res = PciId::getPciId('DEVICE', $new['dev']);
+ if ($res === false) {
$new['lookupDev'] = 'do-lookup';
} else {
- $new['dev'] = $res['value'] . ' (' . $new['dev'] . ')';
+ $new['dev'] = $res . ' (' . $new['dev'] . ')';
}
$pci[$entry['class']]['entries'][] = $new;
}
@@ -717,7 +717,7 @@ class HardwareParser
$hwid = self::writeGlobalHardwareData(HardwareInfo::PCI_DEVICE,
self::propsFromArray($dev, 'vendor', 'device', 'rev', 'class'));
$mappingId = self::writeLocalHardwareData($uuid, $hwid, $dev['slot'] ?? 'unknown',
- self::propsFromArray($dev, 'slot', 'subsystem', 'subsystem_vendor'));
+ self::propsFromArray($dev, 'slot', 'subsystem', 'subsystem_vendor', 'iommu_group'));
$pciHwIds[] = $mappingId;
}
self::markDisconnected($uuid, HardwareInfo::PCI_DEVICE, $pciHwIds);