diff --git a/vmm/src/config.rs b/vmm/src/config.rs index 8f4ac0138..eabd877fd 100644 --- a/vmm/src/config.rs +++ b/vmm/src/config.rs @@ -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 { +impl KernelConfig { + pub fn parse(kernel: &str) -> Result { 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>>, pub net: Option>>,