Update go-nvlib with new constructor

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar 2023-06-14 17:55:33 +02:00
parent bcf3a70174
commit c4d3b13ae2

View File

@ -71,8 +71,8 @@ func newAllPossible(logger logger.Interface, driverRoot string) (nodeLister, err
// DeviceNodes returns a list of all possible device nodes for NVIDIA GPUs, control devices, and capability devices. // DeviceNodes returns a list of all possible device nodes for NVIDIA GPUs, control devices, and capability devices.
func (m allPossible) DeviceNodes() ([]deviceNode, error) { func (m allPossible) DeviceNodes() ([]deviceNode, error) {
gpus, err := nvpci.NewFrom( gpus, err := nvpci.New(
filepath.Join(m.driverRoot, nvpci.PCIDevicesRoot), nvpci.WithPCIDevicesRoot(filepath.Join(m.driverRoot, nvpci.PCIDevicesRoot)),
).GetGPUs() ).GetGPUs()
if err != nil { if err != nil {
return nil, fmt.Errorf("failed to get GPU information: %v", err) return nil, fmt.Errorf("failed to get GPU information: %v", err)