1
5
mirror of https://github.com/vinc/moros.git synced 2024-06-14 05:06:39 +00:00
moros/src/usr/reboot.rs
Vincent Ollivier 18bfaf93d7
Add a reboot command (#328)
* Add a reboot command

* Add STOP syscall

* Add ctrl-alt-del reboot keys

* Add comment to keyboard shortcut
2022-04-12 09:55:53 +02:00

13 lines
391 B
Rust

use crate::usr;
use crate::api::syscall;
use crate::api::console::Style;
pub fn main(_args: &[&str]) -> usr::shell::ExitCode {
let csi_color = Style::color("Yellow");
let csi_reset = Style::reset();
println!("{}MOROS has reached its fate, the system is now rebooting.{}", csi_color, csi_reset);
syscall::sleep(0.5);
syscall::reboot();
loop { syscall::sleep(1.0) }
}