vmm: Make vhost-user configuration owned

Convert Path to PathBuf, &str to String and remove the associated lifetime.

Fixes #298

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
Samuel Ortiz
2019-09-23 19:42:52 +02:00
committed by Rob Bradford
parent 5f8a62f3d0
commit 3dc7aff00e
5 changed files with 23 additions and 23 deletions
+3 -3
View File
@@ -46,10 +46,10 @@ pub struct Blk {
interrupt_cb: Option<Arc<VirtioInterrupt>>,
}
impl<'a> Blk {
impl Blk {
/// Create a new vhost-user-blk device
pub fn new(wce: bool, vu_cfg: VhostUserConfig<'a>) -> Result<Blk> {
let mut vhost_user_blk = Master::connect(vu_cfg.sock, vu_cfg.num_queues as u64)
pub fn new(wce: bool, vu_cfg: VhostUserConfig) -> Result<Blk> {
let mut vhost_user_blk = Master::connect(&vu_cfg.sock, vu_cfg.num_queues as u64)
.map_err(Error::VhostUserCreateMaster)?;
// Filling device and vring features VMM supports.