Home
last modified time | relevance | path

Searched refs:metadata (Results 1 – 20 of 20) sorted by relevance

/DragonOS-0.1.8/kernel/src/filesystem/devfs/
Dnull_dev.rs24 metadata: Metadata, field
36 metadata: Metadata { in new()
80 fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() method
81 return Ok(self.0.lock().metadata.clone()); in metadata()
92 fn set_metadata(&self, metadata: &Metadata) -> Result<(), SystemError> { in set_metadata()
94 inode.metadata.atime = metadata.atime; in set_metadata()
95 inode.metadata.mtime = metadata.mtime; in set_metadata()
96 inode.metadata.ctime = metadata.ctime; in set_metadata()
97 inode.metadata.mode = metadata.mode; in set_metadata()
98 inode.metadata.uid = metadata.uid; in set_metadata()
[all …]
Dzero_dev.rs24 metadata: Metadata, field
36 metadata: Metadata { in new()
80 fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() method
81 return Ok(self.0.lock().metadata.clone()); in metadata()
92 fn set_metadata(&self, metadata: &Metadata) -> Result<(), SystemError> { in set_metadata()
94 inode.metadata.atime = metadata.atime; in set_metadata()
95 inode.metadata.mtime = metadata.mtime; in set_metadata()
96 inode.metadata.ctime = metadata.ctime; in set_metadata()
97 inode.metadata.mode = metadata.mode; in set_metadata()
98 inode.metadata.uid = metadata.uid; in set_metadata()
[all …]
Dmod.rs104 let metadata = device.metadata()?; in register_device() localVariable
105 match metadata.file_type { in register_device()
155 match device.metadata().unwrap().file_type { in unregister_device()
208 metadata: Metadata, field
226 metadata: Metadata { in new_with_parent()
296 if guard.metadata.file_type != FileType::Dir { in do_create_with_data()
310 metadata: Metadata { in do_create_with_data()
371 if inode.metadata.file_type != FileType::Dir { in find()
395 if inode.metadata.file_type != FileType::Dir { in get_entry_name()
412 .filter(|k| inode.children.get(*k).unwrap().metadata().unwrap().inode_id == ino) in get_entry_name()
[all …]
/DragonOS-0.1.8/kernel/src/driver/disk/ahci/
Dahci_inode.rs27 metadata: Metadata, field
42 metadata: Metadata { in new()
86 fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() method
87 return Ok(self.0.lock().metadata.clone()); in metadata()
98 fn set_metadata(&self, metadata: &Metadata) -> Result<(), SystemError> { in set_metadata()
100 inode.metadata.atime = metadata.atime; in set_metadata()
101 inode.metadata.mtime = metadata.mtime; in set_metadata()
102 inode.metadata.ctime = metadata.ctime; in set_metadata()
103 inode.metadata.mode = metadata.mode; in set_metadata()
104 inode.metadata.uid = metadata.uid; in set_metadata()
[all …]
/DragonOS-0.1.8/kernel/src/filesystem/ramfs/
Dmod.rs51 metadata: Metadata, field
83 metadata: Metadata { 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()
200 fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() method
202 let mut metadata = inode.metadata.clone(); in metadata() localVariable
203 metadata.size = inode.data.len() as i64; in metadata()
205 return Ok(metadata); in metadata()
208 fn set_metadata(&self, metadata: &Metadata) -> Result<(), SystemError> { in set_metadata()
[all …]
/DragonOS-0.1.8/kernel/src/driver/keyboard/
Dps2_keyboard.rs40 metadata: Metadata, field
52 metadata: Metadata { in new()
156 fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() method
157 return Ok(self.0.read().metadata.clone()); in metadata()
160 fn set_metadata(&self, metadata: &Metadata) -> Result<(), SystemError> { in set_metadata()
162 inode.metadata.atime = metadata.atime; in set_metadata()
163 inode.metadata.mtime = metadata.mtime; in set_metadata()
164 inode.metadata.ctime = metadata.ctime; in set_metadata()
165 inode.metadata.mode = metadata.mode; in set_metadata()
166 inode.metadata.uid = metadata.uid; in set_metadata()
[all …]
/DragonOS-0.1.8/kernel/src/filesystem/procfs/
Dmod.rs98 metadata: Metadata, field
245 metadata: Metadata { in new()
329 if let FileType::Dir = inode.metadata.file_type { in open()
342 inode.metadata.size = file_size; 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()
442 fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() method
444 let metadata = inode.metadata.clone(); in metadata() localVariable
446 return Ok(metadata); in metadata()
[all …]
/DragonOS-0.1.8/kernel/src/filesystem/vfs/
Dmount.rs105 return Ok(self.inner_inode.fs().root_inode().metadata()?.inode_id in is_mountpoint_root()
106 == self.inner_inode.metadata()?.inode_id); in is_mountpoint_root()
115 let inode_id = self.metadata().unwrap().inode_id; in overlaid_inode()
186 fn metadata(&self) -> Result<super::Metadata, SystemError> { in metadata() method
187 return self.inner_inode.metadata(); in metadata()
191 fn set_metadata(&self, metadata: &super::Metadata) -> Result<(), SystemError> { in set_metadata()
192 return self.inner_inode.set_metadata(metadata); in set_metadata()
222 let inode_id = self.inner_inode.find(name)?.metadata()?.inode_id; in unlink()
234 let inode_id = self.inner_inode.find(name)?.metadata()?.inode_id; in rmdir()
324 let metadata = self.inner_inode.metadata()?; in mount() localVariable
[all …]
Dfile.rs107 let file_type: FileType = inode.metadata()?.file_type; in new()
137 if self.offset > self.inode.metadata()?.size as usize { in read()
163 let file_size = self.inode.metadata()?.size as usize; in write()
175 pub fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() method
176 return self.inode.metadata(); in metadata()
188 let file_type = self.inode.metadata()?.file_type; in lseek()
205 let metadata = self.metadata()?; in lseek() localVariable
206 pos = metadata.size + offset; in lseek()
271 dirent.d_ino = sub_inode.metadata().unwrap().inode_id as u64; in readdir()
274 dirent.d_type = sub_inode.metadata().unwrap().file_type.get_file_type_num() as u8; in readdir()
Dsyscall.rs161 let file_type: FileType = inode.metadata()?.file_type; in open()
285 match inode.metadata() { in chdir()
580 match file.metadata() { in do_fstat()
581 Ok(metadata) => { in do_fstat()
582 kstat.size = metadata.size as i64; in do_fstat()
583 kstat.dev_id = metadata.dev_id as u64; in do_fstat()
584 kstat.inode = metadata.inode_id as u64; in do_fstat()
585 kstat.blcok_size = metadata.blk_size as i64; in do_fstat()
586 kstat.blocks = metadata.blocks as u64; in do_fstat()
588 kstat.atime.tv_sec = metadata.atime.tv_sec; in do_fstat()
[all …]
Dmod.rs150 fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() method
299 return Ok((name, entry.metadata()?)); in get_entry_name_and_metadata()
378 if self.metadata()?.file_type != FileType::Dir { in lookup_follow_symlink()
395 if result.metadata()?.file_type != FileType::Dir { in lookup_follow_symlink()
423 if inode.metadata()?.file_type == FileType::SymLink && max_follow_times > 0 { in lookup_follow_symlink()
Dcore.rs252 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()
/DragonOS-0.1.8/kernel/src/ipc/
Dpipe.rs34 metadata: Metadata, field
48 metadata: Metadata { in new()
142 fn metadata(&self) -> Result<crate::filesystem::vfs::Metadata, SystemError> { in metadata() method
144 let mut metadata = inode.metadata.clone(); in metadata() localVariable
145 metadata.size = inode.data.len() as i64; in metadata()
147 return Ok(metadata); in metadata()
220 return Ok((name, entry.metadata()?)); in get_entry_name_and_metadata()
/DragonOS-0.1.8/kernel/src/filesystem/sysfs/
Dmod.rs193 if inode.metadata.file_type == FileType::Dir { in poll()
200 fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() method
201 return Ok(self.0.lock().metadata.clone()); in metadata()
210 if inode.metadata.file_type != FileType::Dir { in get_entry_name()
227 .filter(|k| inode.children.get(*k).unwrap().metadata().unwrap().inode_id == ino) in get_entry_name()
234 …_id={inode_id}, to find={to_find}", key_len=key.len(), inode_id = inode.metadata.inode_id, to_find… in get_entry_name()
243 if inode.metadata.file_type != FileType::Dir { in find()
270 let info = self.metadata()?; in list()
293 if guard.metadata.file_type != FileType::Dir { in do_create_with_data()
307 metadata: Metadata { in do_create_with_data()
[all …]
/DragonOS-0.1.8/kernel/src/net/
Dsocket.rs228 metadata: SocketMetadata, field
266 let metadata = SocketMetadata::new( in new() localVariable
277 metadata, in new()
302 if !self.metadata.options.contains(SocketOptions::BLOCK) { in read()
395 fn metadata(&self) -> Result<SocketMetadata, SystemError> { in metadata() method
396 Ok(self.metadata.clone()) in metadata()
411 metadata: SocketMetadata, field
443 let metadata = SocketMetadata::new( in new() localVariable
454 metadata, in new()
461 PORT_MANAGER.get_port(self.metadata.socket_type, ip.port, self.handle.clone())?; in do_bind()
[all …]
Dmod.rs182 fn metadata(&self) -> Result<SocketMetadata, SystemError>; in metadata() method
Dsyscall.rs118 *optval = socket.metadata()?.send_buf_size as u32; in getsockopt()
127 *optval = socket.metadata()?.recv_buf_size as u32; in getsockopt()
/DragonOS-0.1.8/kernel/src/driver/tty/
Dtty_device.rs42 metadata: Metadata, field
228 fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() method
229 return Ok(self.private_data.read().metadata.clone()); in metadata()
270 let mut metadata = Metadata::new(FileType::CharDevice, 0o755); in new() localVariable
271 metadata.size = TtyCore::STDIN_BUF_SIZE as i64; in new()
274 metadata, in new()
/DragonOS-0.1.8/kernel/src/filesystem/fat/
Dfs.rs98 metadata: Metadata, field
112 self.metadata.size = f.size() as i64; in update_metadata()
115 self.metadata.size = d.size(&self.fs.upgrade().unwrap().clone()) as i64; in update_metadata()
178 metadata: Metadata { in new()
297 metadata: Metadata { in new()
1414 if inode.metadata.file_type == FileType::Dir { in poll()
1464 fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() method
1465 return Ok(self.0.lock().metadata.clone()); in metadata()
1470 let old_size = guard.metadata.size as usize; in resize()
1629 if guard.metadata.file_type != FileType::Dir { in get_entry_name()
[all …]
/DragonOS-0.1.8/kernel/src/libs/
Delf.rs299 if (file.metadata()?.size as usize) < offset_in_file + size { in do_load_file()