Lines Matching refs:dp
467 static int littlefs_opendir(struct fs_dir_t *dp, const char *path) in littlefs_opendir() argument
469 struct fs_littlefs *fs = dp->mp->fs_data; in littlefs_opendir()
471 if (k_mem_slab_alloc(&lfs_dir_pool, &dp->dirp, K_NO_WAIT) != 0) { in littlefs_opendir()
475 memset(dp->dirp, 0, sizeof(struct lfs_dir)); in littlefs_opendir()
477 path = fs_impl_strip_prefix(path, dp->mp); in littlefs_opendir()
481 int ret = lfs_dir_open(&fs->lfs, dp->dirp, path); in littlefs_opendir()
486 k_mem_slab_free(&lfs_dir_pool, dp->dirp); in littlefs_opendir()
501 static int littlefs_readdir(struct fs_dir_t *dp, struct fs_dirent *entry) in littlefs_readdir() argument
503 struct fs_littlefs *fs = dp->mp->fs_data; in littlefs_readdir()
508 int ret = lfs_dir_read(&fs->lfs, dp->dirp, &info); in littlefs_readdir()
522 static int littlefs_closedir(struct fs_dir_t *dp) in littlefs_closedir() argument
524 struct fs_littlefs *fs = dp->mp->fs_data; in littlefs_closedir()
528 int ret = lfs_dir_close(&fs->lfs, dp->dirp); in littlefs_closedir()
532 k_mem_slab_free(&lfs_dir_pool, dp->dirp); in littlefs_closedir()