mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
bin: Share VFIO device syntax between cloud-hypervisor and ch-remote
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
@@ -904,6 +904,8 @@ pub struct DeviceConfig {
|
||||
}
|
||||
|
||||
impl DeviceConfig {
|
||||
pub const SYNTAX: &'static str =
|
||||
"Direct device assignment parameters \"path=<device_path>,iommu=on|off,id=<device_id>\"";
|
||||
pub fn parse(device: &str) -> Result<Self> {
|
||||
// Split the parameters based on the comma delimiter
|
||||
let params_list: Vec<&str> = device.split(',').collect();
|
||||
|
||||
Reference in New Issue
Block a user