/DragonOS/docs/kernel/filesystem/vfs/ |
H A D | design.md | 16 File │ │ 41 ## 1. File 42   File结构体是VFS中最基本的抽象,它代表了一个打开的文件。每当进程打开了一个文件,就会创建一个File结构体,用于维护该文件的状态信息。
|
H A D | index.rst | 11 - 提供文件抽象(File)
|
/DragonOS/kernel/src/process/ |
H A D | stdio.rs | 6 file::{File, FileMode}, 28 File::new(tty_inode.clone(), FileMode::O_RDONLY).expect("Init stdio: can't create stdin"); in stdio_init() 30 File::new(tty_inode.clone(), FileMode::O_WRONLY).expect("Init stdio: can't create stdout"); in stdio_init() 31 let stderr = File::new(tty_inode.clone(), FileMode::O_WRONLY | FileMode::O_SYNC) in stdio_init()
|
H A D | exec.rs | 9 file::{File, FileMode}, 98 file: File, 124 let file = File::new(inode, FileMode::O_RDONLY)?; in new() 159 pub fn file_mut(&mut self) -> &mut File { in file_mut() argument
|
/DragonOS/user/apps/test-blockcache/src/ |
H A D | main.rs | 1 use std::fs::File; 6 let mut file = File::create("large_file")?; in main() 9 let mut file = File::open("large_file")?; in main()
|
/DragonOS/docs/kernel/filesystem/ |
H A D | overview.md | 17 - 文件抽象(File) 33 │ File │ 78 - 提供文件抽象(File)
|
/DragonOS/tools/debugging/logmonitor/src/backend/monitor/ |
H A D | logset.rs | 1 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()
|
H A D | mm.rs | 2 fs::File, 157 let 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/kernel/src/bpf/prog/ |
H A D | mod.rs | 8 use crate::filesystem::vfs::file::{File, FileMode}; 77 file_type: FileType::File, in metadata() 120 let file = File::new(Arc::new(prog), FileMode::O_RDWR)?; in bpf_prog_load()
|
/DragonOS/kernel/src/perf/ |
H A D | kprobe.rs | 8 use crate::filesystem::vfs::file::{File, PageCache}; 36 pub fn do_set_bpf_prog(&self, prog_file: Arc<File>) -> Result<()> { in do_set_bpf_prog() 124 fn set_bpf_prog(&self, bpf_prog: Arc<File>) -> Result<()> { in set_bpf_prog()
|
H A D | mod.rs | 5 use crate::filesystem::vfs::file::{File, FileMode, PageCache}; 41 fn set_bpf_prog(&self, _bpf_prog: Arc<File>) -> Result<()> { in set_bpf_prog() 143 file_type: FileType::File, in metadata() 307 let file = File::new(perf_event, file_mode)?; in perf_event_open()
|
/DragonOS/kernel/src/filesystem/vfs/ |
H A D | file.rs | 198 pub struct File { struct 213 impl File { argument 227 let f = File { in new() 501 pub fn try_clone(&self) -> Option<File> { in try_clone() argument 636 impl Drop for File { implementation 655 fds: Vec<Option<Arc<File>>>, 721 pub fn alloc_fd(&mut self, file: File, fd: Option<i32>) -> Result<i32, SystemError> { in alloc_fd() argument 747 pub fn get_file_by_fd(&self, fd: i32) -> Option<Arc<File>> { in get_file_by_fd() argument 759 pub fn drop_fd(&mut self, fd: i32) -> Result<Arc<File>, SystemError> { in drop_fd() argument 804 type Item = (i32, Arc<File>);
|
H A D | open.rs | 7 file::{File, FileMode}, 197 FileType::File, in do_sys_openat2() 216 let file: File = File::new(inode, how.o_flags)?; in do_sys_openat2() 226 && file_type == FileType::File in do_sys_openat2()
|
/DragonOS/kernel/src/virt/kvm/ |
H A D | kvm_dev.rs | 6 file::{File, FileMode}, 190 let file: File = File::new(vm_inode, FileMode::O_RDWR)?; in kvm_dev_ioctl_create_vm()
|
H A D | vm_dev.rs | 6 file::{File, FileMode}, 226 let file: File = File::new(vcpu_inode, FileMode::O_RDWR)?; in kvm_vm_ioctl_create_vcpu()
|
/DragonOS/kernel/src/filesystem/sysfs/ |
H A D | mod.rs | 64 File(SysKernFilePriv), enumerator 71 SysFSKernPrivateData::File(file) => { in callback_read() 85 SysFSKernPrivateData::File(file) => { in callback_write()
|
/DragonOS/kernel/src/net/event_poll/ |
H A D | mod.rs | 17 file::{File, FileMode}, 86 file: Weak<File>, 94 file: Weak<File>, in new() argument 112 pub fn file(&self) -> Weak<File> { in file() argument 254 let mut ep_file = File::new( in do_create_epoll() 594 fn is_epoll_file(file: &Arc<File>) -> bool { in is_epoll_file() 603 dst_file: Arc<File>, in ep_insert() argument 642 dst_file: Option<Arc<File>>, in ep_remove() argument
|
/DragonOS/kernel/crates/rbpf/examples/ |
H A D | to_json.rs | 61 let file = match elf::File::open_path(path) { in main()
|
H A D | load_elf.rs | 54 let file = match elf::File::open_path(path) { in main()
|
/DragonOS/user/apps/test-chown/src/ |
H A D | main.rs | 9 fs::{self, metadata, File}, 91 let mut file = File::create(filename)?; in main()
|
/DragonOS/kernel/src/filesystem/ |
H A D | eventfd.rs | 1 use crate::filesystem::vfs::file::{File, FileMode}; 218 file_type: FileType::File, in metadata() 275 let file = File::new(inode, filemode)?; in sys_eventfd()
|
/DragonOS/kernel/src/filesystem/kernfs/ |
H A D | mod.rs | 344 if self.inode_type != KernInodeType::File { in read_at() 369 if self.inode_type != KernInodeType::File { in write_at() 494 KernInodeType::File, in add_file() 647 File, enumerator 655 KernInodeType::File => FileType::File, in from()
|
/DragonOS/kernel/src/filesystem/fat/ |
H A D | fs.rs | 136 FATDirEntry::File(f) | FATDirEntry::VolId(f) => { in update_metadata() 196 FileType::File in new() 1398 FATDirEntry::File(f) | FATDirEntry::VolId(f) => { in read_at() 1428 FATDirEntry::File(f) | FATDirEntry::VolId(f) => { in write_at() 1454 FATDirEntry::File(_) | FATDirEntry::VolId(_) => { in create() 1458 FileType::File => { in create() 1504 FATDirEntry::File(file) | FATDirEntry::VolId(file) => { in resize() 1556 FATDirEntry::File(_) | FATDirEntry::VolId(_) => { in list() 1630 FATDirEntry::File(_) | FATDirEntry::VolId(_) => { in unlink() 1657 FATDirEntry::File(_) | FATDirEntry::VolId(_) => { in rmdir() [all …]
|
H A D | entry.rs | 42 File(FATFile), enumerator 1263 return FATDirEntry::File(file); in convert_to_dir_entry() 1305 return FATDirEntry::File(file); in convert_to_dir_entry_with_long_name() 1676 FATDirEntry::File(f) | FATDirEntry::VolId(f) => { in short_name() 1694 FATDirEntry::File(f) => { in short_dir_entry() 1710 FATDirEntry::File(f) => { in first_cluster() 1728 FATDirEntry::File(f) => Some(f.loc), in get_dir_range() 1738 FATDirEntry::File(f) => { 1764 FATDirEntry::File(f) => { in name() 1779 matches!(self, &FATDirEntry::File(_) | &FATDirEntry::VolId(_)) in is_file() [all …]
|
/DragonOS/user/apps/user-manage/src/executor/ |
H A D | executor.rs | 7 fs::{self, File, OpenOptions}, 18 passwd_file: File, 19 shadow_file: File, 20 group_file: File, 21 gshadow_file: File, 39 fn open_file(file_path: &str) -> File { in open_file() argument 724 fn read_to_string(mut file: &File) -> String { in read_to_string()
|