]> git.proxmox.com Git - pve-common.git/commitdiff
SysFSTools: change 'product' to 'device'
authorDominik Csapak <d.csapak@proxmox.com>
Mon, 21 Jun 2021 13:55:16 +0000 (15:55 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 21 Jun 2021 15:24:06 +0000 (17:24 +0200)
so it is more consistend with the source (it comes from the file
'device') as well as the subsytem_device field

the only place we use that field is in the same file in pci_dev_bind_to_vfio,
which we also change here, so that should not be a breaking change
(in qemu-server we only really use the existance and the has_fl_reset
flag)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
src/PVE/SysFSTools.pm

index 7875b269bb40fb720766ddb8e2585c7c308aee2f..e595128ab6a8d6192d445bc97012679a9d56eb86 100644 (file)
@@ -218,7 +218,7 @@ sub pci_device_info {
     $res = {
        name => $name,
        vendor => $vendor,
-       product => $product,
+       device => $product,
        domain => $domain,
        bus => $bus,
        slot => $slot,
@@ -274,7 +274,7 @@ sub pci_dev_bind_to_vfio {
     my $testdir = "$vfio_basedir/$name";
     return 1 if -d $testdir;
 
-    my $data = "$dev->{vendor} $dev->{product}";
+    my $data = "$dev->{vendor} $dev->{device}";
     return undef if !file_write("$vfio_basedir/new_id", $data);
 
     my $fn = "$pcisysfs/devices/$name/driver/unbind";