Home
last modified time | relevance | path

Searched refs:IndexNode (Results 1 – 25 of 31) sorted by relevance

12

/DragonOS-0.1.8/kernel/src/filesystem/sysfs/
Dclass.rs2 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
Dbus.rs2 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
57 pub fn bus_driver_register(bus_name: &str, name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in bus_driver_register() argument
76 pub fn bus_device_register(bus_name: &str, name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in bus_device_register() argument
Ddevices.rs2 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()
Dfs.rs2 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()
Dmod.rs2 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.8/docs/kernel/filesystem/vfs/
Ddesign.md49 - IndexNode: 表明某个struct是一个索引节点
51 …sp;一般情况下,FileSystem和IndexNode是一对一的关系,也就是,一个文件系统对应一种IndexNode。但是,对于某些特殊的文件系统,比如DevFS,根据不同的设备类型,会有不同…
55 &emsp;&emsp;挂载文件系统虽然实现了FileSystem和IndexNode这两个trait,但它并不是一个“文件系统”,而是一种机制,用于将不同的文件系统挂载到同一个文件系统树上.
Dindex.rst13 - 提供IndexNode抽象
/DragonOS-0.1.8/kernel/src/filesystem/vfs/
Dcore.rs24 use super::{file::FileMode, utils::rsplit_path, IndexNode, InodeId};
36 static mut __ROOT_INODE: *mut Arc<dyn IndexNode> = null_mut();
41 pub fn ROOT_INODE() -> Arc<dyn IndexNode> { in ROOT_INODE()
112 new_root_inode: Arc<dyn IndexNode>, in do_migrate() argument
155 let old_root_inode: Box<Arc<dyn IndexNode>> = Box::from_raw(__ROOT_INODE); in migrate_virtual_filesystem()
209 let inode: Result<Arc<dyn IndexNode>, SystemError> = ROOT_INODE().lookup(path); in do_mkdir()
217 let parent_inode: Arc<dyn IndexNode> = in do_mkdir()
220 let _create_inode: Arc<dyn IndexNode> = in do_mkdir()
238 let inode: Result<Arc<dyn IndexNode>, SystemError> = ROOT_INODE().lookup(path); in do_remove_dir()
250 let parent_inode: Arc<dyn IndexNode> = ROOT_INODE().lookup(parent_path.unwrap_or("/"))?; in do_remove_dir()
[all …]
Dmod.rs88 pub trait IndexNode: Any + Sync + Send + Debug { interface
189 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create() argument
209 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create_with_data() argument
221 fn link(&self, _name: &str, _other: &Arc<dyn IndexNode>) -> Result<(), SystemError> { in link()
260 _target: &Arc<dyn IndexNode>, in move_() argument
273 fn find(&self, _name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in find() argument
343 impl DowncastArc for dyn IndexNode { implementation
349 impl dyn IndexNode { implementation
352 pub fn downcast_ref<T: IndexNode>(&self) -> Option<&T> { in downcast_ref()
362 pub fn lookup(&self, path: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in lookup() argument
[all …]
Dmount.rs10 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
Dfile.rs11 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
246 let inode: &Arc<dyn IndexNode> = &self.inode; in readdir()
260 let sub_inode: Arc<dyn IndexNode> = match inode.find(&name) { in readdir()
288 pub fn inode(&self) -> Arc<dyn IndexNode> { in inode() argument
/DragonOS-0.1.8/kernel/src/driver/base/device/
Ddriver.rs2 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
Dmod.rs9 vfs::IndexNode,
189 fn set_sys_info(&self, sys_info: Option<Arc<dyn IndexNode>>); in set_sys_info() argument
194 fn sys_info(&self) -> Option<Arc<dyn IndexNode>>; in sys_info() argument
242 fn sys_info(&self) -> Option<Arc<dyn IndexNode>> { in sys_info() argument
251 sys_info: Option<Arc<dyn IndexNode>>, // sys information
Dbus.rs12 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.8/kernel/src/driver/uart/
Duart.rs12 vfs::IndexNode,
104 sys_info: Option<Arc<dyn IndexNode>>,
158 fn set_sys_info(&self, sys_info: Option<Arc<dyn IndexNode>>) { in set_sys_info() argument
162 fn sys_info(&self) -> Option<Arc<dyn IndexNode>> { in sys_info() argument
181 sys_info: Option<Arc<dyn IndexNode>>,
215 fn set_sys_info(&self, sys_info: Option<Arc<dyn IndexNode>>) { in set_sys_info() argument
219 fn sys_info(&self) -> Option<Arc<dyn IndexNode>> { in sys_info() argument
225 fn open(&self, _file: Arc<dyn IndexNode>) -> Result<(), crate::syscall::SystemError> { in open()
229 fn close(&self, _file: Arc<dyn IndexNode>) -> Result<(), crate::syscall::SystemError> { in close()
241 pub fn new(port: UartPort, baud_rate: u32, sys_info: Option<Arc<dyn IndexNode>>) -> Self { in new()
[all …]
/DragonOS-0.1.8/kernel/src/driver/base/platform/
Dmod.rs6 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
334 sys_info: Option<Arc<dyn IndexNode>>, // 总线sys information
366 fn set_sys_info(&self, sys_info: Option<Arc<dyn IndexNode>>) { in set_sys_info() argument
372 fn sys_info(&self) -> Option<Arc<dyn IndexNode>> { in sys_info() argument
/DragonOS-0.1.8/docs/kernel/filesystem/
Dsysfs.md39 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
Doverview.md80 - 提供IndexNode抽象
/DragonOS-0.1.8/kernel/src/filesystem/procfs/
Dmod.rs27 FileSystem, FsInfo, IndexNode, InodeId, Metadata, PollStatus,
220 fn root_inode(&self) -> Arc<dyn super::vfs::IndexNode> { in root_inode() argument
285 let proc: Arc<dyn IndexNode> = self.root_inode(); in register_pid()
287 let _pf: Arc<dyn IndexNode> = proc.create(&pid.to_string(), FileType::Dir, 0o777)?; in register_pid()
290 let binding: Arc<dyn IndexNode> = _pf.create("status", FileType::File, 0o777)?; in register_pid()
307 let proc: Arc<dyn IndexNode> = self.root_inode(); in unregister_pid()
309 let pid_dir: Arc<dyn IndexNode> = proc.find(&format!("{}", pid))?; in unregister_pid()
323 impl IndexNode for LockedProcFSInode {
477 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create_with_data() argument
528 fn link(&self, name: &str, other: &Arc<dyn IndexNode>) -> Result<(), SystemError> { in link()
[all …]
/DragonOS-0.1.8/kernel/src/filesystem/devfs/
Dmod.rs8 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");
Dnull_dev.rs4 core::generate_inode_id, FilePrivateData, FileSystem, FileType, IndexNode, Metadata, PollStatus,
67 impl IndexNode for LockedNullInode {
Dzero_dev.rs4 core::generate_inode_id, FilePrivateData, FileSystem, FileType, IndexNode, Metadata, PollStatus,
67 impl IndexNode for LockedZeroInode {
/DragonOS-0.1.8/kernel/src/filesystem/ramfs/
Dmod.rs18 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.8/kernel/src/driver/base/char/
Dmod.rs5 use crate::{filesystem::vfs::IndexNode, kerror, libs::spinlock::SpinLock, syscall::SystemError};
31 fn open(&self, file: Arc<dyn IndexNode>) -> Result<(), SystemError>; in open()
36 fn close(&self, file: Arc<dyn IndexNode>) -> Result<(), SystemError>; in close()
/DragonOS-0.1.8/kernel/src/driver/disk/ahci/
Dahci_inode.rs4 core::generate_inode_id, make_rawdev, FilePrivateData, FileSystem, FileType, IndexNode,
73 impl IndexNode for LockedAhciInode {

12