sysfs tools: add 'nvidia' -> 'mdev' workaround to pci_device_info

We added it to the lspci one in commit dc023d6 ("SysFSTools: handle
new nvidia syfsapi as mdev"), but we'll also need it when querying a
single device.

code is the same as in the lspci sub

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [TL: reference commit explicitly]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Dominik Csapak 2025-02-13 14:16:57 +01:00 committed by Thomas Lamprecht
parent ad169fbd08
commit 0fcaeb39ec

View File

@ -280,6 +280,10 @@ sub pci_device_info {
if (-d "$devdir/mdev_supported_types") {
$res->{mdev} = 1;
} elsif (-d "$devdir/nvidia") {
# nvidia driver for kernel 6.8 or higher
$res->{mdev} = 1; # for api compatibility
$res->{nvidia} = 1;
}
}