Lines Matching refs:i32
125 ) -> Result<usize, i32> { in read_at() argument
127 return Err(-(EINVAL as i32)); in read_at()
134 return Err(-(EISDIR as i32)); in read_at()
142 return Err(-(ENOBUFS as i32)); in read_at()
157 ) -> Result<usize, i32> { in write_at() argument
159 return Err(-(EINVAL as i32)); in write_at()
167 return Err(-(EISDIR as i32)); in write_at()
182 fn poll(&self) -> Result<PollStatus, i32> { in poll() argument
188 return Err(-(EISDIR as i32)); in poll()
204 fn metadata(&self) -> Result<Metadata, i32> { in metadata() argument
212 fn set_metadata(&self, metadata: &Metadata) -> Result<(), i32> { in set_metadata() argument
224 fn resize(&self, len: usize) -> Result<(), i32> { in resize() argument
230 return Err(-(EINVAL as i32)); in resize()
240 ) -> Result<Arc<dyn IndexNode>, i32> { in create_with_data() argument
245 return Err(-(ENOTDIR as i32)); in create_with_data()
249 return Err(-(EEXIST as i32)); in create_with_data()
286 fn link(&self, name: &str, other: &Arc<dyn IndexNode>) -> Result<(), i32> { in link() argument
289 .ok_or(-(EPERM as i32))?; in link()
295 return Err(-(ENOTDIR as i32)); in link()
300 return Err(-(EISDIR as i32)); in link()
305 return Err(-(EEXIST as i32)); in link()
317 fn unlink(&self, name: &str) -> Result<(), i32> { in unlink() argument
321 return Err(-(ENOTDIR as i32)); in unlink()
325 return Err(-(ENOTEMPTY as i32)); in unlink()
329 let to_delete = inode.children.get(name).ok_or(-(ENOENT as i32))?; in unlink()
331 return Err(-(EPERM as i32)); in unlink()
340 fn rmdir(&self, name: &str) -> Result<(), i32> { in rmdir() argument
344 return Err(-(ENOTDIR as i32)); in rmdir()
347 let to_delete = inode.children.get(name).ok_or(-(ENOENT as i32))?; in rmdir()
349 return Err(-(ENOTDIR as i32)); in rmdir()
363 ) -> Result<(), i32> { in move_() argument
377 fn find(&self, name: &str) -> Result<Arc<dyn IndexNode>, i32> { in find() argument
381 return Err(-(ENOTDIR as i32)); in find()
386 return Ok(inode.self_ref.upgrade().ok_or(-(ENOENT as i32))?); in find()
390 return Ok(inode.parent.upgrade().ok_or(-(ENOENT as i32))?); in find()
394 return Ok(inode.children.get(name).ok_or(-(ENOENT as i32))?.clone()); in find()
399 fn get_entry_name(&self, ino: InodeId) -> Result<String, i32> { in get_entry_name() argument
402 return Err(-(ENOTDIR as i32)); in get_entry_name()
423 0=>{return Err(-(ENOENT as i32));} in get_entry_name()
431 fn list(&self) -> Result<Vec<String>, i32> { in list() argument
434 return Err(-(ENOTDIR as i32)); in list()