mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-29 14:33:25 +00:00
Add support for truncate syscall
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
31998d1cd4
commit
195c6a0739
@ -410,9 +410,14 @@ impl Dentry {
|
||||
self.inode.set_mode(mode)
|
||||
}
|
||||
|
||||
/// Get the inode length
|
||||
pub fn inode_len(&self) -> usize {
|
||||
self.inode.len()
|
||||
/// Gets the size of the inode
|
||||
pub fn inode_size(&self) -> usize {
|
||||
self.inode.size()
|
||||
}
|
||||
|
||||
/// Sets the size of the inode
|
||||
pub fn set_inode_size(&self, new_size: usize) -> Result<()> {
|
||||
self.inode.resize(new_size)
|
||||
}
|
||||
|
||||
/// Get the access timestamp
|
||||
|
Reference in New Issue
Block a user