Home
last modified time | relevance | path

Searched refs:File (Results 1 – 25 of 25) sorted by relevance

/DragonOS-0.1.9/docs/kernel/filesystem/vfs/
Ddesign.md16 File │ │
41 ## 1. File
42   File结构体是VFS中最基本的抽象,它代表了一个打开的文件。每当进程打开了一个文件,就会创建一个File结构体,用于维护该文件的状态信息。
Dindex.rst11 - 提供文件抽象(File
/DragonOS-0.1.9/kernel/src/process/
Dprocess.rs5 file::{File, FileMode},
36 File::new(tty_inode.clone(), FileMode::O_RDONLY).expect("Init stdio: can't create stdin"); in stdio_init()
38 File::new(tty_inode.clone(), FileMode::O_WRONLY).expect("Init stdio: can't create stdout"); in stdio_init()
39 let stderr = File::new(tty_inode.clone(), FileMode::O_WRONLY | FileMode::O_SYNC) in stdio_init()
Dexec.rs9 file::{File, FileMode},
97 file: File,
123 let file = File::new(inode, FileMode::O_RDONLY)?; in new()
158 pub fn file_mut(&mut self) -> &mut File { in file_mut() argument
/DragonOS-0.1.9/docs/kernel/filesystem/
Doverview.md17 - 文件抽象(File
33File
78 - 提供文件抽象(File
/DragonOS-0.1.9/kernel/src/filesystem/vfs/
Dopen.rs11 file::{File, FileMode},
116 FileType::File, in do_sys_openat2()
136 let mut file: File = File::new(inode, how.o_flags)?; in do_sys_openat2()
146 && file_type == FileType::File in do_sys_openat2()
Dfile.rs120 pub struct File { struct
133 impl File { impl
150 let mut f = File { in new()
401 pub fn try_clone(&self) -> Option<File> { in try_clone() argument
520 impl Drop for File { implementation
539 fds: Vec<Option<Arc<SpinLock<File>>>>,
594 pub fn alloc_fd(&mut self, file: File, fd: Option<i32>) -> Result<i32, SystemError> { in alloc_fd() argument
622 pub fn get_file_by_fd(&self, fd: i32) -> Option<Arc<SpinLock<File>>> { in get_file_by_fd() argument
686 type Item = (i32, Arc<SpinLock<File>>);
Dmod.rs36 File, enumerator
96 FileType::File => DT_REG, in get_file_type_num()
561 file_type: FileType::File, in default()
Dsyscall.rs27 file::{File, FileMode},
835 FileType::File => kstat.mode.insert(ModeType::S_IFREG), in do_fstat()
953 let mut file = File::new(inode, FileMode::O_RDONLY)?; in readlink_at()
/DragonOS-0.1.9/tools/debugging/logmonitor/src/backend/monitor/
Dlogset.rs1 use std::{collections::BTreeMap, fmt::Debug, fs::File, io::Write, path::PathBuf};
19 log_file: Option<File>,
28 let log_file = File::create(&file_path).expect("Failed to create log file."); in new()
Dmm.rs2 fs::File,
157 let mut file: File; in run()
181 fn process_logs(&self, kmem_file: &mut File, channel_header: &ObjectWrapper<MMLogChannel<1>>) { in process_logs() argument
229 fn open_kmem_file(&self) -> std::io::Result<std::fs::File> { in open_kmem_file() argument
233 fn load_header(&self, kmem_file: &mut File) -> ObjectWrapper<MMLogChannel<1>> { in load_header()
/DragonOS-0.1.9/kernel/src/virt/kvm/
Dkvm_dev.rs5 file::{File, FileMode},
184 let file: File = File::new(vm_inode, FileMode::O_RDWR)?; in kvm_dev_ioctl_create_vm()
Dvm_dev.rs5 file::{File, FileMode},
220 let file: File = File::new(vcpu_inode, FileMode::O_RDWR)?; in kvm_vm_ioctl_create_vcpu()
/DragonOS-0.1.9/kernel/src/filesystem/sysfs/
Dmod.rs64 File(SysKernFilePriv), enumerator
71 SysFSKernPrivateData::File(file) => { in callback_read()
85 SysFSKernPrivateData::File(file) => { in callback_write()
Dfile.rs154 let sys_priv = SysFSKernPrivateData::File(SysKernFilePriv::new(&kobj, Some(attr), None)); in add_file_with_mode()
266 SysFSKernPrivateData::File(SysKernFilePriv::new(&kobj, None, Some(attr.clone()))); in add_bin_file_with_mode()
/DragonOS-0.1.9/kernel/src/net/event_poll/
Dmod.rs16 file::{File, FileMode},
79 file: Weak<SpinLock<File>>,
87 file: Weak<SpinLock<File>>, in new() argument
105 pub fn file(&self) -> Weak<SpinLock<File>> { in file() argument
241 let mut ep_file = File::new( in do_create_epoll()
583 fn is_epoll_file(file: &Arc<SpinLock<File>>) -> bool { in is_epoll_file()
592 dst_file: Arc<SpinLock<File>>, in ep_insert() argument
633 dst_file: Option<Arc<SpinLock<File>>>, in ep_remove() argument
/DragonOS-0.1.9/kernel/src/ipc/
Dsyscall.rs11 file::{File, FileMode},
47 let mut read_file = File::new( in pipe2()
54 let mut write_file = File::new( in pipe2()
/DragonOS-0.1.9/kernel/src/filesystem/kernfs/
Dmod.rs328 if self.inode_type != KernInodeType::File { in read_at()
353 if self.inode_type != KernInodeType::File { in write_at()
478 KernInodeType::File, in add_file()
631 File, enumerator
639 KernInodeType::File => FileType::File, in into()
/DragonOS-0.1.9/kernel/src/filesystem/fat/
Dfs.rs119 FATDirEntry::File(f) | FATDirEntry::VolId(f) => { in update_metadata()
177 FileType::File in new()
1375 FATDirEntry::File(f) | FATDirEntry::VolId(f) => { in read_at()
1405 FATDirEntry::File(f) | FATDirEntry::VolId(f) => { in write_at()
1431 FATDirEntry::File(_) | FATDirEntry::VolId(_) => { in create()
1435 FileType::File => { in create()
1471 FATDirEntry::File(file) | FATDirEntry::VolId(file) => { in resize()
1519 FATDirEntry::File(_) | FATDirEntry::VolId(_) => { in list()
1589 FATDirEntry::File(_) | FATDirEntry::VolId(_) => { in unlink()
1616 FATDirEntry::File(_) | FATDirEntry::VolId(_) => { in rmdir()
[all …]
Dentry.rs42 File(FATFile), enumerator
1216 return FATDirEntry::File(file); in to_dir_entry()
1257 return FATDirEntry::File(file); in to_dir_entry_with_long_name()
1628 FATDirEntry::File(f) | FATDirEntry::VolId(f) => { in short_name()
1646 FATDirEntry::File(f) => { in short_dir_entry()
1662 FATDirEntry::File(f) => { in first_cluster()
1680 FATDirEntry::File(f) => Some(f.loc), in get_dir_range()
1690 FATDirEntry::File(f) => {
1716 FATDirEntry::File(f) => { in name()
1732 &FATDirEntry::File(_) | &FATDirEntry::VolId(_) => true, in is_file()
[all …]
/DragonOS-0.1.9/kernel/src/filesystem/procfs/
Dmod.rs332 FileType::File, in new()
347 let binding = inode.create("kmsg", FileType::File, ModeType::from_bits_truncate(0o444)); in new()
377 FileType::File, in register_pid()
537 if inode.metadata.file_type == FileType::File { in resize()
/DragonOS-0.1.9/kernel/src/net/
Dsyscall.rs10 file::{File, FileMode},
52 let f = File::new(socketinode, FileMode::O_RDWR)?; in socket()
91 let file = File::new(socketinode, FileMode::O_RDWR)?; in socketpair()
434 .alloc_fd(File::new(new_socket, file_mode)?, None)?; in do_accept()
/DragonOS-0.1.9/build-scripts/kernel_build/src/kconfig/
Dmod.rs47 let mut file = fs::File::create("D.config").expect("Failed to create file: D.config"); in make_compile_cfg()
/DragonOS-0.1.9/kernel/src/filesystem/ramfs/
Dmod.rs244 if inode.metadata.file_type == FileType::File { in resize()
489 return Ok(self.create(filename, FileType::File, mode)?); in mknod()
/DragonOS-0.1.9/kernel/src/libs/
Delf.rs20 filesystem::vfs::file::File,
546 let interpreter: Option<File> = None; in load()