Make special devices go to the FileIo fast path

This commit is contained in:
Shaowei Song
2024-09-03 03:38:19 +00:00
committed by Tate, Hongliang Tian
parent 1b9b76d27c
commit 7ddb69f4db
5 changed files with 19 additions and 2 deletions

View File

@ -16,6 +16,10 @@ impl Device for Null {
// Same value with Linux
DeviceId::new(1, 3)
}
fn open(&self) -> Result<Option<Arc<dyn FileIo>>> {
Ok(Some(Arc::new(Null)))
}
}
impl FileIo for Null {