From a184e31757839ee93b5566784967203a02b65caf Mon Sep 17 00:00:00 2001 From: Alexandre Courbot Date: Wed, 8 Dec 2021 13:18:27 +0900 Subject: [PATCH] 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 Reviewed-by: Chirantan Ekbote Tested-by: kokoro Commit-Queue: Alexandre Courbot --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 67fe94d60b..ecce75cc12 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2436,7 +2436,7 @@ iommu=on|off - indicates whether to enable virtio IOMMU for this device"), Ok(()) } Err(e) => { - error!("crosvm has exited with error: {}", e); + error!("crosvm has exited with error: {:#}", e); Err(()) } },