Lines Matching refs:SystemError

5 use system_error::SystemError;
60 pub fn vfs_init() -> Result<(), SystemError> { in vfs_init()
85 fn migrate_virtual_filesystem(new_fs: Arc<dyn FileSystem>) -> Result<(), SystemError> { in migrate_virtual_filesystem() argument
132 pub fn mount_root_fs() -> Result<(), SystemError> { in mount_root_fs()
142 .ok_or(SystemError::ENODEV)? in mount_root_fs()
145 let fatfs: Result<Arc<FATFileSystem>, SystemError> = FATFileSystem::new(gendisk); in mount_root_fs()
173 ) -> Result<Arc<dyn IndexNode>, SystemError> { in do_mkdir_at() argument
187 pub fn do_remove_dir(dirfd: i32, path: &str) -> Result<u64, SystemError> { in do_remove_dir() argument
196 return Err(SystemError::EINVAL); in do_remove_dir()
204 return Err(SystemError::ENOTDIR); in do_remove_dir()
210 return Err(SystemError::ENOTDIR); in do_remove_dir()
220 pub fn do_unlink_at(dirfd: i32, path: &str) -> Result<u64, SystemError> { in do_unlink_at() argument
225 let inode: Result<Arc<dyn IndexNode>, SystemError> = in do_unlink_at()
231 if errno == SystemError::ENOENT { in do_unlink_at()
232 return Err(SystemError::ENOENT); in do_unlink_at()
237 return Err(SystemError::EPERM); in do_unlink_at()
246 return Err(SystemError::ENOTDIR); in do_unlink_at()
255 pub fn do_symlinkat(from: *const u8, newdfd: i32, to: *const u8) -> Result<usize, SystemError> { in do_symlinkat() argument
258 .map_err(|_| SystemError::EINVAL)?; in do_symlinkat()
261 .map_err(|_| SystemError::EINVAL)?; in do_symlinkat()
281 return Err(SystemError::ENOTDIR); in do_symlinkat()
313 pub fn do_mount(fs: Arc<dyn FileSystem>, mount_point: &str) -> Result<Arc<MountFS>, SystemError> { in do_mount() argument
322 return Err(SystemError::EBUSY); in do_mount()
346 ) -> Result<Arc<MountFS>, SystemError> { in do_mount_mkdir() argument
354 return Err(SystemError::EBUSY); in do_mount_mkdir()
382 ) -> Result<Arc<MountFS>, SystemError> { in do_umount2() argument
385 let do_umount = || -> Result<Arc<MountFS>, SystemError> { in do_umount2()
391 return Err(SystemError::EINVAL); in do_umount2()