summaryrefslogtreecommitdiffstats
path: root/modules-available/statistics/pages
diff options
context:
space:
mode:
authorSimon Rettberg2022-04-27 16:15:32 +0200
committerSimon Rettberg2022-04-27 16:15:32 +0200
commitc3ad4b3179a97bf22261d95fb4db67de77e1f173 (patch)
treeaa5d8cdf1e8d44cc054c2a297ae23f8e2c8c69f1 /modules-available/statistics/pages
parent[passthrough] Fix permission name (diff)
downloadslx-admin-c3ad4b3179a97bf22261d95fb4db67de77e1f173.tar.gz
slx-admin-c3ad4b3179a97bf22261d95fb4db67de77e1f173.tar.xz
slx-admin-c3ad4b3179a97bf22261d95fb4db67de77e1f173.zip
[statistics] Honor pci device revision for passthrough display
Diffstat (limited to 'modules-available/statistics/pages')
-rw-r--r--modules-available/statistics/pages/machine.inc.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/modules-available/statistics/pages/machine.inc.php b/modules-available/statistics/pages/machine.inc.php
index 0d91b017..798a5a83 100644
--- a/modules-available/statistics/pages/machine.inc.php
+++ b/modules-available/statistics/pages/machine.inc.php
@@ -103,13 +103,14 @@ class SubPage
'locationid', $locations);
$hw->addGlobalColumn('vendor');
$hw->addGlobalColumn('device');
+ $hw->addGlobalColumn('rev');
$res = $hw->query();
foreach ($res as $row) {
- $devId = $row['vendor'] . ':' . $row['device'];
+ $devId = $row['vendor'] . ':' . $row['device'] . ':' . $row['rev'];
if (!isset($passthroughTypes[$devId])) {
$passthroughTypes[$devId] = [];
}
- $passthroughTypes[$devId][] = $row['@PASSTHROUGH'];
+ $passthroughTypes[$devId][$row['@PASSTHROUGH']] = $row['@PASSTHROUGH'];
}
}
// 2) Sort and mangle list
@@ -125,8 +126,8 @@ class SubPage
$pciLookup[$devId] = true;
}
// Passthrough enabled?
- if (isset($passthroughTypes[$devId])) {
- $item['pt'] = implode(', ', $passthroughTypes[$devId]);
+ if (isset($passthroughTypes[$devId . ':' . $item['rev']])) {
+ $item['pt'] = implode(', ', $passthroughTypes[$devId . ':' . $item['rev']]);
}
$class = $item['class'];
if ($class === '0300' || $class === '0200' || $class === '0403' || !empty($item['pt'])) {