vmm: Simplify list of parameters to Vm::new()

No need to provide a boolean to know if the VM is being restored given
we already have this information from the Option<Snapshot>.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf 2022-12-01 16:57:09 +01:00 committed by Bo Chen
parent d0c53a5357
commit a4160c1fef
2 changed files with 1 additions and 4 deletions

View File

@ -1260,7 +1260,6 @@ impl Vmm {
&self.seccomp_action,
self.hypervisor.clone(),
activate_evt,
true,
timestamp,
None,
None,

View File

@ -475,7 +475,6 @@ impl Vm {
seccomp_action: &SeccompAction,
hypervisor: Arc<dyn hypervisor::Hypervisor>,
activate_evt: EventFd,
restoring: bool,
timestamp: Instant,
serial_pty: Option<PtyPair>,
console_pty: Option<PtyPair>,
@ -490,7 +489,7 @@ impl Vm {
.validate()
.map_err(Error::ConfigValidation)?;
let load_payload_handle = if !restoring {
let load_payload_handle = if snapshot.is_none() {
Self::load_payload_async(&memory_manager, &config)?
} else {
None
@ -796,7 +795,6 @@ impl Vm {
seccomp_action,
hypervisor,
activate_evt,
snapshot.is_some(),
timestamp,
serial_pty,
console_pty,