diff --git a/pkg/fpga/pci_linux.go b/pkg/fpga/pci_linux.go index bdc58a1d2..d4800d70b 100644 --- a/pkg/fpga/pci_linux.go +++ b/pkg/fpga/pci_linux.go @@ -47,6 +47,7 @@ type PCIDevice struct { NUMA string VFs string TotalVFs string + Driver string PhysFn *PCIDevice } @@ -87,6 +88,9 @@ func NewPCIDevice(devPath string) (*PCIDevice, error) { if physFn, err := NewPCIDevice(filepath.Join(pci.SysFsPath, "physfn")); err == nil { pci.PhysFn = physFn } + if driver, err := filepath.EvalSymlinks(filepath.Join(pci.SysFsPath, "driver")); err == nil { + pci.Driver = filepath.Base(driver) + } return pci, nil } diff --git a/pkg/fpga/utils.go b/pkg/fpga/utils.go index 6ac3808c3..de300d598 100644 --- a/pkg/fpga/utils.go +++ b/pkg/fpga/utils.go @@ -35,7 +35,6 @@ func readFilesInDirectory(fileMap map[string]*string, dir string) error { continue case len(files) != 1: // doesn't match unique file, skip it - // fmt.Println("KAD2: ", files) continue } fname = files[0]