devices: log full anyhow::Error on sleep/snapshot/restore failures

Change-Id: I68cf0a57910415afbaa20dcf7617c36277630d5f
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4804687
Reviewed-by: Noah Gold <nkgold@google.com>
Reviewed-by: Elie Kheirallah <khei@google.com>
Commit-Queue: Frederick Mayle <fmayle@google.com>
This commit is contained in:
Frederick Mayle 2023-08-22 11:15:14 -07:00 committed by crosvm LUCI
parent 099cfa512e
commit e13baabc41

View file

@ -429,6 +429,7 @@ async fn handle_command_tube(
.context("failed to reply to sleep command")?;
}
Err(e) => {
error!("failed to sleep: {:#}", e);
command_tube
.send(VmResponse::ErrString(e.to_string()))
.await
@ -451,7 +452,7 @@ async fn handle_command_tube(
);
if let Err(e) = snapshot_handler(path.as_path(), &guest_memory, buses).await
{
error!("failed to snapshot: {}", e);
error!("failed to snapshot: {:#}", e);
command_tube
.send(VmResponse::ErrString(e.to_string()))
.await
@ -472,7 +473,7 @@ async fn handle_command_tube(
restore_handler(path.as_path(), &guest_memory, &[&*io_bus, &*mmio_bus])
.await
{
error!("failed to restore: {}", e);
error!("failed to restore: {:#}", e);
command_tube
.send(VmResponse::ErrString(e.to_string()))
.await