Home
last modified time | relevance | path

Searched refs:FileMode (Results 1 – 21 of 21) sorted by relevance

/DragonOS-0.1.8/kernel/src/filesystem/vfs/
Dfile.rs36 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 …]
Dsyscall.rs16 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 …]
Dcore.rs24 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()
Dmount.rs10 use super::{file::FileMode, FilePrivateData, FileSystem, FileType, IndexNode, InodeId};
126 fn open(&self, data: &mut FilePrivateData, mode: &FileMode) -> Result<(), SystemError> { in open()
Dmod.rs16 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/
Dprocess.rs12 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()
Dexec.rs7 file::{File, FileMode},
165 let file = File::new(inode, FileMode::O_RDONLY)?; in load_binary_file()
/DragonOS-0.1.8/kernel/src/driver/tty/
Dtty_device.rs10 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/
Dsyscall.rs8 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()
Dpipe.rs137 _mode: &crate::filesystem::vfs::file::FileMode, in open() argument
/DragonOS-0.1.8/kernel/src/filesystem/devfs/
Dnull_dev.rs1 use crate::filesystem::vfs::file::FileMode;
72 fn open(&self, _data: &mut FilePrivateData, _mode: &FileMode) -> Result<(), SystemError> { in open()
Dzero_dev.rs1 use crate::filesystem::vfs::file::FileMode;
72 fn open(&self, _data: &mut FilePrivateData, _mode: &FileMode) -> Result<(), SystemError> { in open()
Dmod.rs7 file::FileMode,
346 _mode: &FileMode, in open() argument
/DragonOS-0.1.8/kernel/src/driver/disk/ahci/
Dahci_inode.rs2 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/
Dps2_keyboard.rs9 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/
Dmod.rs2 core::generate_inode_id, file::FileMode, FileSystem, FileType, FsInfo, IndexNode, Metadata,
159 _mode: &FileMode, in open() argument
/DragonOS-0.1.8/kernel/src/net/
Dsyscall.rs10 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()
Dsocket.rs1140 _mode: &crate::filesystem::vfs::file::FileMode, in open() argument
/DragonOS-0.1.8/kernel/src/syscall/
Dmod.rs12 file::FileMode,
421 let open_flags: FileMode = FileMode::from_bits_truncate(flags as u32); in handle()
/DragonOS-0.1.8/kernel/src/filesystem/procfs/
Dmod.rs26 file::{FileMode, FilePrivateData},
324 fn open(&self, data: &mut FilePrivateData, _mode: &FileMode) -> Result<(), SystemError> { in open()
/DragonOS-0.1.8/kernel/src/filesystem/fat/
Dfs.rs14 file::{FileMode, FilePrivateData},
1555 fn open(&self, _data: &mut FilePrivateData, _mode: &FileMode) -> Result<(), SystemError> { in open()