Lines Matching refs:name
100 name: &str, in register_device()
118 dev_char_inode.add_dev(name, device.clone())?; in register_device()
121 if name.starts_with("tty") && name.len() > 3 { in register_device()
122 dev_root_inode.add_dev(name, device.clone())?; in register_device()
137 dev_block_inode.add_dev(name, device.clone())?; in register_device()
151 name: &str, in unregister_device()
168 dev_char_inode.remove(name)?; in unregister_device()
181 dev_block_inode.remove(name)?; in unregister_device()
248 pub fn add_dir(&self, name: &str) -> Result<(), SystemError> { in add_dir()
251 if guard.children.contains_key(name) { in add_dir()
255 match self.do_create_with_data(guard, name, FileType::Dir, 0o755 as u32, 0) { in add_dir()
265 pub fn add_dev(&self, name: &str, dev: Arc<dyn IndexNode>) -> Result<(), SystemError> { in add_dev()
268 if this.children.contains_key(name) { in add_dev()
272 this.children.insert(name.to_string(), dev); in add_dev()
276 pub fn remove(&self, name: &str) -> Result<(), SystemError> { in remove()
281 .remove(name) in remove()
357 name: &str, in create_with_data()
365 return self.do_create_with_data(guard, name, file_type, mode, data); in create_with_data()
368 fn find(&self, name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in find()
375 match name { in find()
382 name => { in find()
384 return Ok(inode.children.get(name).ok_or(SystemError::ENOENT)?.clone()); in find()
523 pub fn devfs_register<T: DeviceINode>(name: &str, device: Arc<T>) -> Result<(), SystemError> { in devfs_register()
524 return devfs_exact_ref!().register_device(name, device); in devfs_register()
529 pub fn devfs_unregister<T: DeviceINode>(name: &str, device: Arc<T>) -> Result<(), SystemError> { in devfs_unregister()
530 return devfs_exact_ref!().unregister_device(name, device); in devfs_unregister()