mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-26 19:03:27 +00:00
Make special devices go to the FileIo
fast path
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
1b9b76d27c
commit
7ddb69f4db
@ -16,6 +16,10 @@ impl Device for Zero {
|
||||
// Same value with Linux
|
||||
DeviceId::new(1, 5)
|
||||
}
|
||||
|
||||
fn open(&self) -> Result<Option<Arc<dyn FileIo>>> {
|
||||
Ok(Some(Arc::new(Zero)))
|
||||
}
|
||||
}
|
||||
|
||||
impl FileIo for Zero {
|
||||
|
Reference in New Issue
Block a user