Lines Matching refs:SystemError
22 use system_error::SystemError;
158 ) -> Result<Arc<dyn FileSystem + 'static>, SystemError> { in make_ramfs() argument
169 ) -> Result<Arc<dyn FileSystem + 'static>, SystemError>),
173 fn truncate(&self, len: usize) -> Result<(), SystemError> { in truncate() argument
178 return Err(SystemError::EINVAL); in truncate()
188 fn close(&self, _data: SpinLockGuard<FilePrivateData>) -> Result<(), SystemError> { in close() argument
196 ) -> Result<(), SystemError> { in open() argument
206 ) -> Result<usize, SystemError> { in read_at() argument
208 return Err(SystemError::EINVAL); in read_at()
215 return Err(SystemError::EISDIR); in read_at()
223 return Err(SystemError::ENOBUFS); in read_at()
238 ) -> Result<usize, SystemError> { in write_at() argument
240 return Err(SystemError::EINVAL); in write_at()
248 return Err(SystemError::EISDIR); in write_at()
271 fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() argument
279 fn set_metadata(&self, metadata: &Metadata) -> Result<(), SystemError> { in set_metadata() argument
291 fn resize(&self, len: usize) -> Result<(), SystemError> { in resize() argument
297 return Err(SystemError::EINVAL); in resize()
307 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create_with_data() argument
313 return Err(SystemError::ENOTDIR); in create_with_data()
317 return Err(SystemError::EEXIST); in create_with_data()
356 fn link(&self, name: &str, other: &Arc<dyn IndexNode>) -> Result<(), SystemError> { in link() argument
359 .ok_or(SystemError::EPERM)?; in link()
366 return Err(SystemError::ENOTDIR); in link()
371 return Err(SystemError::EISDIR); in link()
376 return Err(SystemError::EEXIST); in link()
388 fn unlink(&self, name: &str) -> Result<(), SystemError> { in unlink() argument
392 return Err(SystemError::ENOTDIR); in unlink()
396 return Err(SystemError::ENOTEMPTY); in unlink()
401 let to_delete = inode.children.get(&name).ok_or(SystemError::ENOENT)?; in unlink()
403 return Err(SystemError::EPERM); in unlink()
412 fn rmdir(&self, name: &str) -> Result<(), SystemError> { in rmdir() argument
417 return Err(SystemError::ENOTDIR); in rmdir()
420 let to_delete = inode.children.get(&name).ok_or(SystemError::ENOENT)?; in rmdir()
422 return Err(SystemError::ENOTDIR); in rmdir()
436 ) -> Result<(), SystemError> { in move_to() argument
440 .ok_or(SystemError::EINVAL)?; in move_to()
462 .ok_or(SystemError::EINVAL)?, in move_to()
478 fn find(&self, name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in find() argument
482 return Err(SystemError::ENOTDIR); in find()
487 return Ok(inode.self_ref.upgrade().ok_or(SystemError::ENOENT)?); in find()
491 return Ok(inode.parent.upgrade().ok_or(SystemError::ENOENT)?); in find()
499 .ok_or(SystemError::ENOENT)? in find()
505 fn get_entry_name(&self, ino: InodeId) -> Result<String, SystemError> { in get_entry_name() argument
508 return Err(SystemError::ENOTDIR); in get_entry_name()
534 0=>{return Err(SystemError::ENOENT);} in get_entry_name()
542 fn list(&self) -> Result<Vec<String>, SystemError> { in list() argument
545 return Err(SystemError::ENOTDIR); in list()
569 ) -> Result<Arc<dyn IndexNode>, SystemError> { in mknod() argument
572 return Err(SystemError::ENOTDIR); in mknod()
633 fn dname(&self) -> Result<DName, SystemError> { in dname() argument
637 fn parent(&self) -> Result<Arc<dyn IndexNode>, SystemError> { in parent() argument
643 .ok_or(SystemError::EINVAL) in parent()