Home
last modified time | relevance | path

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

12

/DragonOS/kernel/src/filesystem/devfs/
H A Dnull_dev.rs27 metadata: Metadata, field
39 metadata: Metadata { in new()
87 fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() method
88 return Ok(self.0.lock().metadata.clone()); in metadata()
99 fn set_metadata(&self, metadata: &Metadata) -> Result<(), SystemError> { in set_metadata()
101 inode.metadata.atime = metadata.atime; in set_metadata()
102 inode.metadata.mtime = metadata.mtime; in set_metadata()
103 inode.metadata.ctime = metadata.ctime; in set_metadata()
104 inode.metadata.mode = metadata.mode; in set_metadata()
105 inode.metadata.uid = metadata.uid; in set_metadata()
[all …]
H A Dzero_dev.rs27 metadata: Metadata, field
39 metadata: Metadata { in new()
87 fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() method
88 return Ok(self.0.lock().metadata.clone()); in metadata()
99 fn set_metadata(&self, metadata: &Metadata) -> Result<(), SystemError> { in set_metadata()
101 inode.metadata.atime = metadata.atime; in set_metadata()
102 inode.metadata.mtime = metadata.mtime; in set_metadata()
103 inode.metadata.ctime = metadata.ctime; in set_metadata()
104 inode.metadata.mode = metadata.mode; in set_metadata()
105 inode.metadata.uid = metadata.uid; in set_metadata()
[all …]
H A Dmod.rs127 let metadata = device.metadata()?; in register_device() localVariable
128 match metadata.file_type { in register_device()
200 match device.metadata().unwrap().file_type { in unregister_device()
253 metadata: Metadata, field
273 metadata: Metadata { in new_with_parent()
350 if guard.metadata.file_type != FileType::Dir { in do_create_with_data()
364 metadata: Metadata { in do_create_with_data()
426 if inode.metadata.file_type != FileType::Dir { in find()
454 if inode.metadata.file_type != FileType::Dir { in get_entry_name()
472 if v.metadata().unwrap().inode_id.into() == ino { in get_entry_name()
[all …]
/DragonOS/kernel/src/filesystem/overlayfs/
H A Dcopy_up.rs18 let metadata = lower_inode.metadata()?; in copy_up() localVariable
19 let new_upper_inode = self.create_upper_inode(metadata.clone())?; in copy_up()
21 let mut buffer = vec![0u8; metadata.size as usize]; in copy_up()
23 lower_inode.read_at(0, metadata.size as usize, &mut buffer, lock.lock())?; in copy_up()
25 new_upper_inode.write_at(0, metadata.size as usize, &buffer, lock.lock())?; in copy_up()
32 fn create_upper_inode(&self, metadata: Metadata) -> Result<Arc<dyn IndexNode>, SystemError> { in create_upper_inode()
39 upper_root_inode.create_with_data(&self.dname()?.0, metadata.file_type, metadata.mode, 0) in create_upper_inode()
/DragonOS/kernel/src/virt/kvm/
H A Dkvm_dev.rs46 metadata: Metadata, field
57 metadata: Metadata { in new()
106 fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() method
107 return Ok(self.0.lock().metadata.clone()); in metadata()
118 fn set_metadata(&self, metadata: &Metadata) -> Result<(), SystemError> { in set_metadata()
120 inode.metadata.atime = metadata.atime; in set_metadata()
121 inode.metadata.mtime = metadata.mtime; in set_metadata()
122 inode.metadata.ctime = metadata.ctime; in set_metadata()
123 inode.metadata.mode = metadata.mode; in set_metadata()
124 inode.metadata.uid = metadata.uid; in set_metadata()
[all …]
H A Dvcpu_dev.rs56 metadata: Metadata, field
68 metadata: Metadata { in new()
114 fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() method
115 return Ok(self.0.lock().metadata.clone()); in metadata()
126 fn set_metadata(&self, metadata: &Metadata) -> Result<(), SystemError> { in set_metadata()
128 inode.metadata.atime = metadata.atime; in set_metadata()
129 inode.metadata.mtime = metadata.mtime; in set_metadata()
130 inode.metadata.ctime = metadata.ctime; in set_metadata()
131 inode.metadata.mode = metadata.mode; in set_metadata()
132 inode.metadata.uid = metadata.uid; in set_metadata()
[all …]
H A Dvm_dev.rs54 metadata: Metadata, field
66 metadata: Metadata { in new()
112 fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() method
113 return Ok(self.0.lock().metadata.clone()); in metadata()
124 fn set_metadata(&self, metadata: &Metadata) -> Result<(), SystemError> { in set_metadata()
126 inode.metadata.atime = metadata.atime; in set_metadata()
127 inode.metadata.mtime = metadata.mtime; in set_metadata()
128 inode.metadata.ctime = metadata.ctime; in set_metadata()
129 inode.metadata.mode = metadata.mode; in set_metadata()
130 inode.metadata.uid = metadata.uid; in set_metadata()
[all …]
/DragonOS/kernel/src/filesystem/ramfs/
H A Dmod.rs64 metadata: Metadata, field
80 metadata: Metadata { 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()
271 fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() method
273 let mut metadata = inode.metadata.clone(); in metadata() localVariable
274 metadata.size = inode.data.len() as i64; in metadata()
276 return Ok(metadata); in metadata()
279 fn set_metadata(&self, metadata: &Metadata) -> Result<(), SystemError> { in set_metadata()
[all …]
/DragonOS/kernel/src/driver/keyboard/
H A Dps2_keyboard.rs71 metadata: Metadata, field
80 metadata: Metadata { in new()
149 fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() method
150 return Ok(self.0.read().metadata.clone()); in metadata()
153 fn set_metadata(&self, metadata: &Metadata) -> Result<(), SystemError> { in set_metadata()
155 inode.metadata.atime = metadata.atime; in set_metadata()
156 inode.metadata.mtime = metadata.mtime; in set_metadata()
157 inode.metadata.ctime = metadata.ctime; in set_metadata()
158 inode.metadata.mode = metadata.mode; in set_metadata()
159 inode.metadata.uid = metadata.uid; in set_metadata()
[all …]
/DragonOS/kernel/src/filesystem/procfs/
H A Dmod.rs123 metadata: Metadata, field
330 metadata: Metadata { in new()
461 if let FileType::Dir = inode.metadata.file_type { in open()
475 inode.metadata.size = file_size; in open()
483 if let FileType::Dir = guard.metadata.file_type { in close()
506 if inode.metadata.file_type == FileType::Dir { in read_at()
563 fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() method
565 let metadata = inode.metadata.clone(); in metadata() localVariable
567 return Ok(metadata); in metadata()
570 fn set_metadata(&self, metadata: &Metadata) -> Result<(), SystemError> { in set_metadata()
[all …]
/DragonOS/kernel/src/filesystem/devpts/
H A Dmod.rs103 metadata: Metadata { in new()
132 metadata: Metadata, field
154 fn metadata(&self) -> Result<super::vfs::Metadata, SystemError> { in metadata() method
156 let metadata = inode.metadata.clone(); in metadata() localVariable
158 return Ok(metadata); in metadata()
195 let info = self.metadata()?; in list()
241 let mut metadata = result.metadata()?; in create_with_data() localVariable
243 metadata.mode.insert(ModeType::S_IFCHR); in create_with_data()
244 metadata.raw_dev = in create_with_data()
247 result.set_metadata(&metadata)?; in create_with_data()
/DragonOS/kernel/src/net/socket/
H A Dunix.rs13 metadata: SocketMetadata, field
33 let metadata = SocketMetadata::new( in new() localVariable
44 metadata, in new()
109 fn metadata(&self) -> SocketMetadata { in metadata() method
110 self.metadata.clone() in metadata()
128 metadata: SocketMetadata, field
148 let metadata = SocketMetadata::new( in new() localVariable
159 metadata, in new()
224 fn metadata(&self) -> SocketMetadata { in metadata() method
225 self.metadata.clone() in metadata()
H A Dinet.rs34 metadata: SocketMetadata, field
72 let metadata = SocketMetadata::new( in new() localVariable
85 metadata, in new()
127 if !self.metadata.options.contains(SocketOptions::BLOCK) { in read()
218 fn metadata(&self) -> SocketMetadata { in metadata() method
219 self.metadata.clone() in metadata()
246 metadata: SocketMetadata, field
278 let metadata = SocketMetadata::new( in new() localVariable
291 metadata, in new()
300 ip.port = PORT_MANAGER.get_ephemeral_port(self.metadata.socket_type)?; in do_bind()
[all …]
/DragonOS/kernel/src/filesystem/vfs/
H A Dmount.rs148 return Ok(self.inner_inode.fs().root_inode().metadata()?.inode_id in is_mountpoint_root()
149 == self.inner_inode.metadata()?.inode_id); in is_mountpoint_root()
158 let inode_id = self.metadata().unwrap().inode_id; in overlaid_inode()
208 if self.metadata()?.file_type != FileType::Dir { in do_umount()
215 .remove(&self.inner_inode.metadata()?.inode_id) in do_umount()
223 while current.metadata()?.inode_id != ROOT_INODE().metadata()?.inode_id { in do_absolute_path()
310 fn metadata(&self) -> Result<super::Metadata, SystemError> { in metadata() method
311 return self.inner_inode.metadata(); in metadata()
315 fn set_metadata(&self, metadata: &super::Metadata) -> Result<(), SystemError> { in set_metadata()
316 return self.inner_inode.set_metadata(metadata); in set_metadata()
[all …]
H A Dsyscall.rs734 let metadata = inode.metadata()?; in chdir() localVariable
735 if metadata.file_type == FileType::Dir { in chdir()
872 if old_inode.metadata().unwrap().file_type == FileType::Dir { in do_linkat()
1299 let metadata = file.metadata()?; in do_fstat() localVariable
1300 kstat.size = metadata.size; in do_fstat()
1301 kstat.dev_id = metadata.dev_id as u64; in do_fstat()
1302 kstat.inode = metadata.inode_id.into() as u64; in do_fstat()
1303 kstat.blcok_size = metadata.blk_size as i64; in do_fstat()
1304 kstat.blocks = metadata.blocks as u64; in do_fstat()
1306 kstat.atime.tv_sec = metadata.atime.tv_sec; in do_fstat()
[all …]
H A Dfile.rs220 let file_type = inode.metadata()?.file_type; in new()
345 if offset > self.inode.metadata()?.size as usize { in do_write()
374 pub fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() method
375 return self.inode.metadata(); in metadata()
388 let file_type = self.inode.metadata()?.file_type; in lseek()
400 let metadata = self.metadata()?; in lseek() localVariable
401 metadata.size + offset in lseek()
481 dirent.d_ino = sub_inode.metadata().unwrap().inode_id.into() as u64; in readdir()
482 dirent.d_type = sub_inode.metadata().unwrap().file_type.get_file_type_num() as u8; in readdir()
H A Dcore.rs203 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()
/DragonOS/user/apps/test-chown/src/
H A Dmain.rs9 fs::{self, metadata, File},
19 let metadata = std::fs::metadata(filename)?; in print_file_owner_group() localVariable
20 let uid = metadata.uid(); in print_file_owner_group()
21 let gid = metadata.gid(); in print_file_owner_group()
/DragonOS/kernel/src/filesystem/kernfs/
H A Dmod.rs87 let metadata = Metadata { in create_root_inode() localVariable
107 metadata, in create_root_inode()
147 metadata: Metadata, field
176 fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() method
177 return Ok(self.inner.read().metadata.clone()); in metadata()
265 .find(|(_, v)| v.metadata().unwrap().inode_id == ino) in get_entry_name()
275 return Ok((name, entry.metadata()?)); in get_entry_name_and_metadata()
302 let info = self.metadata()?; in list()
391 mut metadata: Metadata, in new()
396 metadata.file_type = inode_type.into(); in new()
[all …]
/DragonOS/kernel/src/libs/lib_ui/
H A Dtextui.rs76 let metadata = ScmUiFrameworkMetadata::new("TextUI".to_string(), ScmFramworkType::Text); in textui_framwork_init() localVariable
77 debug!("textui metadata: {:?}", metadata); in textui_framwork_init()
79 let vlines_num = (metadata.buf_info().height() / TEXTUI_CHAR_HEIGHT) as usize; in textui_framwork_init()
81 let chars_num = (metadata.buf_info().width() / TEXTUI_CHAR_WIDTH) as usize; in textui_framwork_init()
100 metadata, in textui_framwork_init()
371 textui_framework().metadata.read().buf_info().width() as usize + now_index in get_index_of_next_line()
374 textui_framework().metadata.read().buf_info().width() as usize * y + x in get_index_by_x_y()
432 let mut _binding = textui_framework().metadata.read().buf_info(); in textui_refresh_character()
929 metadata: RwLock<ScmUiFrameworkMetadata>, field
938 metadata: ScmUiFrameworkMetadata, in new()
[all …]
H A Dscreen_manager.rs274 fn metadata(&self) -> Result<ScmUiFrameworkMetadata, SystemError> { in metadata() method
303 let metadata = framework.metadata()?; in scm_framework_enable() localVariable
311 video_refresh_manager().set_refresh_target(&metadata.buf_info)?; in scm_framework_enable()
367 if !(*framework).metadata()?.buf_info.is_double_buffer() { in scm_enable_double_buffer()
442 if framework.metadata()?.buf_info().is_device_buffer() { in true_scm_reinit()
/DragonOS/kernel/src/filesystem/fat/
H A Dfs.rs114 metadata: Metadata, field
137 self.metadata.size = f.size() as i64; in update_metadata()
140 self.metadata.size = d.size(&self.fs.upgrade().unwrap().clone()) as i64; in update_metadata()
205 metadata: Metadata { in new()
355 metadata: Metadata { in new()
1485 fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() method
1486 return Ok(self.0.lock().metadata.clone()); in metadata()
1488 fn set_metadata(&self, metadata: &Metadata) -> Result<(), SystemError> { in set_metadata()
1490 inode.metadata.atime = metadata.atime; in set_metadata()
1491 inode.metadata.mtime = metadata.mtime; in set_metadata()
[all …]
/DragonOS/kernel/src/ipc/
H A Dpipe.rs59 metadata: Metadata, field
136 metadata: Metadata { in new()
299 fn metadata(&self) -> Result<crate::filesystem::vfs::Metadata, SystemError> { in metadata() method
301 let mut metadata = inode.metadata.clone(); in metadata() localVariable
302 metadata.size = inode.data.len() as i64; in metadata()
304 return Ok(metadata); in metadata()
433 return Ok((name, entry.metadata()?)); in get_entry_name_and_metadata()
/DragonOS/kernel/src/driver/tty/
H A Dtty_device.rs64 metadata: Metadata, field
76 metadata: Metadata::new(FileType::CharDevice, ModeType::from_bits_truncate(0o755)), in new()
81 &mut self.metadata in metadata_mut()
121 dev.inner.write().metadata.raw_dev = dev_num; in new()
147 let dev_num = self.metadata()?.raw_dev; in open()
290 fn metadata(&self) -> Result<crate::filesystem::vfs::Metadata, SystemError> { in metadata() method
291 Ok(self.inner.read().metadata.clone()) in metadata()
294 fn set_metadata(&self, metadata: &Metadata) -> Result<(), SystemError> { in set_metadata()
296 guard.metadata = metadata.clone(); in set_metadata()
/DragonOS/kernel/crates/rbpf/
H A DCargo.toml3 # Project metadata
8 # Additional metadata for packaging

12