/DragonOS-0.1.8/kernel/src/filesystem/vfs/ |
D | file.rs | 36 pub struct FileMode: u32{ 79 impl FileMode { impl 83 return self.bits() & FileMode::O_ACCMODE.bits(); in accmode() 93 mode: FileMode, 106 pub fn new(inode: Arc<dyn IndexNode>, mode: FileMode) -> Result<Self, SystemError> { in new() 225 if self.mode == FileMode::O_WRONLY { in readable() 236 if self.mode == FileMode::O_RDONLY { in writeable() 320 pub fn mode(&self) -> FileMode { in mode() argument 327 return self.mode.contains(FileMode::O_CLOEXEC); in close_on_exec() 334 self.mode.insert(FileMode::O_CLOEXEC); in set_close_on_exec() [all …]
|
D | syscall.rs | 16 file::{File, FileMode}, 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() 179 if mode.contains(FileMode::O_APPEND) { in open() 334 return do_mkdir(path, FileMode::from_bits_truncate(mode as u32)).map(|x| x as usize); in mkdir() 365 match do_unlink_at(&pathname, FileMode::from_bits_truncate(flags as u32)) { in unlinkat() [all …]
|
D | core.rs | 24 use super::{file::FileMode, utils::rsplit_path, IndexNode, InodeId}; 203 pub fn do_mkdir(path: &str, _mode: FileMode) -> Result<u64, SystemError> { in do_mkdir() 268 pub fn do_unlink_at(path: &str, _mode: FileMode) -> Result<u64, SystemError> { in do_unlink_at()
|
D | mount.rs | 10 use super::{file::FileMode, FilePrivateData, FileSystem, FileType, IndexNode, InodeId}; 126 fn open(&self, data: &mut FilePrivateData, mode: &FileMode) -> Result<(), SystemError> { in open()
|
D | mod.rs | 16 use self::{core::generate_inode_id, file::FileMode}; 93 fn open(&self, _data: &mut FilePrivateData, _mode: &FileMode) -> Result<(), SystemError> { in open()
|
/DragonOS-0.1.8/kernel/src/process/ |
D | process.rs | 12 file::{File, FileDescriptorVec, FileMode}, 360 File::new(tty_inode.clone(), FileMode::O_RDONLY).expect("Init stdio: can't create stdin"); in init_stdio() 362 File::new(tty_inode.clone(), FileMode::O_WRONLY).expect("Init stdio: can't create stdout"); in init_stdio() 363 let stderr = File::new(tty_inode.clone(), FileMode::O_WRONLY | FileMode::O_SYNC) in init_stdio()
|
D | exec.rs | 7 file::{File, FileMode}, 165 let file = File::new(inode, FileMode::O_RDONLY)?; in load_binary_file()
|
/DragonOS-0.1.8/kernel/src/driver/tty/ |
D | tty_device.rs | 10 vfs::{file::FileMode, FilePrivateData, FileType, IndexNode, Metadata, ROOT_INODE}, 120 fn open(&self, data: &mut FilePrivateData, mode: &FileMode) -> Result<(), SystemError> { in open() 125 if accmode == FileMode::O_RDONLY.accmode() { in open() 127 } else if accmode == FileMode::O_WRONLY.accmode() { in open() 128 if mode.contains(FileMode::O_SYNC) { in open()
|
/DragonOS-0.1.8/kernel/src/ipc/ |
D | syscall.rs | 8 filesystem::vfs::file::{File, FileMode}, 32 let read_file = File::new(pipe_ptr.clone(), FileMode::O_RDONLY)?; in pipe() 33 let write_file = File::new(pipe_ptr.clone(), FileMode::O_WRONLY)?; in pipe()
|
D | pipe.rs | 137 _mode: &crate::filesystem::vfs::file::FileMode, in open() argument
|
/DragonOS-0.1.8/kernel/src/filesystem/devfs/ |
D | null_dev.rs | 1 use crate::filesystem::vfs::file::FileMode; 72 fn open(&self, _data: &mut FilePrivateData, _mode: &FileMode) -> Result<(), SystemError> { in open()
|
D | zero_dev.rs | 1 use crate::filesystem::vfs::file::FileMode; 72 fn open(&self, _data: &mut FilePrivateData, _mode: &FileMode) -> Result<(), SystemError> { in open()
|
D | mod.rs | 7 file::FileMode, 346 _mode: &FileMode, in open() argument
|
/DragonOS-0.1.8/kernel/src/driver/disk/ahci/ |
D | ahci_inode.rs | 2 use crate::filesystem::vfs::file::FileMode; 78 fn open(&self, _data: &mut FilePrivateData, _mode: &FileMode) -> Result<(), SystemError> { in open()
|
/DragonOS-0.1.8/kernel/src/driver/keyboard/ |
D | ps2_keyboard.rs | 9 vfs::{core::generate_inode_id, file::FileMode, FileType, IndexNode, Metadata, PollStatus}, 126 _mode: &FileMode, in open() argument
|
/DragonOS-0.1.8/kernel/src/filesystem/sysfs/ |
D | mod.rs | 2 core::generate_inode_id, file::FileMode, FileSystem, FileType, FsInfo, IndexNode, Metadata, 159 _mode: &FileMode, in open() argument
|
/DragonOS-0.1.8/kernel/src/net/ |
D | syscall.rs | 10 file::{File, FileMode}, 59 let f = File::new(socketinode, FileMode::O_RDWR)?; in socket() 343 let new_fd = current_pcb().alloc_fd(File::new(new_socket, FileMode::O_RDWR)?, None)?; in accept()
|
D | socket.rs | 1140 _mode: &crate::filesystem::vfs::file::FileMode, in open() argument
|
/DragonOS-0.1.8/kernel/src/syscall/ |
D | mod.rs | 12 file::FileMode, 421 let open_flags: FileMode = FileMode::from_bits_truncate(flags as u32); in handle()
|
/DragonOS-0.1.8/kernel/src/filesystem/procfs/ |
D | mod.rs | 26 file::{FileMode, FilePrivateData}, 324 fn open(&self, data: &mut FilePrivateData, _mode: &FileMode) -> Result<(), SystemError> { in open()
|
/DragonOS-0.1.8/kernel/src/filesystem/fat/ |
D | fs.rs | 14 file::{FileMode, FilePrivateData}, 1555 fn open(&self, _data: &mut FilePrivateData, _mode: &FileMode) -> Result<(), SystemError> { in open()
|