This commit is contained in:
HaiQiu1998 2024-05-22 17:32:51 +08:00 committed by Tate, Hongliang Tian
parent e4954827dc
commit 85e292ce7e
2 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,7 @@ impl InodeType {
)
}
pub fn is_reguler_file(&self) -> bool {
pub fn is_regular_file(&self) -> bool {
*self == InodeType::File
}

View File

@ -73,7 +73,7 @@ pub fn check_executable_file(dentry: &Arc<Dentry>) -> Result<()> {
return_errno_with_message!(Errno::EISDIR, "the file is a directory");
}
if !dentry.type_().is_reguler_file() {
if !dentry.type_().is_regular_file() {
return_errno_with_message!(Errno::EACCES, "the dentry is not a regular file");
}