Skip to content

Commit a756668

Browse files
增加注释
1 parent 3f3ef9f commit a756668

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

kernel/src/filesystem/vfs/file.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,8 +408,7 @@ impl File {
408408
#[inline]
409409
pub fn readable(&self) -> Result<(), SystemError> {
410410
let mode = *self.mode.read();
411-
412-
// 检查是否是O_PATH文件描述符
411+
// 暂时认为只要不是write only, 就可读
413412
if mode == FileMode::O_WRONLY || mode.contains(FileMode::O_PATH) {
414413
return Err(SystemError::EBADF);
415414
}

0 commit comments

Comments
 (0)