mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-23 01:13:23 +00:00
Avoid duplicate wait_events
methods
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
6e8896165d
commit
ab9941263b
@ -12,11 +12,11 @@ use crate::{
|
||||
},
|
||||
net::socket::Socket,
|
||||
prelude::*,
|
||||
process::{signal::Poller, Gid, Uid},
|
||||
process::{signal::Pollable, Gid, Uid},
|
||||
};
|
||||
|
||||
/// The basic operations defined on a file
|
||||
pub trait FileLike: Send + Sync + Any {
|
||||
pub trait FileLike: Pollable + Send + Sync + Any {
|
||||
fn read(&self, buf: &mut [u8]) -> Result<usize> {
|
||||
return_errno_with_message!(Errno::EINVAL, "read is not supported");
|
||||
}
|
||||
@ -50,10 +50,6 @@ pub trait FileLike: Send + Sync + Any {
|
||||
return_errno_with_message!(Errno::EINVAL, "ioctl is not supported");
|
||||
}
|
||||
|
||||
fn poll(&self, _mask: IoEvents, _poller: Option<&Poller>) -> IoEvents {
|
||||
IoEvents::empty()
|
||||
}
|
||||
|
||||
fn resize(&self, new_size: usize) -> Result<()> {
|
||||
return_errno_with_message!(Errno::EINVAL, "resize is not supported");
|
||||
}
|
||||
|
Reference in New Issue
Block a user