diff --git a/src/main.rs b/src/main.rs index b40aba6..055ef07 100644 --- a/src/main.rs +++ b/src/main.rs @@ -42,7 +42,14 @@ fn init_rootfs() { for (src, target, fstype, flags, data) in args { match system::syscall::mount(src, target, fstype, flags, Some(data)) { Ok(())=> eprintln!("Mounted {target}"), - Err(e)=> eprintln!("Bad mount: {e}"), + Err(e)=> { + eprintln!("Error: {e}"); + let mut opt = Some(&e as &dyn std::error::Error); + while let Some(current_source) = opt { + eprintln!("Caused by: {current_source}"); + opt = current_source.source(); + } + }, } } } @@ -52,7 +59,7 @@ fn init() -> Result<()> { init_rootfs(); - init_console(); + init_console()?; platform::aws::Aws.init().unwrap(); std::thread::sleep(std::time::Duration::from_secs(500));