aboutsummaryrefslogtreecommitdiff
path: root/vm_control/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vm_control/src/lib.rs')
-rw-r--r--vm_control/src/lib.rs38
1 files changed, 0 insertions, 38 deletions
diff --git a/vm_control/src/lib.rs b/vm_control/src/lib.rs
index 9c989b43c..895664f4f 100644
--- a/vm_control/src/lib.rs
+++ b/vm_control/src/lib.rs
@@ -324,15 +324,6 @@ pub enum SnapshotCommand {
},
}
-/// Commands for restore feature
-#[derive(Serialize, Deserialize, Debug)]
-pub enum RestoreCommand {
- Apply {
- restore_path: PathBuf,
- require_encrypted: bool,
- },
-}
-
/// Commands for actions on devices and the devices control thread.
#[derive(Serialize, Deserialize, Debug)]
pub enum DeviceControlCommand {
@@ -1337,8 +1328,6 @@ pub enum VmRequest {
HotPlugNetCommand(NetControlCommand),
/// Command to Snapshot devices
Snapshot(SnapshotCommand),
- /// Command to Restore devices
- Restore(RestoreCommand),
/// Register for event notification
#[cfg(feature = "registered_events")]
RegisterListener {
@@ -1627,14 +1616,12 @@ impl VmRequest {
usb_control_tube: Option<&Tube>,
bat_control: &mut Option<BatControl>,
kick_vcpus: impl Fn(VcpuControl),
- kick_vcpu: impl Fn(VcpuControl, usize),
force_s2idle: bool,
#[cfg(feature = "swap")] swap_controller: Option<&swap::SwapController>,
device_control_tube: &Tube,
vcpu_size: usize,
irq_handler_control: &Tube,
snapshot_irqchip: impl Fn() -> anyhow::Result<serde_json::Value>,
- restore_irqchip: impl FnMut(serde_json::Value) -> anyhow::Result<()>,
) -> VmResponse {
match *self {
VmRequest::Exit => {
@@ -1991,31 +1978,6 @@ impl VmRequest {
}
}
}
- VmRequest::Restore(RestoreCommand::Apply {
- ref restore_path,
- require_encrypted,
- }) => {
- info!("Starting crosvm restore");
- match do_restore(
- restore_path.clone(),
- kick_vcpus,
- kick_vcpu,
- irq_handler_control,
- device_control_tube,
- vcpu_size,
- restore_irqchip,
- require_encrypted,
- ) {
- Ok(()) => {
- info!("Finished crosvm restore successfully");
- VmResponse::Ok
- }
- Err(e) => {
- error!("failed to handle restore: {:?}", e);
- VmResponse::Err(SysError::new(EIO))
- }
- }
- }
#[cfg(feature = "registered_events")]
VmRequest::RegisterListener {
socket_addr: _,