Skip to content

Commit

Permalink
Update libvfio API
Browse files Browse the repository at this point in the history
Signed-off-by: Evan Lezar <elezar@nvidia.com>
  • Loading branch information
elezar committed Apr 18, 2024
1 parent a9a6267 commit 6493b9d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions internal/cdi/lib-vfio.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func (l *vfiolib) GetGPUDeviceEdits(device.Device) (*cdi.ContainerEdits, error)
}

// GetGPUDeviceSpecs should not be called for vfiolib
func (l *vfiolib) GetGPUDeviceSpecs(int, device.Device) (*specs.Device, error) {
func (l *vfiolib) GetGPUDeviceSpecs(int, device.Device) ([]specs.Device, error) {
return nil, fmt.Errorf("unexpected call to vfiolib.GetGPUDeviceSpecs()")
}

Expand All @@ -102,6 +102,11 @@ func (l *vfiolib) GetMIGDeviceEdits(device.Device, device.MigDevice) (*cdi.Conta
}

// GetMIGDeviceSpecs should not be called for vfiolib
func (l *vfiolib) GetMIGDeviceSpecs(int, device.Device, int, device.MigDevice) (*specs.Device, error) {
func (l *vfiolib) GetMIGDeviceSpecs(int, device.Device, int, device.MigDevice) ([]specs.Device, error) {
return nil, fmt.Errorf("unexpected call to vfiolib.GetMIGDeviceSpecs()")
}

// GetDeviceSpecsByID should not be called for vfiolib.
func (l *vfiolib) GetDeviceSpecsByID(...string) ([]specs.Device, error) {
return nil, fmt.Errorf("unexpected call to vfiolib.GetDeviceSpecsByID()")
}

0 comments on commit 6493b9d

Please sign in to comment.