Home
last modified time | relevance | path

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

12

/DragonOS-0.1.9/kernel/src/filesystem/fat/
Dentry.rs17 fs::{Cluster, FATFileSystem, MAX_FILE_SIZE},
83 fs: &Arc<FATFileSystem>, in read()
92 let start_cluster_number: u64 = offset / fs.bytes_per_cluster(); in read()
95 fs.get_cluster_by_relative(self.first_cluster, start_cluster_number as usize) in read()
105 let mut in_cluster_offset: u64 = offset % fs.bytes_per_cluster(); in read()
113 if in_cluster_offset >= fs.bytes_per_cluster() { in read()
114 if let Some(FATEntry::Next(c)) = fs.get_fat_entry(current_cluster).ok() { in read()
116 in_cluster_offset %= fs.bytes_per_cluster(); in read()
126 (fs.bytes_per_cluster() - in_cluster_offset) as usize, in read()
132 let offset = fs.cluster_bytes_offset(current_cluster) + in_cluster_offset; in read()
[all …]
Dfs.rs105 fs: Weak<FATFileSystem>, field
123 self.metadata.size = d.size(&self.fs.upgrade().unwrap().clone()) as i64; in update_metadata()
142 d.find_entry(name, None, None, self.fs.upgrade().unwrap())?; in find()
146 self.fs.upgrade().unwrap(), in find()
158 self.fs in find()
170 fs: Arc<FATFileSystem>, in new()
184 fs: Arc::downgrade(&fs), in new()
190 blk_size: fs.bpb.bytes_per_sector as usize, in new()
191 blocks: if let FATType::FAT32(_) = fs.bpb.fat_type { in new()
192 fs.bpb.total_sectors_32 as usize in new()
[all …]
Dmod.rs3 pub mod fs; module
/DragonOS-0.1.9/kernel/src/filesystem/devfs/
Dnull_dev.rs24 fs: Weak<DevFS>, field
37 fs: Weak::default(), in new()
64 fn set_fs(&self, fs: Weak<DevFS>) { in set_fs()
65 self.0.lock().fs = fs; in set_fs()
86 fn fs(&self) -> Arc<dyn FileSystem> { in fs() method
87 return self.0.lock().fs.upgrade().unwrap(); in fs()
Dzero_dev.rs24 fs: Weak<DevFS>, field
37 fs: Weak::default(), in new()
64 fn set_fs(&self, fs: Weak<DevFS>) { in set_fs()
65 self.0.lock().fs = fs; in set_fs()
86 fn fs(&self) -> Arc<dyn FileSystem> { in fs() method
87 return self.0.lock().fs.upgrade().unwrap(); in fs()
Dmod.rs69 root_guard.fs = Arc::downgrade(&devfs); in new()
133 device.set_fs(dev_char_inode.0.lock().fs.clone()); in register_device()
151 device.set_fs(dev_block_inode.0.lock().fs.clone()); in register_device()
229 fs: Weak<DevFS>, field
265 fs: Weak::default(), in new_with_parent()
355 fs: guard.fs.clone(), in do_create_with_data()
418 fn fs(&self) -> Arc<dyn FileSystem> { in fs() method
419 return self.0.lock().fs.upgrade().unwrap(); in fs()
529 fn set_fs(&self, fs: Weak<DevFS>); in set_fs()
547 let binding = devfs_inode.fs();
/DragonOS-0.1.9/kernel/src/driver/disk/ahci/
Dahci_inode.rs26 fs: Weak<DevFS>, field
41 fs: Weak::default(), in new()
69 fn set_fs(&self, fs: Weak<DevFS>) { in set_fs()
70 self.0.lock().fs = fs; in set_fs()
91 fn fs(&self) -> Arc<dyn FileSystem> { in fs() method
92 return self.0.lock().fs.upgrade().unwrap(); in fs()
/DragonOS-0.1.9/kernel/src/virt/kvm/
Dkvm_dev.rs42 fs: Weak<DevFS>, field
54 fs: Weak::default(), in new()
81 fn set_fs(&self, fs: Weak<DevFS>) { in set_fs()
82 self.0.lock().fs = fs; in set_fs()
104 fn fs(&self) -> Arc<dyn FileSystem> { in fs() method
105 return self.0.lock().fs.upgrade().unwrap(); in fs()
Dvcpu_dev.rs52 fs: Weak<DevFS>, field
65 fs: Weak::default(), in new()
112 fn fs(&self) -> Arc<dyn FileSystem> { in fs() method
113 return self.0.lock().fs.upgrade().unwrap(); in fs()
Dvm_dev.rs50 fs: Weak<DevFS>, field
63 fs: Weak::default(), in new()
110 fn fs(&self) -> Arc<dyn FileSystem> { in fs() method
111 return self.0.lock().fs.upgrade().unwrap(); in fs()
/DragonOS-0.1.9/build-scripts/kernel_build/src/kconfig/
Dmod.rs1 use std::{fs, io::Write, path::PathBuf};
13 if fs::metadata("kernel.config").is_ok() { in build()
47 let mut file = fs::File::create("D.config").expect("Failed to create file: D.config"); in make_compile_cfg()
68 fs::read_to_string(&d_config_path).expect(&format!("Failed to read {}", d_config_str)); in dfs()
88 fs::read_to_string("kernel.config").expect("Failed to read kernel.config."); in parse_kernel_config()
108 fs::read_to_string(d_config).expect(&format!("Failed to read {}", path_str)); in parse_d_config()
/DragonOS-0.1.9/kernel/src/driver/keyboard/
Dps2_keyboard.rs65 fs: Weak<DevFS>, field
75 fs: Weak::default(), in new()
102 fn set_fs(&self, fs: Weak<DevFS>) { in set_fs()
103 self.0.write().fs = fs; in set_fs()
157 fn fs(&self) -> alloc::sync::Arc<dyn FileSystem> { in fs() method
158 return self.0.read().fs.upgrade().unwrap(); in fs()
/DragonOS-0.1.9/kernel/src/filesystem/vfs/
Dcore.rs13 fat::fs::FATFileSystem,
94 fs: &MountFS, in do_migrate()
110 .mount(fs.inner_filesystem()) in do_migrate()
121 let binding = ROOT_INODE().find("proc").expect("ProcFS not mounted!").fs(); in migrate_virtual_filesystem()
123 let binding = ROOT_INODE().find("dev").expect("DevFS not mounted!").fs(); in migrate_virtual_filesystem()
125 let binding = ROOT_INODE().find("sys").expect("SysFs not mounted!").fs(); in migrate_virtual_filesystem()
Dmount.rs114 return Ok(self.inner_inode.fs().root_inode().metadata()?.inode_id in is_mountpoint_root()
185 fn fs(&self) -> Arc<dyn FileSystem> { in fs() method
337 fn mount(&self, fs: Arc<dyn FileSystem>) -> Result<Arc<MountFS>, SystemError> { in mount()
344 let new_mount_fs: Arc<MountFS> = MountFS::new(fs, Some(self.self_ref.upgrade().unwrap())); in mount()
/DragonOS-0.1.9/kernel/src/filesystem/kernfs/
Dmod.rs58 let fs = Arc::new(Self { in new() localVariable
69 *root_inode.fs.write() = Arc::downgrade(&fs); in new()
70 return fs; in new()
99 fs: RwLock::new(Weak::new()), in create_root_inode()
114 fs: RwLock<Weak<KernFS>>, field
280 fn fs(&self) -> Arc<dyn FileSystem> { in fs() method
281 return self.fs.read().upgrade().unwrap(); in fs()
392 fs: RwLock::new(Weak::new()), in new()
409 .fs() in new()
412 *inode.fs.write() = Arc::downgrade(&kernfs); in new()
/DragonOS-0.1.9/kernel/src/arch/x86_64/process/
Dmod.rs82 fs: SegmentSelector, field
120 fs: KERNEL_DS, in new()
260 fs: self.fs.clone(), in clone_all()
352 new_arch_guard.fs = current_arch_guard.fs; in copy_thread()
517 off_fs = const(offset_of!(ArchPCBInfo, fs)), in switch_to_inner()
561 arch_guard.fs = USER_DS; in arch_switch_to_user()
568 SegmentSelector::from_bits_truncate(arch_guard.fs.bits()), in arch_switch_to_user()
Dtable.rs28 pub unsafe fn switch_fs_and_gs(fs: SegmentSelector, gs: SegmentSelector) { in switch_fs_and_gs()
29 x86::segmentation::load_fs(fs); in switch_fs_and_gs()
/DragonOS-0.1.9/kernel/src/filesystem/procfs/
Dmod.rs116 fs: Weak<ProcFS>, field
311 fs: Weak::default(), in new()
324 root_guard.fs = Arc::downgrade(&result); in new()
508 fn fs(&self) -> Arc<dyn FileSystem> { in fs() method
509 return self.0.lock().fs.upgrade().unwrap(); in fs()
586 fs: inode.fs.clone(), in create_with_data()
749 let fs = procfs_inode.fs(); in procfs_register_pid() localVariable
750 let procfs: &ProcFS = fs.as_any_ref().downcast_ref::<ProcFS>().unwrap(); in procfs_register_pid()
766 let fs: Arc<dyn FileSystem> = procfs_inode.fs(); in procfs_unregister_pid() localVariable
767 let procfs: &ProcFS = fs.as_any_ref().downcast_ref::<ProcFS>().unwrap(); in procfs_unregister_pid()
/DragonOS-0.1.9/kernel/src/arch/x86_64/asm/
Dapu_boot.S18 mov %ax, %fs
64 mov %ax, %fs
/DragonOS-0.1.9/kernel/src/filesystem/ramfs/
Dmod.rs57 fs: Weak<RamFS>, field
105 fs: Weak::default(), in new()
115 root_guard.fs = Arc::downgrade(&result); in new()
214 fn fs(&self) -> Arc<dyn FileSystem> { in fs() method
215 return self.0.lock().fs.upgrade().unwrap(); in fs()
292 fs: inode.fs.clone(), in create_with_data()
513 fs: inode.fs.clone(), in mknod()
/DragonOS-0.1.9/build-scripts/kernel_build/src/utils/
Dmod.rs22 let d = std::fs::read_dir(path); in list_all_files()
/DragonOS-0.1.9/kernel/src/driver/tty/
Dtty_device.rs83 fs: RwLock<Weak<DevFS>>, field
94 fs: RwLock::new(Weak::default()), in new()
236 fn fs(&self) -> Arc<dyn crate::filesystem::vfs::FileSystem> { in fs() method
351 fn set_fs(&self, fs: alloc::sync::Weak<crate::filesystem::devfs::DevFS>) { in set_fs()
352 *self.fs.write() = fs; in set_fs()
/DragonOS-0.1.9/tools/debugging/logmonitor/src/backend/monitor/
Dmm.rs2 fs::File,
229 fn open_kmem_file(&self) -> std::io::Result<std::fs::File> { in open_kmem_file()
230 std::fs::OpenOptions::new().read(true).open(&self.kmem_path) in open_kmem_file()
/DragonOS-0.1.9/kernel/src/filesystem/sysfs/
Dmod.rs48 .mount(sysfs_instance().fs().clone()) in sysfs_init()
217 pub fn fs(&self) -> &Arc<KernFS> { in fs() method
/DragonOS-0.1.9/docs/community/ChangeLog/V0.1.x/
DV0.1.6.md125 - rcore-fs - https://github.com/rcore-os/rcore-fs.git - MIT
242 * fix(fat): fix determination of fat type casue crash if fs is fat12/16

12