mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-23 01:13:23 +00:00
Add sys_fallocate
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
8dc08dccba
commit
8dce83605f
@ -8,7 +8,7 @@ use crate::{
|
||||
events::{IoEvents, Observer},
|
||||
fs::{
|
||||
device::Device,
|
||||
utils::{AccessMode, InodeMode, IoctlCmd, Metadata, SeekFrom, StatusFlags},
|
||||
utils::{AccessMode, FallocMode, InodeMode, IoctlCmd, Metadata, SeekFrom, StatusFlags},
|
||||
},
|
||||
net::socket::Socket,
|
||||
prelude::*,
|
||||
@ -98,6 +98,10 @@ pub trait FileLike: Pollable + Send + Sync + Any {
|
||||
return_errno_with_message!(Errno::ESPIPE, "seek is not supported");
|
||||
}
|
||||
|
||||
fn fallocate(&self, mode: FallocMode, offset: usize, len: usize) -> Result<()> {
|
||||
return_errno_with_message!(Errno::EOPNOTSUPP, "fallocate is not supported");
|
||||
}
|
||||
|
||||
fn register_observer(
|
||||
&self,
|
||||
observer: Weak<dyn Observer<IoEvents>>,
|
||||
|
Reference in New Issue
Block a user