|
|
|
@ -2,7 +2,6 @@ use super::File;
|
|
|
|
|
use crate::mm::{UserBuffer};
|
|
|
|
|
use crate::sbi::console_getchar;
|
|
|
|
|
use crate::task::suspend_current_and_run_next;
|
|
|
|
|
use core::any::Any;
|
|
|
|
|
|
|
|
|
|
pub struct Stdin;
|
|
|
|
|
|
|
|
|
@ -29,7 +28,6 @@ impl File for Stdin {
|
|
|
|
|
fn write(&self, _user_buf: UserBuffer) -> usize {
|
|
|
|
|
panic!("Cannot write to stdin!");
|
|
|
|
|
}
|
|
|
|
|
fn as_any_ref(&self) -> &dyn Any { self }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl File for Stdout {
|
|
|
|
@ -42,5 +40,4 @@ impl File for Stdout {
|
|
|
|
|
}
|
|
|
|
|
user_buf.len()
|
|
|
|
|
}
|
|
|
|
|
fn as_any_ref(&self) -> &dyn Any { self }
|
|
|
|
|
}
|