mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-01 02:55:45 +00:00
vmm: Make RngConfig owned
Convert Path to PathBuf and remove the associated lifetime. Fixes #298 Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
0688bec298
commit
5323da031c
@ -268,14 +268,14 @@ impl NetConfig {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct RngConfig<'a> {
|
pub struct RngConfig {
|
||||||
pub src: &'a Path,
|
pub src: PathBuf,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> RngConfig<'a> {
|
impl RngConfig {
|
||||||
pub fn parse(rng: &'a str) -> Result<Self> {
|
pub fn parse(rng: &str) -> Result<Self> {
|
||||||
Ok(RngConfig {
|
Ok(RngConfig {
|
||||||
src: Path::new(rng),
|
src: PathBuf::from(rng),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -615,7 +615,7 @@ pub struct VmConfig<'a> {
|
|||||||
pub cmdline: CmdlineConfig,
|
pub cmdline: CmdlineConfig,
|
||||||
pub disks: Option<Vec<DiskConfig>>,
|
pub disks: Option<Vec<DiskConfig>>,
|
||||||
pub net: Option<Vec<NetConfig>>,
|
pub net: Option<Vec<NetConfig>>,
|
||||||
pub rng: RngConfig<'a>,
|
pub rng: RngConfig,
|
||||||
pub fs: Option<Vec<FsConfig<'a>>>,
|
pub fs: Option<Vec<FsConfig<'a>>>,
|
||||||
pub pmem: Option<Vec<PmemConfig<'a>>>,
|
pub pmem: Option<Vec<PmemConfig<'a>>>,
|
||||||
pub serial: ConsoleConfig<'a>,
|
pub serial: ConsoleConfig<'a>,
|
||||||
|
Loading…
Reference in New Issue
Block a user