/DragonOS/user/apps/test-blockcache/src/ |
H A D | main.rs | 6 let mut file = File::create("large_file")?; in main() localVariable 7 file.seek(std::io::SeekFrom::Start(file_size_bytes - 1))?; in main() 8 file.write_all(&[0])?; in main() 9 let mut file = File::open("large_file")?; in main() localVariable 15 file.seek(SeekFrom::Start(0))?; in main() 16 let bytes_read = file.read_exact(&mut buffer)?; in main()
|
/DragonOS/docs/kernel/filesystem/vfs/ |
H A D | design.md | 27 … MountFS │ Maintain the mount tree and handle the mounting of file systems. │ 28 … │ │ In particular, it handles the "crossing file system boundaries" condition │ 37 xxxFSInode │ Implement corresponding operations based on different file systems │
|
/DragonOS/kernel/src/bpf/prog/ |
H A D | mod.rs | 8 use crate::filesystem::vfs::file::{File, FileMode}; 104 let file = Arc::from_raw(*ptr as *const u8 as *const BpfMap); in drop() localVariable 105 drop(file) in drop() 120 let file = File::new(Arc::new(prog), FileMode::O_RDWR)?; in bpf_prog_load() localVariable 121 let fd = fd_table.write().alloc_fd(file, None).map(|x| x as usize)?; in bpf_prog_load()
|
H A D | verifier.rs | 5 use crate::filesystem::vfs::file::FileDescriptorVec; 57 let file = fd_table in relocation() localVariable 61 let bpf_map = file in relocation()
|
/DragonOS/kernel/src/filesystem/vfs/ |
H A D | syscall.rs | 13 filesystem::vfs::{core as Vcore, file::FileDescriptorVec}, 28 file::{File, FileMode}, 545 let file = fd_table_guard in ioctl() localVariable 551 let r = file.inode().ioctl(cmd, data, &file.private_data.lock()); in ioctl() 566 let file = fd_table_guard.get_file_by_fd(fd); in read() localVariable 567 if file.is_none() { in read() 572 let file = file.unwrap(); in read() localVariable 574 return file.read(buf.len(), buf); in read() 588 let file = fd_table_guard in write() localVariable 594 return file.write(buf.len(), buf); in write() [all …]
|
H A D | file.rs | 680 if let Some(file) = &self.fds[i] { in clone() 681 if let Some(file) = file.try_clone() { in clone() 682 res.fds[i] = Some(Arc::new(file)); in clone() 721 pub fn alloc_fd(&mut self, file: File, fd: Option<i32>) -> Result<i32, SystemError> { in alloc_fd() 725 *x = Some(Arc::new(file)); in alloc_fd() 734 self.fds[i] = Some(Arc::new(file)); in alloc_fd() 763 let file = self.fds[fd as usize].take().unwrap(); in drop_fd() localVariable 764 return Ok(file); in drop_fd() 774 if let Some(file) = &self.fds[i] { in close_on_exec() 775 let to_drop = file.close_on_exec(); in close_on_exec() [all …]
|
H A D | open.rs | 7 file::{File, FileMode}, 216 let file: File = File::new(inode, how.o_flags)?; in do_sys_openat2() localVariable 220 file.lseek(SeekFrom::SeekEnd(0))?; in do_sys_openat2() 228 file.ftruncate(0)?; in do_sys_openat2() 234 .alloc_fd(file, None) in do_sys_openat2() 269 let file = fd_table_guard localVariable 272 file.inode()
|
H A D | utils.rs | 53 let file = fd_table_guard in user_path_at() localVariable 61 if file.file_type() != FileType::Dir { in user_path_at() 65 inode = file.inode(); in user_path_at()
|
/DragonOS/kernel/src/filesystem/sysfs/ |
H A D | mod.rs | 3 use self::{dir::SysKernDirPriv, file::SysKernFilePriv}; 19 pub mod file; module 71 SysFSKernPrivateData::File(file) => { in callback_read() 72 let len = file.callback_read(buf, offset)?; in callback_read() 85 SysFSKernPrivateData::File(file) => { in callback_write() 86 return file.callback_write(buf, offset); in callback_write()
|
/DragonOS/kernel/src/perf/ |
H A D | mod.rs | 5 use crate::filesystem::vfs::file::{File, FileMode, PageCache}; 169 let file = fd_table in ioctl() localVariable 173 self.event.set_bpf_prog(file)?; in ioctl() 307 let file = File::new(perf_event, file_mode)?; in perf_event_open() localVariable 309 let fd = fd_table.write().alloc_fd(file, None).map(|x| x as usize)?; in perf_event_open() 314 let file = get_perf_event_file(fd)?; in perf_event_output() localVariable 315 let bpf_event_file = file.deref().deref(); in perf_event_output() 322 file.epoll_callback()?; in perf_event_output() 328 let file = fd_table in get_perf_event_file() localVariable 332 let event = file in get_perf_event_file()
|
H A D | kprobe.rs | 8 use crate::filesystem::vfs::file::{File, PageCache}; 37 let file = prog_file in do_set_bpf_prog() localVariable 41 let prog_slice = file.insns(); in do_set_bpf_prog() 47 let callback = Box::new(KprobePerfCallBack::new(file, vm)); in do_set_bpf_prog()
|
/DragonOS/kernel/src/net/event_poll/ |
H A D | mod.rs | 17 file::{File, FileMode}, 86 file: Weak<File>, field 94 file: Weak<File>, in new() 100 file, in new() 112 pub fn file(&self) -> Weak<File> { in file() method 113 self.file.clone() in file() 122 let file = self.file.upgrade(); in ep_item_poll() localVariable 123 if file.is_none() { in ep_item_poll() 126 if let Ok(events) = file.unwrap().poll() { in ep_item_poll() 210 let file = ProcessManager::current_pcb() in close() localVariable [all …]
|
/DragonOS/kernel/src/libs/ |
H A D | printk.rs | 125 record.file().unwrap_or(""), in iodisplay() 138 record.file().unwrap_or(""), in kernel_log() 147 record.file().unwrap_or(""), in kernel_log() 156 record.file().unwrap_or(""), in kernel_log() 165 record.file().unwrap_or(""), in kernel_log()
|
H A D | elf.rs | 12 file::FileHeader, 21 filesystem::vfs::file::File, 64 if ehdr.class != elf::file::Class::ELF64 { in inner_probe_common() 331 let file = param.file_mut(); in do_load_file() localVariable 332 if (file.metadata()?.size as usize) < offset_in_file + size { in do_load_file() 340 file.lseek(SeekFrom::SeekSet(offset_in_file as i64))?; in do_load_file() 344 file.read(read_size, &mut buf[..read_size])?; in do_load_file() 379 ehdr: &elf::file::FileHeader<AnyEndian>, in create_auxv() 404 let ident = elf::file::parse_ident::<AnyEndian>(ident_buf)?; in parse_ehdr() 408 elf::file::Class::ELF32 => tail_start + elf::file::ELF32_EHDR_TAILSIZE, in parse_ehdr() [all …]
|
/DragonOS/tools/ |
H A D | write_disk_image.sh | 44 GRUB_PATH_I386_LEGACY_FILE=${GRUB_ABS_PREFIX}/arch/i386/legacy/grub/bin/grub-file 51 for file in ${bins[*]};do 52 if [ ! -x $file ]; then 53 echo "$file 不存在!"
|
H A D | .gdbinit | 2 file bin/kernel/kernel.elf
|
/DragonOS/kernel/crates/rbpf/examples/ |
H A D | to_json.rs | 61 let file = match elf::File::open_path(path) { in main() localVariable 66 let text_scn = match file.get_section(".classifier") { in main()
|
H A D | load_elf.rs | 54 let file = match elf::File::open_path(path) { in main() localVariable 59 let text_scn = match file.get_section(".classifier") { in main()
|
/DragonOS/tools/qemu/ |
H A D | ifup-nat | 56 --conf-file="" \ 57 --pid-file=/var/run/qemu-dhcp-$BRIDGE.pid \
|
/DragonOS/user/apps/test_sqlite3/ |
H A D | main.c | 77 void file() in file() function 97 file(); in main()
|
/DragonOS/kernel/src/process/ |
H A D | exec.rs | 9 file::{File, FileMode}, 98 file: File, field 124 let file = File::new(inode, FileMode::O_RDONLY)?; in new() localVariable 127 file, in new() 160 &mut self.file in file_mut()
|
/DragonOS/docs/ |
H A D | index.rst | 1 .. DragonOS documentation master file, created by 3 You can adapt this file completely to your liking, but it should at least
|
/DragonOS/ |
H A D | .readthedocs.yaml | 1 # Read the Docs configuration file for Sphinx projects 2 # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
/DragonOS/user/apps/test-chown/src/ |
H A D | main.rs | 91 let mut file = File::create(filename)?; in main() localVariable 93 writeln!(file, "This is a test file for chown system call")?; in main() 100 let fd = file.as_raw_fd(); in main()
|
/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() localVariable 194 .alloc_fd(file, None) in kvm_dev_ioctl_create_vm()
|