Rename Inode::read_to_end to Inode::read_all

This commit is contained in:
LI Qing
2024-01-31 15:44:24 +09:00
committed by Tate, Hongliang Tian
parent 12d338dd9b
commit eb4161a56e
2 changed files with 4 additions and 4 deletions

View File

@ -75,9 +75,9 @@ impl InodeHandle_ {
}
let len = if self.status_flags().contains(StatusFlags::O_DIRECT) {
self.dentry.inode().read_direct_to_end(buf)?
self.dentry.inode().read_direct_all(buf)?
} else {
self.dentry.inode().read_to_end(buf)?
self.dentry.inode().read_all(buf)?
};
Ok(len)
}

View File

@ -355,7 +355,7 @@ impl dyn Inode {
(self as &dyn Any).downcast_ref::<T>()
}
pub fn read_to_end(&self, buf: &mut Vec<u8>) -> Result<usize> {
pub fn read_all(&self, buf: &mut Vec<u8>) -> Result<usize> {
if !self.type_().support_read() {
return_errno!(Errno::EISDIR);
}
@ -367,7 +367,7 @@ impl dyn Inode {
self.read_at(0, &mut buf[..file_size])
}
pub fn read_direct_to_end(&self, buf: &mut Vec<u8>) -> Result<usize> {
pub fn read_direct_all(&self, buf: &mut Vec<u8>) -> Result<usize> {
if !self.type_().support_read() {
return_errno!(Errno::EISDIR);
}