/DragonOS-0.1.8/kernel/src/filesystem/vfs/ |
D | mod.rs | 27 pub enum FileType { enum 65 impl FileType { implementation 68 FileType::File => DT_REG, in get_file_type_num() 69 FileType::Dir => DT_DIR, in get_file_type_num() 70 FileType::BlockDevice => DT_BLK, in get_file_type_num() 71 FileType::CharDevice => DT_CHR, in get_file_type_num() 72 FileType::Pipe => DT_FIFO, in get_file_type_num() 73 FileType::SymLink => DT_LNK, in get_file_type_num() 74 FileType::Socket => DT_SOCK, in get_file_type_num() 187 file_type: FileType, in create() argument [all …]
|
D | core.rs | 17 vfs::{mount::MountFS, FileSystem, FileType}, 60 .create("proc", FileType::Dir, 0o777) in vfs_init() 63 .create("dev", FileType::Dir, 0o777) in vfs_init() 66 .create("sys", FileType::Dir, 0o777) in vfs_init() 119 .create(mountpoint_name, FileType::Dir, 0o777) in do_migrate() 221 parent_inode.create(filename, FileType::Dir, 0o777)?; in do_mkdir() 252 if parent_inode.metadata()?.file_type != FileType::Dir { in do_remove_dir() 257 if target_inode.metadata()?.file_type != FileType::Dir { in do_remove_dir() 284 if inode.unwrap().metadata()?.file_type == FileType::Dir { in do_unlink_at() 292 if parent_inode.metadata()?.file_type != FileType::Dir { in do_unlink_at()
|
D | syscall.rs | 18 Dirent, FileType, IndexNode, ROOT_INODE, 151 parent_inode.create(filename, FileType::File, 0o777)?; in open() 161 let file_type: FileType = inode.metadata()?.file_type; in open() 163 if mode.contains(FileMode::O_DIRECTORY) && file_type != FileType::Dir { in open() 170 && file_type == FileType::File in open() 291 if let FileType::Dir = i.file_type { in chdir() 601 FileType::File => kstat.mode.insert(ModeType::S_IFMT), in do_fstat() 602 FileType::Dir => kstat.mode.insert(ModeType::S_IFDIR), in do_fstat() 603 FileType::BlockDevice => kstat.mode.insert(ModeType::S_IFBLK), in do_fstat() 604 FileType::CharDevice => kstat.mode.insert(ModeType::S_IFCHR), in do_fstat() [all …]
|
D | file.rs | 11 use super::{Dirent, FileType, IndexNode, Metadata}; 95 file_type: FileType, 107 let file_type: FileType = inode.metadata()?.file_type; in new() 190 FileType::Pipe | FileType::CharDevice => { in lseek() 314 pub fn file_type(&self) -> FileType { in file_type() argument
|
D | mount.rs | 10 use super::{file::FileMode, FilePrivateData, FileSystem, FileType, IndexNode, InodeId}; 137 file_type: FileType, in create_with_data() argument 204 file_type: FileType, in create() argument 325 if metadata.file_type != FileType::Dir { in mount()
|
/DragonOS-0.1.8/kernel/src/filesystem/ramfs/ |
D | mod.rs | 11 filesystem::vfs::{core::generate_inode_id, FileType}, 92 file_type: FileType::Dir, in new() 131 if inode.metadata.file_type == FileType::Dir { in read_at() 164 if inode.metadata.file_type == FileType::Dir { in write_at() 185 if inode.metadata.file_type == FileType::Dir { in poll() 222 if inode.metadata.file_type == FileType::File { in resize() 233 file_type: FileType, in create_with_data() argument 240 if inode.metadata.file_type != FileType::Dir { in create_with_data() 290 if inode.metadata.file_type != FileType::Dir { in link() 295 if other_locked.metadata.file_type == FileType::Dir { in link() [all …]
|
/DragonOS-0.1.8/kernel/src/filesystem/devfs/ |
D | mod.rs | 8 FileSystem, FileType, FsInfo, IndexNode, Metadata, PollStatus, 55 DevFSInode::new(FileType::Dir, 0o755 as u32, 0), in new() 107 FileType::CharDevice => { in register_device() 109 dev_root_inode.create("char", FileType::Dir, 0o755)?; in register_device() 126 FileType::BlockDevice => { in register_device() 128 dev_root_inode.create("block", FileType::Dir, 0o755)?; in register_device() 157 FileType::CharDevice => { in unregister_device() 170 FileType::BlockDevice => { in unregister_device() 212 pub fn new(dev_type_: FileType, mode_: u32, data_: usize) -> Self { in new() argument 218 dev_type_: FileType, in new_with_parent() argument [all …]
|
D | null_dev.rs | 4 core::generate_inode_id, FilePrivateData, FileSystem, FileType, IndexNode, Metadata, PollStatus, 45 file_type: FileType::CharDevice, // 文件夹,block设备,char设备 in new()
|
D | zero_dev.rs | 4 core::generate_inode_id, FilePrivateData, FileSystem, FileType, IndexNode, Metadata, PollStatus, 45 file_type: FileType::CharDevice, // 文件夹,block设备,char设备 in new()
|
/DragonOS-0.1.8/kernel/src/filesystem/sysfs/ |
D | mod.rs | 2 core::generate_inode_id, file::FileMode, FileSystem, FileType, FsInfo, IndexNode, Metadata, 97 SysFSInode::new(FileType::Dir, 0o755 as u32, 0), in new() 193 if inode.metadata.file_type == FileType::Dir { in poll() 210 if inode.metadata.file_type != FileType::Dir { in get_entry_name() 243 if inode.metadata.file_type != FileType::Dir { in find() 271 if info.file_type != FileType::Dir { in list() 289 _file_type: FileType, in do_create_with_data() argument 293 if guard.metadata.file_type != FileType::Dir { in do_create_with_data() 346 match self.do_create_with_data(guard, name, FileType::Dir, 0o755 as u32, 0) { in add_dir() 415 pub fn new(dev_type_: FileType, mode_: u32, data_: usize) -> Self { in new() argument [all …]
|
/DragonOS-0.1.8/kernel/src/filesystem/procfs/ |
D | mod.rs | 16 FileType, 254 file_type: FileType::Dir, in new() 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() 329 if let FileType::Dir = inode.metadata.file_type { in open() 350 if let FileType::Dir = guard.metadata.file_type { in close() 379 if inode.metadata.file_type == FileType::Dir { in read_at() 427 if inode.metadata.file_type == FileType::Dir { in poll() 463 if inode.metadata.file_type == FileType::File { in resize() 474 file_type: FileType, in create_with_data() argument [all …]
|
/DragonOS-0.1.8/kernel/src/driver/disk/ahci/ |
D | ahci_inode.rs | 4 core::generate_inode_id, make_rawdev, FilePrivateData, FileSystem, FileType, IndexNode, 51 file_type: FileType::BlockDevice, // 文件夹,block设备,char设备 in new()
|
/DragonOS-0.1.8/kernel/src/driver/keyboard/ |
D | ps2_keyboard.rs | 9 vfs::{core::generate_inode_id, file::FileMode, FileType, IndexNode, Metadata, PollStatus}, 61 file_type: FileType::CharDevice, // 文件夹,block设备,char设备 in new()
|
/DragonOS-0.1.8/kernel/src/ipc/ |
D | pipe.rs | 5 core::generate_inode_id, FilePrivateData, FileSystem, FileType, IndexNode, Metadata, 57 file_type: FileType::Pipe, in new()
|
/DragonOS-0.1.8/kernel/src/process/ |
D | process.rs | 13 FileType, ROOT_INODE, 307 if f.file_type() != FileType::Socket { in get_socket()
|
/DragonOS-0.1.8/kernel/src/driver/tty/ |
D | tty_device.rs | 10 vfs::{file::FileMode, FilePrivateData, FileType, IndexNode, Metadata, ROOT_INODE}, 270 let mut metadata = Metadata::new(FileType::CharDevice, 0o755); in new()
|
/DragonOS-0.1.8/kernel/src/filesystem/fat/ |
D | fs.rs | 15 FileSystem, FileType, IndexNode, InodeId, Metadata, PollStatus, 167 FileType::Dir in new() 169 FileType::File in new() 310 file_type: FileType::Dir, in new() 1414 if inode.metadata.file_type == FileType::Dir { in poll() 1424 file_type: FileType, in create() argument 1437 FileType::File => { in create() 1441 FileType::Dir => { in create() 1446 FileType::SymLink => return Err(SystemError::EOPNOTSUPP_OR_ENOTSUP), in create() 1629 if guard.metadata.file_type != FileType::Dir { in get_entry_name()
|
/DragonOS-0.1.8/kernel/src/net/ |
D | socket.rs | 13 filesystem::vfs::{FileType, IndexNode, Metadata, PollStatus}, 1206 file_type: FileType::Socket, in metadata()
|