crosvm: display error chain when VM fails

Use the '{:#}' formatter to display the complete error chain. This turns
the following error:

	crosvm has exited with error: failed to set up virtio networking

into the more helpful:

	crosvm has exited with error: failed to set up virtio
	networking: failed to open tap device: failed to create tap
	interface: Operation not permitted (os error 1)

BUG=None
TEST=cargo build

Change-Id: I65126af54a9a3cef7823e55c021dcd591660077a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3320913
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
This commit is contained in:
Alexandre Courbot 2021-12-08 13:18:27 +09:00 committed by Commit Bot
parent 31bc5998bb
commit a184e31757

View file

@ -2436,7 +2436,7 @@ iommu=on|off - indicates whether to enable virtio IOMMU for this device"),
Ok(()) Ok(())
} }
Err(e) => { Err(e) => {
error!("crosvm has exited with error: {}", e); error!("crosvm has exited with error: {:#}", e);
Err(()) Err(())
} }
}, },