/DragonOS/kernel/src/filesystem/vfs/ |
H A D | mod.rs | 43 pub enum FileType { enum 102 impl FileType { implementation 105 FileType::File => DT_REG, in get_file_type_num() 106 FileType::Dir => DT_DIR, in get_file_type_num() 107 FileType::BlockDevice => DT_BLK, in get_file_type_num() 108 FileType::CharDevice => DT_CHR, in get_file_type_num() 109 FileType::KvmDevice => DT_CHR, in get_file_type_num() 110 FileType::Pipe => DT_FIFO, in get_file_type_num() 111 FileType::SymLink => DT_LNK, in get_file_type_num() 112 FileType::Socket => DT_SOCK, in get_file_type_num() [all …]
|
H A D | core.rs | 16 mount::MountFS, syscall::ModeType, AtomicInodeId, FileSystem, FileType, MAX_PATHLEN, 203 if parent_inode.metadata()?.file_type != FileType::Dir { in do_remove_dir() 209 if target_inode.metadata()?.file_type != FileType::Dir { in do_remove_dir() 236 if inode.unwrap().metadata()?.file_type == FileType::Dir { in do_unlink_at() 245 if parent_inode.metadata()?.file_type != FileType::Dir { in do_unlink_at() 280 if new_parent.metadata()?.file_type != FileType::Dir { in do_symlinkat() 286 FileType::SymLink, in do_symlinkat()
|
H A D | file.rs | 12 use super::{Dirent, FileType, IndexNode, InodeId, Metadata, SpecialNodeData}; 205 file_type: FileType, 221 if file_type == FileType::Pipe { in new() 390 FileType::Pipe | FileType::CharDevice => { in lseek() 525 pub fn file_type(&self) -> FileType { in file_type() argument 583 FileType::Socket => { in add_epoll() 589 FileType::Pipe => { in add_epoll() 607 FileType::Socket => { in remove_epoll() 613 FileType::Pipe => { in remove_epoll()
|
H A D | open.rs | 10 FileType, IndexNode, MAX_PATHLEN, ROOT_INODE, VFS_MAX_FOLLOW_SYMLINK_TIMES, 197 FileType::File, in do_sys_openat2() 208 let file_type: FileType = inode.metadata()?.file_type; in do_sys_openat2() 210 if how.o_flags.contains(FileMode::O_DIRECTORY) && file_type != FileType::Dir { in do_sys_openat2() 226 && file_type == FileType::File in do_sys_openat2()
|
H A D | syscall.rs | 33 Dirent, FileType, IndexNode, SuperBlock, FSMAKER, MAX_PATHLEN, ROOT_INODE, 735 if metadata.file_type == FileType::Dir { in chdir() 872 if old_inode.metadata().unwrap().file_type == FileType::Dir { in do_linkat() 1319 FileType::File => kstat.mode.insert(ModeType::S_IFREG), in do_fstat() 1320 FileType::Dir => kstat.mode.insert(ModeType::S_IFDIR), in do_fstat() 1321 FileType::BlockDevice => kstat.mode.insert(ModeType::S_IFBLK), in do_fstat() 1322 FileType::CharDevice => kstat.mode.insert(ModeType::S_IFCHR), in do_fstat() 1323 FileType::SymLink => kstat.mode.insert(ModeType::S_IFLNK), in do_fstat() 1324 FileType::Socket => kstat.mode.insert(ModeType::S_IFSOCK), in do_fstat() 1325 FileType::Pipe => kstat.mode.insert(ModeType::S_IFIFO), in do_fstat() [all …]
|
H A D | utils.rs | 10 use super::{fcntl::AtFlags, FileType, IndexNode, ROOT_INODE}; 61 if file.file_type() != FileType::Dir { in user_path_at()
|
H A D | mount.rs | 30 FilePrivateData, FileSystem, FileType, IndexNode, InodeId, Magic, SuperBlock, 208 if self.metadata()?.file_type != FileType::Dir { in do_umount() 261 file_type: FileType, in create_with_data() argument 328 file_type: FileType, in create() argument 436 if metadata.file_type != FileType::Dir { in mount() 464 if from.metadata()?.file_type != FileType::Dir || metadata.file_type != FileType::Dir { in mount_from()
|
/DragonOS/kernel/src/filesystem/ramfs/ |
H A D | mod.rs | 8 filesystem::vfs::{core::generate_inode_id, FileType}, 89 file_type: FileType::Dir, in new() 177 if inode.metadata.file_type == FileType::Dir { in truncate() 214 if inode.metadata.file_type == FileType::Dir { in read_at() 247 if inode.metadata.file_type == FileType::Dir { in write_at() 293 if inode.metadata.file_type == FileType::File { in resize() 304 file_type: FileType, in create_with_data() argument 312 if inode.metadata.file_type != FileType::Dir { in create_with_data() 365 if inode.metadata.file_type != FileType::Dir { in link() 370 if other_locked.metadata.file_type == FileType::Dir { in link() [all …]
|
/DragonOS/kernel/src/filesystem/devfs/ |
H A D | mod.rs | 10 FilePrivateData, FileSystem, FileType, FsInfo, IndexNode, Magic, Metadata, SuperBlock, 75 DevFSInode::new(FileType::Dir, ModeType::from_bits_truncate(0o755), 0), in new() 130 FileType::CharDevice => { in register_device() 134 FileType::Dir, in register_device() 157 FileType::BlockDevice => { in register_device() 161 FileType::Dir, in register_device() 175 FileType::KvmDevice => { in register_device() 180 FileType::FramebufferDevice => { in register_device() 202 FileType::CharDevice => { in unregister_device() 215 FileType::BlockDevice => { in unregister_device() [all …]
|
H A D | null_dev.rs | 5 core::generate_inode_id, FilePrivateData, FileSystem, FileType, IndexNode, Metadata, 48 file_type: FileType::CharDevice, // 文件夹,block设备,char设备 in new()
|
H A D | zero_dev.rs | 5 core::generate_inode_id, FilePrivateData, FileSystem, FileType, IndexNode, Metadata, 48 file_type: FileType::CharDevice, // 文件夹,block设备,char设备 in new()
|
/DragonOS/kernel/src/filesystem/procfs/ |
H A D | mod.rs | 19 FileType, 339 file_type: FileType::Dir, in new() 371 FileType::File, in new() 386 let binding = inode.create("kmsg", FileType::File, ModeType::from_bits_truncate(0o444)); in new() 409 FileType::Dir, in register_pid() 416 FileType::File, in register_pid() 461 if let FileType::Dir = inode.metadata.file_type { in open() 483 if let FileType::Dir = guard.metadata.file_type { in close() 506 if inode.metadata.file_type == FileType::Dir { in read_at() 584 if inode.metadata.file_type == FileType::File { in resize() [all …]
|
/DragonOS/kernel/src/filesystem/devpts/ |
H A D | mod.rs | 25 filesystem::vfs::{core::do_mount_mkdir, syscall::ModeType, FileType}, 112 file_type: FileType::Dir, in new() 196 if info.file_type != FileType::Dir { in list() 219 file_type: FileType, in create_with_data() argument 223 if file_type != FileType::CharDevice { in create_with_data()
|
/DragonOS/kernel/src/filesystem/overlayfs/ |
H A D | mod.rs | 6 use super::vfs::{self, FileSystem, FileType, FsInfo, IndexNode, Metadata, SuperBlock}; 95 file_type: FileType, 110 file_type: FileType::Dir, in new() 211 if self.file_type == FileType::File || self.file_type == FileType::Dir { in ovl_lower_redirect() 229 .create(name, FileType::CharDevice, whiteout_mode)?; in create_whiteout() 239 self.file_type == FileType::CharDevice && (*flags & WHITEOUT_FLAG) != 0 in is_whiteout() 390 file_type: vfs::FileType, in create() argument
|
/DragonOS/kernel/src/filesystem/kernfs/ |
H A D | mod.rs | 26 FileType, FsInfo, IndexNode, InodeId, Magic, Metadata, SuperBlock, 99 file_type: FileType::Dir, in create_root_inode() 192 _file_type: FileType, in create_with_data() argument 303 if info.file_type != FileType::Dir { in list() 651 impl From<KernInodeType> for FileType { implementation 654 KernInodeType::Dir => FileType::Dir, in from() 655 KernInodeType::File => FileType::File, in from() 656 KernInodeType::SymLink => FileType::SymLink, in from()
|
/DragonOS/kernel/src/bpf/prog/ |
H A D | mod.rs | 10 use crate::filesystem::vfs::{FilePrivateData, FileSystem, FileType, IndexNode, Metadata}; 77 file_type: FileType::File, in metadata()
|
/DragonOS/kernel/src/virt/kvm/ |
H A D | kvm_dev.rs | 7 FilePrivateData, FileSystem, FileType, IndexNode, Metadata, 66 file_type: FileType::KvmDevice, // 文件夹,block设备,char设备 in new()
|
H A D | vcpu_dev.rs | 7 core::generate_inode_id, file::FileMode, FilePrivateData, FileSystem, FileType, IndexNode, 77 file_type: FileType::KvmDevice, // 文件夹,block设备,char设备 in new()
|
H A D | vm_dev.rs | 7 FilePrivateData, FileSystem, FileType, IndexNode, Metadata, 75 file_type: FileType::KvmDevice, // 文件夹,block设备,char设备 in new()
|
/DragonOS/kernel/src/filesystem/fat/ |
H A D | fs.rs | 29 FileSystem, FileType, IndexNode, InodeId, Metadata, 194 FileType::Dir in new() 196 FileType::File in new() 368 file_type: FileType::Dir, in new() 1446 file_type: FileType, in create() argument 1458 FileType::File => { in create() 1462 FileType::Dir => { in create() 1467 FileType::SymLink => return Err(SystemError::ENOSYS), in create() 1624 if file_type == FileType::Pipe { in unlink() 1760 if guard.metadata.file_type != FileType::Dir { in get_entry_name() [all …]
|
/DragonOS/kernel/src/driver/keyboard/ |
H A D | ps2_keyboard.rs | 26 FileSystem, FileType, IndexNode, Metadata, 89 file_type: FileType::CharDevice, // 文件夹,block设备,char设备 in new()
|
/DragonOS/kernel/src/filesystem/ |
H A D | eventfd.rs | 3 use crate::filesystem::vfs::{FilePrivateData, FileSystem, FileType, IndexNode, Metadata}; 218 file_type: FileType::File, in metadata()
|
/DragonOS/kernel/src/driver/tty/pty/ |
H A D | unix98pty.rs | 14 file::FileMode, syscall::ModeType, FilePrivateData, FileType, MountFS, ROOT_INODE, 279 FileType::CharDevice, in ptmx_open()
|
/DragonOS/kernel/src/perf/ |
H A D | mod.rs | 8 FilePrivateData, FileSystem, FileType, FsInfo, IndexNode, Metadata, SuperBlock, 143 file_type: FileType::File, in metadata()
|
/DragonOS/kernel/src/ipc/ |
H A D | pipe.rs | 4 FileType, IndexNode, Metadata, 145 file_type: FileType::Pipe, in new()
|