mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-23 01:13:23 +00:00
Remove clean_for_close
/flush
in FileLike
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
f57dcd814a
commit
c320552ae1
@ -54,10 +54,6 @@ pub trait FileLike: Pollable + Send + Sync + Any {
|
||||
return_errno_with_message!(Errno::EINVAL, "resize is not supported");
|
||||
}
|
||||
|
||||
fn flush(&self) -> Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn metadata(&self) -> Metadata {
|
||||
panic!("metadata unsupported");
|
||||
}
|
||||
@ -102,11 +98,6 @@ pub trait FileLike: Pollable + Send + Sync + Any {
|
||||
return_errno_with_message!(Errno::ESPIPE, "seek is not supported");
|
||||
}
|
||||
|
||||
fn clean_for_close(&self) -> Result<()> {
|
||||
self.flush()?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn register_observer(
|
||||
&self,
|
||||
observer: Weak<dyn Observer<IoEvents>>,
|
||||
|
Reference in New Issue
Block a user