Lines Matching refs:SystemError
13 syscall::SystemError,
102 ) -> Result<(), SystemError> { in register_device() argument
141 return Err(SystemError::EOPNOTSUPP_OR_ENOTSUP); in register_device()
153 ) -> Result<(), SystemError> { in unregister_device() argument
159 return Err(SystemError::ENOENT); in unregister_device()
172 return Err(SystemError::ENOENT); in unregister_device()
184 return Err(SystemError::EOPNOTSUPP_OR_ENOTSUP); in unregister_device()
248 pub fn add_dir(&self, name: &str) -> Result<(), SystemError> { in add_dir() argument
252 return Err(SystemError::EEXIST); in add_dir()
265 pub fn add_dev(&self, name: &str, dev: Arc<dyn IndexNode>) -> Result<(), SystemError> { in add_dev() argument
269 return Err(SystemError::EEXIST); in add_dev()
276 pub fn remove(&self, name: &str) -> Result<(), SystemError> { in remove() argument
282 .ok_or(SystemError::ENOENT)?; in remove()
295 ) -> Result<Arc<dyn IndexNode>, SystemError> { in do_create_with_data() argument
297 return Err(SystemError::ENOTDIR); in do_create_with_data()
302 return Err(SystemError::EEXIST); in do_create_with_data()
347 ) -> Result<(), SystemError> { in open() argument
351 fn close(&self, _data: &mut super::vfs::FilePrivateData) -> Result<(), SystemError> { in close() argument
361 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create_with_data() argument
368 fn find(&self, name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in find() argument
372 return Err(SystemError::ENOTDIR); in find()
377 return Ok(inode.self_ref.upgrade().ok_or(SystemError::ENOENT)?); in find()
380 return Ok(inode.parent.upgrade().ok_or(SystemError::ENOENT)?); in find()
384 return Ok(inode.children.get(name).ok_or(SystemError::ENOENT)?.clone()); in find()
393 fn get_entry_name(&self, ino: super::vfs::InodeId) -> Result<String, SystemError> { in get_entry_name() argument
396 return Err(SystemError::ENOTDIR); in get_entry_name()
417 0=>{return Err(SystemError::ENOENT);} in get_entry_name()
425 fn ioctl(&self, _cmd: u32, _data: usize) -> Result<usize, SystemError> { in ioctl() argument
426 Err(SystemError::EOPNOTSUPP_OR_ENOTSUP) in ioctl()
429 fn list(&self) -> Result<Vec<String>, SystemError> { in list() argument
432 return Err(SystemError::ENOTDIR); in list()
443 fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() argument
447 fn set_metadata(&self, metadata: &Metadata) -> Result<(), SystemError> { in set_metadata() argument
459 fn poll(&self) -> Result<super::vfs::PollStatus, SystemError> { in poll() argument
465 return Err(SystemError::EISDIR); in poll()
478 ) -> Result<usize, SystemError> { in read_at() argument
480 Err(SystemError::EOPNOTSUPP_OR_ENOTSUP) in read_at()
490 ) -> Result<usize, SystemError> { in write_at() argument
491 Err(SystemError::EOPNOTSUPP_OR_ENOTSUP) in write_at()
504 let devfs_inode: Result<Arc<dyn IndexNode>, SystemError> = ROOT_INODE().find("dev");
507 return Err(SystemError::ENOENT);
523 pub fn devfs_register<T: DeviceINode>(name: &str, device: Arc<T>) -> Result<(), SystemError> { in devfs_register() argument
529 pub fn devfs_unregister<T: DeviceINode>(name: &str, device: Arc<T>) -> Result<(), SystemError> { in devfs_unregister() argument