Skip to content

Commit e3a51b9

Browse files
committed
Mark shutdown_qemu as diverging
Signed-off-by: SlyMarbo <[email protected]>
1 parent 606a634 commit e3a51b9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

kernel/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,12 @@ pub fn exit_qemu(exit_code: QemuExitCode) {
170170
/// to instruct QEMU to shut down successfully.
171171
///
172172
#[doc(hidden)]
173-
pub fn shutdown_qemu() {
173+
pub fn shutdown_qemu() -> ! {
174174
unsafe {
175175
x86_64::instructions::port::Port::new(0x604).write(0x2000u16);
176176
}
177+
178+
unreachable!("instruction to exit QEMU returned somehow");
177179
}
178180

179181
#[cfg(test)]

0 commit comments

Comments
 (0)