/DragonOS-0.1.5/kernel/src/filesystem/ramfs/ |
D | mod.rs | 130 let inode: SpinLockGuard<RamFSInode> = self.0.lock(); in read_at() localVariable 133 if inode.metadata.file_type == FileType::Dir { in read_at() 137 let start = inode.data.len().min(offset); in read_at() 138 let end = inode.data.len().min(offset + len); in read_at() 146 let src = &inode.data[start..end]; in read_at() 163 let mut inode: SpinLockGuard<RamFSInode> = self.0.lock(); in write_at() localVariable 166 if inode.metadata.file_type == FileType::Dir { in write_at() 170 let data: &mut Vec<u8> = &mut inode.data; in write_at() 184 let inode: SpinLockGuard<RamFSInode> = self.0.lock(); in poll() localVariable 187 if inode.metadata.file_type == FileType::Dir { in poll() [all …]
|
/DragonOS-0.1.5/kernel/src/filesystem/procfs/ |
D | mod.rs | 324 let mut inode: SpinLockGuard<ProcFSInode> = self.0.lock(); in open() localVariable 327 if let FileType::Dir = inode.metadata.file_type { in open() 332 let file_size = match inode.fdata.ftype { in open() 333 ProcFileType::ProcStatus => inode.open_status(&mut private_data)?, in open() 340 inode.metadata.size = file_size; in open() 374 let inode: SpinLockGuard<ProcFSInode> = self.0.lock(); in read_at() localVariable 377 if inode.metadata.file_type == FileType::Dir { in read_at() 390 match inode.fdata.ftype { in read_at() 391 ProcFileType::ProcStatus => return inode.read_status(offset, len, buf, private_data), in read_at() 396 let start = inode.data.len().min(offset); in read_at() [all …]
|
/DragonOS-0.1.5/kernel/src/filesystem/vfs/ |
D | file.rs | 82 inode: Arc<dyn IndexNode>, field 99 pub fn new(inode: Arc<dyn IndexNode>, mode: FileMode) -> Result<Self, i32> { in new() 100 let file_type: FileType = inode.metadata()?.file_type; in new() 102 inode, in new() 110 f.inode.open(&mut f.private_data)?; in new() 130 .inode in read() 150 .inode in write() 158 return self.inode.metadata(); in metadata() 163 return self.inode.get_entry_name(ino); in get_entry_name() 170 if self.inode.metadata().unwrap().file_type == FileType::Pipe { in lseek() [all …]
|
D | VFS.h | 124 void (*write_inode)(struct vfs_index_node_t *inode); // 将inode信息写入磁盘 153 long (*mkdir)(struct vfs_index_node_t *inode, struct vfs_dir_entry_t *dEntry, int mode); 154 long (*rmdir)(struct vfs_index_node_t *inode, struct vfs_dir_entry_t *dEntry); 166 long (*unlink)(struct vfs_index_node_t *inode, struct vfs_dir_entry_t *dentry); 174 long (*iput)(struct vfs_dir_entry_t *dEntry, struct vfs_index_node_t *inode); 185 long (*open)(struct vfs_index_node_t *inode, struct vfs_file_t *file_ptr); 186 long (*close)(struct vfs_index_node_t *inode, struct vfs_file_t *file_ptr); 190 …long (*ioctl)(struct vfs_index_node_t *inode, struct vfs_file_t *file_ptr, uint64_t cmd, uint64_t …
|
D | core.rs | 193 let inode: Result<Arc<dyn IndexNode>, i32> = ROOT_INODE().lookup(path); in do_open() localVariable 195 let inode: Arc<dyn IndexNode> = if inode.is_err() { in do_open() localVariable 196 let errno = inode.unwrap_err(); in do_open() 207 let inode: Arc<dyn IndexNode> = parent_inode.create(filename, FileType::File, 0o777)?; in do_open() localVariable 208 inode in do_open() 214 inode.unwrap() in do_open() 217 let file_type: FileType = inode.metadata()?.file_type; in do_open() 228 inode.truncate(0)?; in do_open() 232 let mut file: File = File::new(inode, mode)?; in do_open() 300 let inode: Result<Arc<dyn IndexNode>, i32> = ROOT_INODE().lookup(path); in do_mkdir() localVariable [all …]
|
D | mount.rs | 93 let inode: Arc<MountFSInode> = Arc::new(self); in wrap() localVariable 95 let weak: Weak<MountFSInode> = Arc::downgrade(&inode); in wrap() 97 let ptr: *mut MountFSInode = Arc::into_raw(inode) as *mut Self; in wrap() 270 Some(inode) => { in find() 271 return inode.find(name); in find() 348 Some(inode) => return inode.mount_fs.root_inode(), in root_inode()
|
D | mod.rs | 407 let inode = result.find(&name)?; in lookup_follow_symlink() localVariable 410 if inode.metadata()?.file_type == FileType::SymLink && max_follow_times > 0 { in lookup_follow_symlink() 413 let len = inode.read_at(0, 256, &mut content, &mut FilePrivateData::Unused)?; in lookup_follow_symlink() 424 result = inode; in lookup_follow_symlink()
|
D | syscall.rs | 197 let inode = match ROOT_INODE().lookup(&path) { in sys_chdir() localVariable 205 match inode.metadata() { in sys_chdir()
|
/DragonOS-0.1.5/kernel/src/filesystem/devfs/ |
D | null_dev.rs | 35 let inode = NullInode { in new() localVariable 57 let result = Arc::new(LockedNullInode(SpinLock::new(inode))); in new() 96 let mut inode = self.0.lock(); in set_metadata() localVariable 97 inode.metadata.atime = metadata.atime; in set_metadata() 98 inode.metadata.mtime = metadata.mtime; in set_metadata() 99 inode.metadata.ctime = metadata.ctime; in set_metadata() 100 inode.metadata.mode = metadata.mode; in set_metadata() 101 inode.metadata.uid = metadata.uid; in set_metadata() 102 inode.metadata.gid = metadata.gid; in set_metadata()
|
D | zero_dev.rs | 35 let inode = ZeroInode { in new() localVariable 57 let result = Arc::new(LockedZeroInode(SpinLock::new(inode))); in new() 96 let mut inode = self.0.lock(); in set_metadata() localVariable 97 inode.metadata.atime = metadata.atime; in set_metadata() 98 inode.metadata.mtime = metadata.mtime; in set_metadata() 99 inode.metadata.ctime = metadata.ctime; in set_metadata() 100 inode.metadata.mode = metadata.mode; in set_metadata() 101 inode.metadata.uid = metadata.uid; in set_metadata() 102 inode.metadata.gid = metadata.gid; in set_metadata()
|
D | mod.rs | 241 Ok(inode) => inode, in add_dir() 347 let inode = self.0.lock(); in find() localVariable 349 if inode.metadata.file_type != FileType::Dir { in find() 355 return Ok(inode.self_ref.upgrade().ok_or(-(ENOENT as i32))?); in find() 358 return Ok(inode.parent.upgrade().ok_or(-(ENOENT as i32))?); in find() 362 return Ok(inode.children.get(name).ok_or(-(ENOENT as i32))?.clone()); in find() 372 let inode: SpinLockGuard<DevFSInode> = self.0.lock(); in get_entry_name() localVariable 373 if inode.metadata.file_type != FileType::Dir { in get_entry_name() 387 let mut key: Vec<String> = inode in get_entry_name() 390 .filter(|k| inode.children.get(*k).unwrap().metadata().unwrap().inode_id == ino) in get_entry_name() [all …]
|
/DragonOS-0.1.5/kernel/src/driver/disk/ahci/ |
D | ahci_inode.rs | 39 let inode = AhciInode { in new() localVariable 62 let result = Arc::new(LockedAhciInode(SpinLock::new(inode))); in new() 101 let mut inode = self.0.lock(); in set_metadata() localVariable 102 inode.metadata.atime = metadata.atime; in set_metadata() 103 inode.metadata.mtime = metadata.mtime; in set_metadata() 104 inode.metadata.ctime = metadata.ctime; in set_metadata() 105 inode.metadata.mode = metadata.mode; in set_metadata() 106 inode.metadata.uid = metadata.uid; in set_metadata() 107 inode.metadata.gid = metadata.gid; in set_metadata()
|
/DragonOS-0.1.5/kernel/src/driver/tty/ |
D | tty.c | 14 long tty_open(struct vfs_index_node_t *inode, struct vfs_file_t *filp) in tty_open() argument 27 long tty_close(struct vfs_index_node_t *inode, struct vfs_file_t *filp) in tty_close() argument 42 long tty_ioctl(struct vfs_index_node_t *inode, struct vfs_file_t *filp, uint64_t cmd, uint64_t arg) in tty_ioctl() argument
|
/DragonOS-0.1.5/kernel/src/driver/keyboard/ |
D | ps2_keyboard.rs | 33 let inode = PS2KeyBoardInode { in new() localVariable 56 let result = Arc::new(LockedPS2KeyBoardInode(SpinLock::new(inode))); in new() 133 let mut inode = self.0.lock(); in set_metadata() localVariable 134 inode.metadata.atime = metadata.atime; in set_metadata() 135 inode.metadata.mtime = metadata.mtime; in set_metadata() 136 inode.metadata.ctime = metadata.ctime; in set_metadata() 137 inode.metadata.mode = metadata.mode; in set_metadata() 138 inode.metadata.uid = metadata.uid; in set_metadata() 139 inode.metadata.gid = metadata.gid; in set_metadata()
|
D | ps2_keyboard.c | 49 long ps2_keyboard_open(struct vfs_index_node_t *inode, struct vfs_file_t *filp) in ps2_keyboard_open() argument 62 long ps2_keyboard_close(struct vfs_index_node_t *inode, struct vfs_file_t *filp) in ps2_keyboard_close() argument 77 long ps2_keyboard_ioctl(struct vfs_index_node_t *inode, struct vfs_file_t *filp, uint64_t cmd, uint… in ps2_keyboard_ioctl() argument
|
/DragonOS-0.1.5/kernel/src/filesystem/fat/ |
D | fs.rs | 173 let inode: Arc<LockedFATInode> = Arc::new(LockedFATInode(SpinLock::new(FATInode { in new() localVariable 201 inode.0.lock().self_ref = Arc::downgrade(&inode); in new() 203 inode.0.lock().update_metadata(); in new() 205 return inode; in new() 1401 let inode: SpinLockGuard<FATInode> = self.0.lock(); in poll() localVariable 1404 if inode.metadata.file_type == FileType::Dir { in poll()
|