Lines Matching refs:mode
71 mode: ModeType, field
98 mode: ModeType { bits: 0 }, in new()
129 pub fn open(path: &str, mode: FileMode) -> Result<usize, SystemError> { in open()
141 if mode.contains(FileMode::O_CREAT) in open()
142 && !mode.contains(FileMode::O_DIRECTORY) in open()
163 if mode.contains(FileMode::O_DIRECTORY) && file_type != FileType::Dir { in open()
168 if mode.contains(FileMode::O_TRUNC) in open()
169 && (mode.contains(FileMode::O_RDWR) || mode.contains(FileMode::O_WRONLY)) in open()
176 let mut file: File = File::new(inode, mode)?; in open()
179 if mode.contains(FileMode::O_APPEND) { in open()
333 pub fn mkdir(path: &str, mode: usize) -> Result<usize, SystemError> { in mkdir()
334 return do_mkdir(path, FileMode::from_bits_truncate(mode as u32)).map(|x| x as usize); in mkdir()
514 return Ok(file.mode().bits() as usize); in fcntl()
527 let mode = FileMode::from_bits(arg).ok_or(SystemError::EINVAL)?; in fcntl() localVariable
528 file.set_mode(mode)?; in fcntl()
599 kstat.mode.bits = metadata.mode; in do_fstat()
601 FileType::File => kstat.mode.insert(ModeType::S_IFMT), in do_fstat()
602 FileType::Dir => kstat.mode.insert(ModeType::S_IFDIR), in do_fstat()
603 FileType::BlockDevice => kstat.mode.insert(ModeType::S_IFBLK), in do_fstat()
604 FileType::CharDevice => kstat.mode.insert(ModeType::S_IFCHR), in do_fstat()
605 FileType::SymLink => kstat.mode.insert(ModeType::S_IFLNK), in do_fstat()
606 FileType::Socket => kstat.mode.insert(ModeType::S_IFSOCK), in do_fstat()
607 FileType::Pipe => kstat.mode.insert(ModeType::S_IFIFO), in do_fstat()