From 2c82e96a78d884c9aac8ea713a82f80d34e99b56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Mon, 25 Nov 2024 11:29:05 +0100 Subject: [PATCH] feat: add stable exit code message in non-Uhyve VMs --- src/syscalls/interfaces/mod.rs | 3 +++ src/syscalls/mod.rs | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/syscalls/interfaces/mod.rs b/src/syscalls/interfaces/mod.rs index 332a9360b9..3afa06dfdc 100644 --- a/src/syscalls/interfaces/mod.rs +++ b/src/syscalls/interfaces/mod.rs @@ -49,6 +49,9 @@ pub trait SyscallInterface: Send + Sync { } fn shutdown(&self, error_code: i32) -> ! { + // This is a stable message used for detecting exit codes for different hypervisors. + println!("exit status {error_code}"); + arch::processor::shutdown(error_code) } } diff --git a/src/syscalls/mod.rs b/src/syscalls/mod.rs index caddc0a6dd..db05feaf23 100644 --- a/src/syscalls/mod.rs +++ b/src/syscalls/mod.rs @@ -281,7 +281,6 @@ pub(crate) fn get_application_parameters() -> (i32, *const *const u8, *const *co pub(crate) fn shutdown(arg: i32) -> ! { // print some performance statistics crate::arch::kernel::print_statistics(); - info!("shutting down with code {arg}"); SYS.shutdown(arg) }