device: add GetHostPath() to generic device

`GetHostPath()` method returns the device path in the host, this way the
runtime can get the device information for updating the sandbox's device
cgroup.

Signed-off-by: Julio Montes <julio.montes@intel.com>
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
This commit is contained in:
Julio Montes
2020-05-26 00:26:33 -07:00
committed by Peng Tao
parent 83f116b483
commit 387d3d34dc
3 changed files with 24 additions and 0 deletions

View File

@@ -56,6 +56,9 @@ type Device interface {
// GetMajorMinor returns major and minor numbers
GetMajorMinor() (int64, int64)
// GetHostPath return the device path in the host
GetHostPath() string
// GetDeviceInfo returns device specific data used for hotplugging by hypervisor
// Caller could cast the return value to device specific struct
// e.g. Block device returns *config.BlockDrive,