From 57426c93c9da052b6c030abb8259ae2d8d7b8553 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Mon, 18 Oct 2021 10:08:42 +0200 Subject: [PATCH] sysfs tools: indentation + text-width fixes Signed-off-by: Thomas Lamprecht --- src/PVE/SysFSTools.pm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/PVE/SysFSTools.pm b/src/PVE/SysFSTools.pm index e595128..8b26599 100644 --- a/src/PVE/SysFSTools.pm +++ b/src/PVE/SysFSTools.pm @@ -304,15 +304,14 @@ sub pci_dev_group_bind_to_vfio { # get IOMMU group devices opendir(my $D, "$pcisysfs/devices/$pciid/iommu_group/devices/") || die "Cannot open iommu_group: $!\n"; - my @devs = grep /^[0-9a-f]{4}:/, readdir($D); + my @devs = grep /^[0-9a-f]{4}:/, readdir($D); closedir($D); foreach my $pciid (@devs) { $pciid =~ m/^([:\.0-9a-f]+)$/ or die "PCI ID $pciid not valid!\n"; - # pci bridges, switches or root ports are not supported - # they have a pci_bus subdirectory so skip them - next if (-e "$pcisysfs/devices/$pciid/pci_bus"); + # PCI bridges, switches or root-ports aren't supported and all have a pci_bus dir we can test + next if (-e "$pcisysfs/devices/$pciid/pci_bus"); my $info = pci_device_info($1); pci_dev_bind_to_vfio($info) || die "Cannot bind $pciid to vfio\n";