SysFSTools: change 'product' to 'device'

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>
This commit is contained in:
Dominik Csapak 2021-06-21 15:55:16 +02:00 committed by Thomas Lamprecht
parent aa59b1121c
commit 9d065c72fb

View File

@ -218,7 +218,7 @@ sub pci_device_info {
$res = { $res = {
name => $name, name => $name,
vendor => $vendor, vendor => $vendor,
product => $product, device => $product,
domain => $domain, domain => $domain,
bus => $bus, bus => $bus,
slot => $slot, slot => $slot,
@ -274,7 +274,7 @@ sub pci_dev_bind_to_vfio {
my $testdir = "$vfio_basedir/$name"; my $testdir = "$vfio_basedir/$name";
return 1 if -d $testdir; 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); return undef if !file_write("$vfio_basedir/new_id", $data);
my $fn = "$pcisysfs/devices/$name/driver/unbind"; my $fn = "$pcisysfs/devices/$name/driver/unbind";