mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-03 03:15:20 +00:00
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:
parent
d0c53a5357
commit
a4160c1fef
@ -1260,7 +1260,6 @@ impl Vmm {
|
|||||||
&self.seccomp_action,
|
&self.seccomp_action,
|
||||||
self.hypervisor.clone(),
|
self.hypervisor.clone(),
|
||||||
activate_evt,
|
activate_evt,
|
||||||
true,
|
|
||||||
timestamp,
|
timestamp,
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
|
@ -475,7 +475,6 @@ impl Vm {
|
|||||||
seccomp_action: &SeccompAction,
|
seccomp_action: &SeccompAction,
|
||||||
hypervisor: Arc<dyn hypervisor::Hypervisor>,
|
hypervisor: Arc<dyn hypervisor::Hypervisor>,
|
||||||
activate_evt: EventFd,
|
activate_evt: EventFd,
|
||||||
restoring: bool,
|
|
||||||
timestamp: Instant,
|
timestamp: Instant,
|
||||||
serial_pty: Option<PtyPair>,
|
serial_pty: Option<PtyPair>,
|
||||||
console_pty: Option<PtyPair>,
|
console_pty: Option<PtyPair>,
|
||||||
@ -490,7 +489,7 @@ impl Vm {
|
|||||||
.validate()
|
.validate()
|
||||||
.map_err(Error::ConfigValidation)?;
|
.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)?
|
Self::load_payload_async(&memory_manager, &config)?
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
@ -796,7 +795,6 @@ impl Vm {
|
|||||||
seccomp_action,
|
seccomp_action,
|
||||||
hypervisor,
|
hypervisor,
|
||||||
activate_evt,
|
activate_evt,
|
||||||
snapshot.is_some(),
|
|
||||||
timestamp,
|
timestamp,
|
||||||
serial_pty,
|
serial_pty,
|
||||||
console_pty,
|
console_pty,
|
||||||
|
Loading…
Reference in New Issue
Block a user