Lines Matching refs:ptr
37 struct posix_fs_desc *ptr = NULL; in posix_fs_alloc_obj() local
42 ptr = &desc_array[i]; in posix_fs_alloc_obj()
43 ptr->used = true; in posix_fs_alloc_obj()
44 ptr->is_dir = is_dir; in posix_fs_alloc_obj()
50 return ptr; in posix_fs_alloc_obj()
53 static inline void posix_fs_free_obj(struct posix_fs_desc *ptr) in posix_fs_free_obj() argument
55 ptr->used = false; in posix_fs_free_obj()
85 struct posix_fs_desc *ptr = NULL; in zvfs_open() local
97 ptr = posix_fs_alloc_obj(false); in zvfs_open()
98 if (ptr == NULL) { in zvfs_open()
103 fs_file_t_init(&ptr->file); in zvfs_open()
108 rc = fs_open(&ptr->file, name, FS_O_CREATE | (mode & O_ACCMODE)); in zvfs_open()
112 rc = fs_close(&ptr->file); in zvfs_open()
118 rc = fs_open(&ptr->file, name, zmode); in zvfs_open()
123 zvfs_finalize_fd(fd, ptr, &fs_fd_op_vtable); in zvfs_open()
128 if (ptr != NULL) { in zvfs_open()
129 posix_fs_free_obj(ptr); in zvfs_open()
142 struct posix_fs_desc *ptr = obj; in fs_close_vmeth() local
145 rc = fs_close(&ptr->file); in fs_close_vmeth()
146 posix_fs_free_obj(ptr); in fs_close_vmeth()
154 struct posix_fs_desc *ptr = obj; in fs_ioctl_vmeth() local
158 rc = fs_sync(&ptr->file); in fs_ioctl_vmeth()
168 rc = fs_seek(&ptr->file, offset, whence); in fs_ioctl_vmeth()
170 rc = fs_tell(&ptr->file); in fs_ioctl_vmeth()
179 rc = fs_truncate(&ptr->file, length); in fs_ioctl_vmeth()
207 struct posix_fs_desc *ptr = obj; in fs_write_vmeth() local
209 rc = fs_write(&ptr->file, buffer, count); in fs_write_vmeth()
226 struct posix_fs_desc *ptr = obj; in fs_read_vmeth() local
228 rc = fs_read(&ptr->file, buffer, count); in fs_read_vmeth()
252 struct posix_fs_desc *ptr; in opendir() local
254 ptr = posix_fs_alloc_obj(true); in opendir()
255 if (ptr == NULL) { in opendir()
260 fs_dir_t_init(&ptr->dir); in opendir()
262 rc = fs_opendir(&ptr->dir, dirname); in opendir()
264 posix_fs_free_obj(ptr); in opendir()
269 return ptr; in opendir()
280 struct posix_fs_desc *ptr = dirp; in closedir() local
287 rc = fs_closedir(&ptr->dir); in closedir()
289 posix_fs_free_obj(ptr); in closedir()
307 struct posix_fs_desc *ptr = dirp; in readdir() local
314 rc = fs_readdir(&ptr->dir, &fdirent); in readdir()