mirror of
https://github.com/google/alioth.git
synced 2024-11-24 12:16:48 +00:00
feat(vfio): add parameter type for legacy VFIO API
Signed-off-by: Changyuan Lyu <changyuanl@google.com>
This commit is contained in:
parent
c33baf4c61
commit
2bb4de20e7
2 changed files with 11 additions and 0 deletions
|
@ -60,3 +60,13 @@ pub struct VfioParam {
|
||||||
/// Path to the iommu device. [default: /dev/iommu]
|
/// Path to the iommu device. [default: /dev/iommu]
|
||||||
pub dev_iommu: Option<Box<Path>>,
|
pub dev_iommu: Option<Box<Path>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Deserialize, Help)]
|
||||||
|
pub struct VfioParamLegacy {
|
||||||
|
/// Path to a VFIO group file, e.g. /dev/vfio/12.
|
||||||
|
pub group: Box<Path>,
|
||||||
|
/// Device ID, e.g. 0000:06:0d.0.
|
||||||
|
pub device: Box<str>,
|
||||||
|
/// Path to the vfio device. [default: /dev/vfio/vfio]
|
||||||
|
pub dev_vfio: Option<Box<Path>>,
|
||||||
|
}
|
||||||
|
|
|
@ -76,6 +76,7 @@ impl_help_for_types!(Bool, bool);
|
||||||
impl_help_for_types!(
|
impl_help_for_types!(
|
||||||
String,
|
String,
|
||||||
&str,
|
&str,
|
||||||
|
Box<str>,
|
||||||
String,
|
String,
|
||||||
CStr,
|
CStr,
|
||||||
CString,
|
CString,
|
||||||
|
|
Loading…
Reference in a new issue