feat(kernel): console cap gates DebugPutchar, no uart fast path; spawn start arg in a0; delegate returns slot
This commit is contained in:
@@ -4,8 +4,11 @@ struct Writer;
|
||||
|
||||
impl fmt::Write for Writer {
|
||||
fn write_str(&mut self, s: &str) -> fmt::Result {
|
||||
for &b in s.as_bytes() {
|
||||
crate::syscall::debug_putchar(b);
|
||||
// Without a console capability, output goes nowhere.
|
||||
if let Some(console) = crate::start::console() {
|
||||
for &b in s.as_bytes() {
|
||||
crate::syscall::debug_putchar(console, b);
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user