Fix the return value of `read_link` for ext2
This commit is contained in:
parent
d4872af3c7
commit
189daa2e09
|
|
@ -651,7 +651,7 @@ impl Inode {
|
|||
|
||||
pub fn read_link(&self) -> Result<String> {
|
||||
if self.type_ != InodeType::SymLink {
|
||||
return_errno!(Errno::EISDIR);
|
||||
return_errno_with_message!(Errno::EINVAL, "self is not symlink");
|
||||
}
|
||||
|
||||
let inner = self.inner.read();
|
||||
|
|
|
|||
Loading…
Reference in New Issue