mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-02 02:02:24 +00:00
devices: remove unused functions
cleanup: remove ununsed device interface function "GetDeviceInfo()" Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
This commit is contained in:
parent
1b062b3db4
commit
daf5abce2d
@ -48,8 +48,6 @@ type Device interface {
|
|||||||
// DeviceType indicates which kind of device it is
|
// DeviceType indicates which kind of device it is
|
||||||
// e.g. block, vfio or vhost user
|
// e.g. block, vfio or vhost user
|
||||||
DeviceType() config.DeviceType
|
DeviceType() config.DeviceType
|
||||||
// GetDeviceInfo returns device information that the device is created based on
|
|
||||||
GetDeviceInfo() *config.DeviceInfo
|
|
||||||
// GetDeviceDrive returns device specific data used for hotplugging by hypervisor
|
// GetDeviceDrive returns device specific data used for hotplugging by hypervisor
|
||||||
// Caller could cast the return value to device specific struct
|
// Caller could cast the return value to device specific struct
|
||||||
// e.g. Block device returns *config.BlockDrive and
|
// e.g. Block device returns *config.BlockDrive and
|
||||||
|
@ -112,11 +112,6 @@ func (device *BlockDevice) DeviceID() string {
|
|||||||
return device.ID
|
return device.ID
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetDeviceInfo returns device information that the device is created based on
|
|
||||||
func (device *BlockDevice) GetDeviceInfo() *config.DeviceInfo {
|
|
||||||
return device.DeviceInfo
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetDeviceDrive returns device information used for creating
|
// GetDeviceDrive returns device information used for creating
|
||||||
func (device *BlockDevice) GetDeviceDrive() interface{} {
|
func (device *BlockDevice) GetDeviceDrive() interface{} {
|
||||||
return device.BlockDrive
|
return device.BlockDrive
|
||||||
|
@ -50,11 +50,6 @@ func (device *GenericDevice) DeviceType() config.DeviceType {
|
|||||||
return config.DeviceGeneric
|
return config.DeviceGeneric
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetDeviceInfo returns device information that the device is created based on
|
|
||||||
func (device *GenericDevice) GetDeviceInfo() *config.DeviceInfo {
|
|
||||||
return device.DeviceInfo
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetDeviceDrive returns device information used for creating
|
// GetDeviceDrive returns device information used for creating
|
||||||
func (device *GenericDevice) GetDeviceDrive() interface{} {
|
func (device *GenericDevice) GetDeviceDrive() interface{} {
|
||||||
return device.DeviceInfo
|
return device.DeviceInfo
|
||||||
|
@ -104,11 +104,6 @@ func (device *VFIODevice) DeviceID() string {
|
|||||||
return device.ID
|
return device.ID
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetDeviceInfo returns device information that the device is created based on
|
|
||||||
func (device *VFIODevice) GetDeviceInfo() *config.DeviceInfo {
|
|
||||||
return device.DeviceInfo
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetDeviceDrive returns device information used for creating
|
// GetDeviceDrive returns device information used for creating
|
||||||
func (device *VFIODevice) GetDeviceDrive() interface{} {
|
func (device *VFIODevice) GetDeviceDrive() interface{} {
|
||||||
return device.vfioDrives
|
return device.vfioDrives
|
||||||
|
@ -67,11 +67,6 @@ func (device *VhostUserBlkDevice) DeviceType() config.DeviceType {
|
|||||||
return config.VhostUserBlk
|
return config.VhostUserBlk
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetDeviceInfo returns device information that the device is created based on
|
|
||||||
func (device *VhostUserBlkDevice) GetDeviceInfo() *config.DeviceInfo {
|
|
||||||
return device.DeviceInfo
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetDeviceDrive returns device information used for creating
|
// GetDeviceDrive returns device information used for creating
|
||||||
func (device *VhostUserBlkDevice) GetDeviceDrive() interface{} {
|
func (device *VhostUserBlkDevice) GetDeviceDrive() interface{} {
|
||||||
device.Type = device.DeviceType()
|
device.Type = device.DeviceType()
|
||||||
|
@ -67,11 +67,6 @@ func (device *VhostUserNetDevice) DeviceType() config.DeviceType {
|
|||||||
return config.VhostUserNet
|
return config.VhostUserNet
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetDeviceInfo returns device information that the device is created based on
|
|
||||||
func (device *VhostUserNetDevice) GetDeviceInfo() *config.DeviceInfo {
|
|
||||||
return device.DeviceInfo
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetDeviceDrive returns device information used for creating
|
// GetDeviceDrive returns device information used for creating
|
||||||
func (device *VhostUserNetDevice) GetDeviceDrive() interface{} {
|
func (device *VhostUserNetDevice) GetDeviceDrive() interface{} {
|
||||||
device.Type = device.DeviceType()
|
device.Type = device.DeviceType()
|
||||||
|
@ -67,11 +67,6 @@ func (device *VhostUserSCSIDevice) DeviceType() config.DeviceType {
|
|||||||
return config.VhostUserSCSI
|
return config.VhostUserSCSI
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetDeviceInfo returns device information that the device is created based on
|
|
||||||
func (device *VhostUserSCSIDevice) GetDeviceInfo() *config.DeviceInfo {
|
|
||||||
return device.DeviceInfo
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetDeviceDrive returns device information used for creating
|
// GetDeviceDrive returns device information used for creating
|
||||||
func (device *VhostUserSCSIDevice) GetDeviceDrive() interface{} {
|
func (device *VhostUserSCSIDevice) GetDeviceDrive() interface{} {
|
||||||
device.Type = device.DeviceType()
|
device.Type = device.DeviceType()
|
||||||
|
Loading…
Reference in New Issue
Block a user