mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-11-04 19:11:11 +00:00
vmm: Make KernelConfig 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
9c5bfb8e13
commit
036890e5be
@ -172,14 +172,14 @@ impl MemoryConfig {
|
||||
}
|
||||
}
|
||||
|
||||
pub struct KernelConfig<'a> {
|
||||
pub path: &'a Path,
|
||||
pub struct KernelConfig {
|
||||
pub path: PathBuf,
|
||||
}
|
||||
|
||||
impl<'a> KernelConfig<'a> {
|
||||
pub fn parse(kernel: &'a str) -> Result<Self> {
|
||||
impl KernelConfig {
|
||||
pub fn parse(kernel: &str) -> Result<Self> {
|
||||
Ok(KernelConfig {
|
||||
path: Path::new(kernel),
|
||||
path: PathBuf::from(kernel),
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -611,7 +611,7 @@ impl<'a> VhostUserBlkConfig<'a> {
|
||||
pub struct VmConfig<'a> {
|
||||
pub cpus: CpusConfig,
|
||||
pub memory: MemoryConfig,
|
||||
pub kernel: KernelConfig<'a>,
|
||||
pub kernel: KernelConfig,
|
||||
pub cmdline: CmdlineConfig,
|
||||
pub disks: Option<Vec<DiskConfig<'a>>>,
|
||||
pub net: Option<Vec<NetConfig<'a>>>,
|
||||
|
Loading…
Reference in New Issue
Block a user