Lines Matching refs:i32
48 pub extern "C" fn vfs_init() -> i32 { in vfs_init()
102 ) -> Result<(), i32> { in do_migrate() argument
120 fn migrate_virtual_filesystem(new_fs: Arc<dyn FileSystem>) -> Result<(), i32> { in migrate_virtual_filesystem() argument
153 pub extern "C" fn mount_root_fs() -> i32 { in mount_root_fs()
163 let fatfs: Result<Arc<FATFileSystem>, i32> = FATFileSystem::new(partiton); in mount_root_fs()
187 pub fn do_open(path: &str, mode: FileMode) -> Result<i32, i32> { in do_open() argument
190 return Err(-(ENAMETOOLONG as i32)); in do_open()
193 let inode: Result<Arc<dyn IndexNode>, i32> = ROOT_INODE().lookup(path); in do_open()
200 && errno == -(ENOENT as i32) in do_open()
220 return Err(-(ENOTDIR as i32)); in do_open()
250 pub fn do_read(fd: i32, buf: &mut [u8]) -> Result<usize, i32> { in do_read() argument
253 return Err(-(EBADF as i32)); in do_read()
267 pub fn do_write(fd: i32, buf: &[u8]) -> Result<usize, i32> { in do_write() argument
270 return Err(-(EBADF as i32)); in do_write()
284 pub fn do_lseek(fd: i32, seek: SeekFrom) -> Result<usize, i32> { in do_lseek() argument
287 return Err(-(EBADF as i32)); in do_lseek()
294 pub fn do_mkdir(path: &str, _mode: FileMode) -> Result<u64, i32> { in do_mkdir() argument
297 return Err(-(ENAMETOOLONG as i32)); in do_mkdir()
300 let inode: Result<Arc<dyn IndexNode>, i32> = ROOT_INODE().lookup(path); in do_mkdir()
305 if errno == -(ENOENT as i32) { in do_mkdir()
323 pub fn do_remove_dir(path: &str) -> Result<u64, i32> { in do_remove_dir() argument
326 return Err(-(ENAMETOOLONG as i32)); in do_remove_dir()
329 let inode: Result<Arc<dyn IndexNode>, i32> = ROOT_INODE().lookup(path); in do_remove_dir()
334 if errno == -(ENOENT as i32) { in do_remove_dir()
335 return Err(-(ENOENT as i32)); in do_remove_dir()
344 return Err(-(ENOTDIR as i32)); in do_remove_dir()
349 return Err(-(ENOTDIR as i32)); in do_remove_dir()
359 pub fn do_unlink_at(path: &str, _mode: FileMode) -> Result<u64, i32> { in do_unlink_at() argument
362 return Err(-(ENAMETOOLONG as i32)); in do_unlink_at()
365 let inode: Result<Arc<dyn IndexNode>, i32> = ROOT_INODE().lookup(path); in do_unlink_at()
370 if errno == -(ENOENT as i32) { in do_unlink_at()
371 return Err(-(ENOENT as i32)); in do_unlink_at()
376 return Err(-(EPERM as i32)); in do_unlink_at()
384 return Err(-(ENOTDIR as i32)); in do_unlink_at()