Home
last modified time | relevance | path

Searched refs:zfp (Results 1 – 6 of 6) sorted by relevance

/Zephyr-Core-3.6.0/tests/subsys/fs/fs_api/src/
Dtest_fs.c28 int temp_open(struct fs_file_t *zfp, const char *file_name, fs_mode_t flags) in temp_open() argument
30 if (zfp == NULL || file_name == NULL) { in temp_open()
34 if (zfp->filep) { in temp_open()
35 if (strcmp(zfp->filep, file_name) == 0) { in temp_open()
45 zfp->filep = (char *)file_name; in temp_open()
49 static int temp_close(struct fs_file_t *zfp) in temp_close() argument
51 if (zfp == NULL) { in temp_close()
55 if (zfp->filep) { in temp_close()
56 zfp->filep = NULL; in temp_close()
89 static ssize_t temp_read(struct fs_file_t *zfp, void *ptr, size_t size) in temp_read() argument
[all …]
/Zephyr-Core-3.6.0/subsys/fs/
Dfat_fs.c95 static int fatfs_open(struct fs_file_t *zfp, const char *file_name, in fatfs_open() argument
104 zfp->filep = ptr; in fatfs_open()
111 res = f_open(zfp->filep, translate_path(file_name), fs_mode); in fatfs_open()
115 zfp->filep = NULL; in fatfs_open()
121 static int fatfs_close(struct fs_file_t *zfp) in fatfs_close() argument
125 res = f_close(zfp->filep); in fatfs_close()
128 k_mem_slab_free(&fatfs_filep_pool, zfp->filep); in fatfs_close()
129 zfp->filep = NULL; in fatfs_close()
170 static ssize_t fatfs_read(struct fs_file_t *zfp, void *ptr, size_t size) in fatfs_read() argument
175 res = f_read(zfp->filep, ptr, size, &br); in fatfs_read()
[all …]
Dfs.c133 int fs_open(struct fs_file_t *zfp, const char *file_name, fs_mode_t flags) in fs_open() argument
144 if (zfp->mp != NULL) { in fs_open()
163 zfp->mp = mp; in fs_open()
164 rc = mp->fs->open(zfp, file_name, flags); in fs_open()
167 zfp->mp = NULL; in fs_open()
172 zfp->flags = flags; in fs_open()
177 int fs_close(struct fs_file_t *zfp) in fs_close() argument
181 if (zfp->mp == NULL) { in fs_close()
185 CHECKIF(zfp->mp->fs->close == NULL) { in fs_close()
189 rc = zfp->mp->fs->close(zfp); in fs_close()
[all …]
/Zephyr-Core-3.6.0/include/zephyr/fs/
Dfs.h232 static inline void fs_file_t_init(struct fs_file_t *zfp) in fs_file_t_init() argument
234 *zfp = (struct fs_file_t){ 0 }; in fs_file_t_init()
284 int fs_open(struct fs_file_t *zfp, const char *file_name, fs_mode_t flags);
297 int fs_close(struct fs_file_t *zfp);
358 ssize_t fs_read(struct fs_file_t *zfp, void *ptr, size_t size);
379 ssize_t fs_write(struct fs_file_t *zfp, const void *ptr, size_t size);
399 int fs_seek(struct fs_file_t *zfp, off_t offset, int whence);
415 off_t fs_tell(struct fs_file_t *zfp);
437 int fs_truncate(struct fs_file_t *zfp, off_t length);
455 int fs_sync(struct fs_file_t *zfp);
/Zephyr-Core-3.6.0/subsys/settings/src/
Dsettings_file.c210 static int settings_file_create_or_replace(struct fs_file_t *zfp, in settings_file_create_or_replace() argument
225 return fs_open(zfp, file_name, FS_O_CREATE | FS_O_RDWR); in settings_file_create_or_replace()
/Zephyr-Core-3.6.0/doc/releases/
Drelease-notes-2.5.rst1495 * :github:`29478` - fs: fs_open can corrupt fs_open_t object given via zfp parameter