/DragonOS-0.1.7/kernel/src/filesystem/sysfs/ |
D | bus.rs | 2 use crate::{filesystem::vfs::IndexNode, kdebug, syscall::SystemError}; 10 pub fn sys_bus_register(bus_name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in sys_bus_register() argument 11 let binding: Arc<dyn IndexNode> = SYS_BUS_INODE(); in sys_bus_register() 26 let binding: Arc<dyn IndexNode> = SYS_BUS_INODE(); in sys_bus_unregister() 39 inode: &Arc<dyn IndexNode>, in sys_bus_init() argument 40 ) -> Result<(Arc<dyn IndexNode>, Arc<dyn IndexNode>), SystemError> { in sys_bus_init() argument
|
D | class.rs | 2 use crate::{filesystem::vfs::IndexNode, syscall::SystemError}; 10 pub fn sys_class_register(class_name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in sys_class_register() argument 11 let binding: Arc<dyn IndexNode> = SYS_CLASS_INODE(); in sys_class_register() 26 let binding: Arc<dyn IndexNode> = SYS_CLASS_INODE(); in sys_class_unregister() 42 class: Arc<dyn IndexNode>, in class_device_register() argument 44 ) -> Result<Arc<dyn IndexNode>, SystemError> { in class_device_register() argument 60 class: Arc<dyn IndexNode>, in class_device_unregister() argument
|
D | devices.rs | 2 use crate::{filesystem::vfs::IndexNode, syscall::SystemError}; 10 pub fn sys_device_register(device_name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in sys_device_register() argument 11 let binding: Arc<dyn IndexNode> = SYS_DEVICES_INODE(); in sys_device_register() 26 let binding: Arc<dyn IndexNode> = SYS_DEVICES_INODE(); in sys_device_unregister()
|
D | fs.rs | 2 use crate::{filesystem::vfs::IndexNode, syscall::SystemError}; 10 pub fn fs_register(fs_name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in fs_register() argument 11 let binding: Arc<dyn IndexNode> = SYS_FS_INODE(); in fs_register() 26 let binding: Arc<dyn IndexNode> = SYS_FS_INODE(); in fs_unregister()
|
D | mod.rs | 2 core::generate_inode_id, file::FileMode, FileSystem, FileType, FsInfo, IndexNode, Metadata, 26 static mut __SYS_DEVICES_INODE: *mut Arc<dyn IndexNode> = null_mut(); 27 static mut __SYS_BUS_INODE: *mut Arc<dyn IndexNode> = null_mut(); 28 static mut __SYS_CLASS_INODE: *mut Arc<dyn IndexNode> = null_mut(); 29 static mut __SYS_FS_INODE: *mut Arc<dyn IndexNode> = null_mut(); 34 pub fn SYS_DEVICES_INODE() -> Arc<dyn IndexNode> { in SYS_DEVICES_INODE() 43 pub fn SYS_BUS_INODE() -> Arc<dyn IndexNode> { in SYS_BUS_INODE() 52 pub fn SYS_CLASS_INODE() -> Arc<dyn IndexNode> { in SYS_CLASS_INODE() 61 pub fn SYS_FS_INODE() -> Arc<dyn IndexNode> { in SYS_FS_INODE() 79 fn root_inode(&self) -> Arc<dyn super::vfs::IndexNode> { in root_inode() argument [all …]
|
/DragonOS-0.1.7/docs/kernel/filesystem/vfs/ |
D | design.md | 49 - IndexNode: 表明某个struct是一个索引节点 51 …sp;一般情况下,FileSystem和IndexNode是一对一的关系,也就是,一个文件系统对应一种IndexNode。但是,对于某些特殊的文件系统,比如DevFS,根据不同的设备类型,会有不同… 55   挂载文件系统虽然实现了FileSystem和IndexNode这两个trait,但它并不是一个“文件系统”,而是一种机制,用于将不同的文件系统挂载到同一个文件系统树上.
|
D | index.rst | 13 - 提供IndexNode抽象
|
/DragonOS-0.1.7/kernel/src/filesystem/vfs/ |
D | core.rs | 26 use super::{file::FileMode, utils::rsplit_path, IndexNode, InodeId}; 38 static mut __ROOT_INODE: *mut Arc<dyn IndexNode> = null_mut(); 43 pub fn ROOT_INODE() -> Arc<dyn IndexNode> { in ROOT_INODE() 114 new_root_inode: Arc<dyn IndexNode>, in do_migrate() argument 157 let old_root_inode: Box<Arc<dyn IndexNode>> = Box::from_raw(__ROOT_INODE); in migrate_virtual_filesystem() 211 let inode: Result<Arc<dyn IndexNode>, SystemError> = ROOT_INODE().lookup(path); in do_open() 213 let inode: Arc<dyn IndexNode> = if inode.is_err() { in do_open() 222 let parent_inode: Arc<dyn IndexNode> = in do_open() 225 let inode: Arc<dyn IndexNode> = parent_inode.create(filename, FileType::File, 0o777)?; in do_open() 318 let inode: Result<Arc<dyn IndexNode>, SystemError> = ROOT_INODE().lookup(path); in do_mkdir() [all …]
|
D | mod.rs | 87 pub trait IndexNode: Any + Sync + Send + Debug { trait 185 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create() argument 205 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create_with_data() argument 217 fn link(&self, _name: &str, _other: &Arc<dyn IndexNode>) -> Result<(), SystemError> { in link() 256 _target: &Arc<dyn IndexNode>, in move_() argument 269 fn find(&self, _name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in find() argument 339 impl DowncastArc for dyn IndexNode { implementation 345 impl dyn IndexNode { implementation 348 pub fn downcast_ref<T: IndexNode>(&self) -> Option<&T> { in downcast_ref() 358 pub fn lookup(&self, path: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in lookup() argument [all …]
|
D | mount.rs | 10 use super::{file::FileMode, FilePrivateData, FileSystem, FileType, IndexNode, InodeId}; 30 inner_inode: Arc<dyn IndexNode>, 125 impl IndexNode for MountFSInode { 140 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create_with_data() argument 206 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create() argument 215 fn link(&self, name: &str, other: &Arc<dyn IndexNode>) -> Result<(), SystemError> { in link() 250 target: &Arc<dyn IndexNode>, in move_() argument 256 fn find(&self, name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in find() argument 341 fn root_inode(&self) -> Arc<dyn IndexNode> { in root_inode() argument
|
D | file.rs | 11 use super::{Dirent, FileType, IndexNode, Metadata}; 89 inode: Arc<dyn IndexNode>, 106 pub fn new(inode: Arc<dyn IndexNode>, mode: FileMode) -> Result<Self, SystemError> { in new() argument 228 let inode: &Arc<dyn IndexNode> = &self.inode; in readdir() 242 let sub_inode: Arc<dyn IndexNode> = match inode.find(&name) { in readdir() 270 pub fn inode(&self) -> Arc<dyn IndexNode> { in inode() argument
|
/DragonOS-0.1.7/kernel/src/driver/base/device/ |
D | driver.rs | 2 use crate::{filesystem::vfs::IndexNode, libs::spinlock::SpinLock, syscall::SystemError}; 42 fn set_sys_info(&self, sys_info: Option<Arc<dyn IndexNode>>); in set_sys_info() argument 47 fn sys_info(&self) -> Option<Arc<dyn IndexNode>>; in sys_info() argument 99 fn get_sys_info(&self) -> Option<Arc<dyn IndexNode>> { in get_sys_info() argument 108 sys_info: Option<Arc<dyn IndexNode>>, // sys information
|
D | mod.rs | 9 vfs::IndexNode, 129 fn set_sys_info(&self, sys_info: Option<Arc<dyn IndexNode>>); in set_sys_info() argument 134 fn sys_info(&self) -> Option<Arc<dyn IndexNode>>; in sys_info() argument 182 fn sys_info(&self) -> Option<Arc<dyn IndexNode>> { in sys_info() argument 191 sys_info: Option<Arc<dyn IndexNode>>, // sys information
|
D | bus.rs | 12 vfs::IndexNode, 81 sys_info: Option<Arc<dyn IndexNode>>, // 总线inode 169 fn sys_info(&self) -> Option<Arc<dyn IndexNode>> { in sys_info() argument
|
/DragonOS-0.1.7/kernel/src/driver/base/platform/ |
D | mod.rs | 6 use crate::{filesystem::vfs::IndexNode, libs::spinlock::SpinLock, syscall::SystemError}; 211 sys_info: Option<Arc<dyn IndexNode>>, 243 fn sys_info(&self) -> Option<Arc<dyn IndexNode>> { in sys_info() argument 249 fn set_sys_info(&self, sys_info: Option<Arc<dyn IndexNode>>) { in set_sys_info() argument 332 sys_info: Option<Arc<dyn IndexNode>>, // 总线sys information 364 fn set_sys_info(&self, sys_info: Option<Arc<dyn IndexNode>>) { in set_sys_info() argument 370 fn sys_info(&self) -> Option<Arc<dyn IndexNode>> { in sys_info() argument
|
/DragonOS-0.1.7/docs/kernel/filesystem/ |
D | sysfs.md | 39 sys_info: Option<Arc<dyn IndexNode>>, // sys information 57 sys_info: Option<Arc<dyn IndexNode>>, // sys information 77 sys_info: Option<Arc<dyn IndexNode>>, // 总线inode
|
D | overview.md | 80 - 提供IndexNode抽象
|
/DragonOS-0.1.7/kernel/src/filesystem/procfs/ |
D | mod.rs | 26 FileSystem, FsInfo, IndexNode, InodeId, Metadata, PollStatus, 217 fn root_inode(&self) -> Arc<dyn super::vfs::IndexNode> { in root_inode() argument 282 let proc: Arc<dyn IndexNode> = self.root_inode(); in register_pid() 284 let _pf: Arc<dyn IndexNode> = proc.create(&pid.to_string(), FileType::Dir, 0o777)?; in register_pid() 287 let binding: Arc<dyn IndexNode> = _pf.create("status", FileType::File, 0o777)?; in register_pid() 304 let proc: Arc<dyn IndexNode> = self.root_inode(); in unregister_pid() 306 let pid_dir: Arc<dyn IndexNode> = proc.find(&format!("{}", pid))?; in unregister_pid() 320 impl IndexNode for LockedProcFSInode { 474 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create_with_data() argument 525 fn link(&self, name: &str, other: &Arc<dyn IndexNode>) -> Result<(), SystemError> { in link() [all …]
|
/DragonOS-0.1.7/kernel/src/filesystem/devfs/ |
D | mod.rs | 8 FileSystem, FileType, FsInfo, IndexNode, Metadata, PollStatus, 37 fn root_inode(&self) -> Arc<dyn super::vfs::IndexNode> { in root_inode() argument 204 children: BTreeMap<String, Arc<dyn IndexNode>>, 265 pub fn add_dev(&self, name: &str, dev: Arc<dyn IndexNode>) -> Result<(), SystemError> { in add_dev() 295 ) -> Result<Arc<dyn IndexNode>, SystemError> { in do_create_with_data() argument 338 impl IndexNode for LockedDevFSInode { 361 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create_with_data() argument 368 fn find(&self, name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in find() argument 496 pub trait DeviceINode: IndexNode { 504 let devfs_inode: Result<Arc<dyn IndexNode>, SystemError> = ROOT_INODE().find("dev");
|
D | null_dev.rs | 4 core::generate_inode_id, FilePrivateData, FileSystem, FileType, IndexNode, Metadata, PollStatus, 67 impl IndexNode for LockedNullInode {
|
D | zero_dev.rs | 4 core::generate_inode_id, FilePrivateData, FileSystem, FileType, IndexNode, Metadata, PollStatus, 67 impl IndexNode for LockedZeroInode {
|
/DragonOS-0.1.7/kernel/src/filesystem/ramfs/ |
D | mod.rs | 18 file::FilePrivateData, FileSystem, FsInfo, IndexNode, InodeId, Metadata, PollStatus, 57 fn root_inode(&self) -> Arc<dyn super::vfs::IndexNode> { in root_inode() argument 116 impl IndexNode for LockedRamFSInode { 236 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create_with_data() argument 282 fn link(&self, name: &str, other: &Arc<dyn IndexNode>) -> Result<(), SystemError> { in link() 357 target: &Arc<dyn IndexNode>, in move_() argument 360 let old_inode: Arc<dyn IndexNode> = self.find(old_name)?; in move_() 373 fn find(&self, name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in find() argument
|
/DragonOS-0.1.7/kernel/src/driver/disk/ahci/ |
D | ahci_inode.rs | 4 core::generate_inode_id, make_rawdev, FilePrivateData, FileSystem, FileType, IndexNode, 73 impl IndexNode for LockedAhciInode {
|
/DragonOS-0.1.7/kernel/src/driver/keyboard/ |
D | ps2_keyboard.rs | 9 vfs::{core::generate_inode_id, file::FileMode, FileType, IndexNode, Metadata, PollStatus}, 92 impl IndexNode for LockedPS2KeyBoardInode {
|
/DragonOS-0.1.7/kernel/src/ipc/ |
D | pipe.rs | 5 core::generate_inode_id, FilePrivateData, FileSystem, FileType, IndexNode, Metadata, 74 impl IndexNode for LockedPipeInode {
|