Home
last modified time | relevance | path

Searched refs:dyn (Results 1 – 15 of 15) sorted by relevance

/DragonOS-0.1.5/kernel/src/io/
Ddisk_info.rs18 disk: Weak<dyn BlockDevice>, // 当前分区所属的磁盘
32 disk: Weak<dyn BlockDevice>, in new()
46 pub fn disk(&self) -> Arc<dyn BlockDevice> { in disk()
Ddevice.rs82 fn as_any_ref(&self) -> &dyn Any; in as_any_ref()
87 fn device(&self) -> Arc<dyn Device>; in device()
/DragonOS-0.1.5/kernel/src/filesystem/vfs/
Dmount.rs20 inner_filesystem: Arc<dyn FileSystem>,
33 inner_inode: Arc<dyn IndexNode>,
42 inner_fs: Arc<dyn FileSystem>, in new()
82 pub fn inner_filesystem(&self) -> Arc<dyn FileSystem> { in inner_filesystem()
143 ) -> Result<Arc<dyn IndexNode>, i32> { in create_with_data()
181 fn fs(&self) -> Arc<dyn FileSystem> { in fs()
186 fn as_any_ref(&self) -> &dyn core::any::Any { in as_any_ref()
211 ) -> Result<Arc<dyn IndexNode>, i32> { in create()
220 fn link(&self, name: &str, other: &Arc<dyn IndexNode>) -> Result<(), i32> { in link()
255 target: &Arc<dyn IndexNode>, in move_()
[all …]
Dcore.rs36 static mut __ROOT_INODE: *mut Arc<dyn IndexNode> = null_mut();
41 pub fn ROOT_INODE() -> Arc<dyn IndexNode> { in ROOT_INODE()
99 new_root_inode: Arc<dyn IndexNode>, in do_migrate()
120 fn migrate_virtual_filesystem(new_fs: Arc<dyn FileSystem>) -> Result<(), i32> { in migrate_virtual_filesystem()
139 let old_root_inode: Box<Arc<dyn IndexNode>> = Box::from_raw(__ROOT_INODE); in migrate_virtual_filesystem()
193 let inode: Result<Arc<dyn IndexNode>, i32> = ROOT_INODE().lookup(path); in do_open()
195 let inode: Arc<dyn IndexNode> = if inode.is_err() { in do_open()
204 let parent_inode: Arc<dyn IndexNode> = in do_open()
207 let inode: Arc<dyn IndexNode> = parent_inode.create(filename, FileType::File, 0o777)?; in do_open()
300 let inode: Result<Arc<dyn IndexNode>, i32> = ROOT_INODE().lookup(path); in do_mkdir()
[all …]
Dmod.rs187 ) -> Result<Arc<dyn IndexNode>, i32> { in create()
207 ) -> Result<Arc<dyn IndexNode>, i32> { in create_with_data()
219 fn link(&self, _name: &str, _other: &Arc<dyn IndexNode>) -> Result<(), i32> { in link()
258 _target: &Arc<dyn IndexNode>, in move_()
271 fn find(&self, _name: &str) -> Result<Arc<dyn IndexNode>, i32> { in find()
313 fn fs(&self) -> Arc<dyn FileSystem>; in fs()
317 fn as_any_ref(&self) -> &dyn Any; in as_any_ref()
324 fn mount(&self, _fs: Arc<dyn FileSystem>) -> Result<Arc<MountFS>, i32> { in mount()
336 impl dyn IndexNode { impl
349 pub fn lookup(&self, path: &str) -> Result<Arc<dyn IndexNode>, i32> { in lookup()
[all …]
Dfile.rs82 inode: Arc<dyn IndexNode>,
99 pub fn new(inode: Arc<dyn IndexNode>, mode: FileMode) -> Result<Self, i32> { in new()
222 let inode: &Arc<dyn IndexNode> = &self.inode; in readdir()
236 let sub_inode: Arc<dyn IndexNode> = match inode.find(&name) { in readdir()
263 pub fn inode(&self) -> Arc<dyn IndexNode> { in inode()
/DragonOS-0.1.5/kernel/src/filesystem/procfs/
Dmod.rs218 fn root_inode(&self) -> Arc<dyn super::vfs::IndexNode> { in root_inode()
229 fn as_any_ref(&self) -> &dyn core::any::Any { in as_any_ref()
283 let proc: Arc<dyn IndexNode> = self.root_inode(); in register_pid()
285 let _pf: Arc<dyn IndexNode> = proc.create(&pid.to_string(), FileType::Dir, 0o777)?; in register_pid()
288 let binding: Arc<dyn IndexNode> = _pf.create("status", FileType::File, 0o777)?; in register_pid()
305 let proc: Arc<dyn IndexNode> = self.root_inode(); in unregister_pid()
307 let pid_dir: Arc<dyn IndexNode> = proc.find(&format!("{}", pid))?; in unregister_pid()
434 fn fs(&self) -> Arc<dyn FileSystem> { in fs()
438 fn as_any_ref(&self) -> &dyn core::any::Any { in as_any_ref()
477 ) -> Result<Arc<dyn IndexNode>, i32> { in create_with_data()
[all …]
/DragonOS-0.1.5/kernel/src/filesystem/ramfs/
Dmod.rs59 fn root_inode(&self) -> Arc<dyn super::vfs::IndexNode> { in root_inode()
72 fn as_any_ref(&self) -> &dyn Any { in as_any_ref()
196 fn fs(&self) -> Arc<dyn FileSystem> { in fs()
200 fn as_any_ref(&self) -> &dyn core::any::Any { in as_any_ref()
240 ) -> Result<Arc<dyn IndexNode>, i32> { in create_with_data()
286 fn link(&self, name: &str, other: &Arc<dyn IndexNode>) -> Result<(), i32> { in link()
361 target: &Arc<dyn IndexNode>, in move_()
364 let old_inode: Arc<dyn IndexNode> = self.find(old_name)?; in move_()
377 fn find(&self, name: &str) -> Result<Arc<dyn IndexNode>, i32> { in find()
/DragonOS-0.1.5/kernel/src/filesystem/devfs/
Dmod.rs32 fn as_any_ref(&self) -> &dyn core::any::Any { in as_any_ref()
36 fn root_inode(&self) -> Arc<dyn super::vfs::IndexNode> { in root_inode()
189 children: BTreeMap<String, Arc<dyn IndexNode>>,
250 pub fn add_dev(&self, name: &str, dev: Arc<dyn IndexNode>) -> Result<(), i32> { in add_dev()
276 _data: usize,) -> Result<Arc<dyn IndexNode>, i32>{ in do_create_with_data()
321 fn as_any_ref(&self) -> &dyn core::any::Any { in as_any_ref()
339 ) -> Result<Arc<dyn IndexNode>, i32> { in create_with_data()
346 fn find(&self, name: &str) -> Result<Arc<dyn IndexNode>, i32> { in find()
367 fn fs(&self) -> Arc<dyn FileSystem> { in fs()
483 let devfs_inode: Result<Arc<dyn IndexNode>, i32> = ROOT_INODE().find("dev");
Dnull_dev.rs71 fn as_any_ref(&self) -> &dyn core::any::Any { in as_any_ref()
87 fn fs(&self) -> Arc<dyn FileSystem> { in fs()
Dzero_dev.rs71 fn as_any_ref(&self) -> &dyn core::any::Any { in as_any_ref()
87 fn fs(&self) -> Arc<dyn FileSystem> { in fs()
/DragonOS-0.1.5/kernel/src/driver/disk/ahci/
Dahci_inode.rs76 fn as_any_ref(&self) -> &dyn core::any::Any { in as_any_ref()
92 fn fs(&self) -> Arc<dyn FileSystem> { in fs()
Dahcidisk.rs392 fn as_any_ref(&self) -> &dyn core::any::Any { in as_any_ref()
430 fn device(&self) -> Arc<dyn crate::io::device::Device> { in device()
/DragonOS-0.1.5/kernel/src/driver/keyboard/
Dps2_keyboard.rs144 fn fs(&self) -> alloc::sync::Arc<dyn crate::filesystem::vfs::FileSystem> { in fs()
148 fn as_any_ref(&self) -> &dyn core::any::Any { in as_any_ref()
/DragonOS-0.1.5/kernel/src/filesystem/fat/
Dfs.rs230 fn root_inode(&self) -> Arc<dyn crate::filesystem::vfs::IndexNode> { in root_inode()
240 fn as_any_ref(&self) -> &dyn Any { in as_any_ref()
1418 ) -> Result<Arc<dyn IndexNode>, i32> { in create()
1448 fn fs(&self) -> Arc<dyn FileSystem> { in fs()
1452 fn as_any_ref(&self) -> &dyn core::any::Any { in as_any_ref()
1503 fn find(&self, name: &str) -> Result<Arc<dyn IndexNode>, i32> { in find()