Home
last modified time | relevance | path

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

/Zephyr-latest/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-latest/include/zephyr/fs/
Dfs.h237 static inline void fs_file_t_init(struct fs_file_t *zfp) in fs_file_t_init() argument
239 zfp->filep = NULL; in fs_file_t_init()
240 zfp->mp = NULL; in fs_file_t_init()
241 zfp->flags = 0; in fs_file_t_init()
294 int fs_open(struct fs_file_t *zfp, const char *file_name, fs_mode_t flags);
307 int fs_close(struct fs_file_t *zfp);
368 ssize_t fs_read(struct fs_file_t *zfp, void *ptr, size_t size);
389 ssize_t fs_write(struct fs_file_t *zfp, const void *ptr, size_t size);
409 int fs_seek(struct fs_file_t *zfp, off_t offset, int whence);
425 off_t fs_tell(struct fs_file_t *zfp);
[all …]
/Zephyr-latest/subsys/fs/
Dfs.c133 int fs_open(struct fs_file_t *zfp, const char *file_name, fs_mode_t flags) in fs_open() argument
145 if (zfp->mp != NULL) { in fs_open()
177 zfp->mp = mp; in fs_open()
178 rc = mp->fs->open(zfp, file_name, flags); in fs_open()
181 zfp->mp = NULL; in fs_open()
186 zfp->flags = flags; in fs_open()
190 rc = mp->fs->truncate(zfp, 0); in fs_open()
193 zfp->mp = NULL; in fs_open()
201 int fs_close(struct fs_file_t *zfp) in fs_close() argument
205 if (zfp->mp == NULL) { in fs_close()
[all …]
Dfat_fs.c117 static int fatfs_open(struct fs_file_t *zfp, const char *file_name, in fatfs_open() argument
126 zfp->filep = ptr; in fatfs_open()
133 res = f_open(zfp->filep, translate_path(file_name), fs_mode); in fatfs_open()
137 zfp->filep = NULL; in fatfs_open()
143 static int fatfs_close(struct fs_file_t *zfp) in fatfs_close() argument
147 res = f_close(zfp->filep); in fatfs_close()
150 k_mem_slab_free(&fatfs_filep_pool, zfp->filep); in fatfs_close()
151 zfp->filep = NULL; in fatfs_close()
193 static ssize_t fatfs_read(struct fs_file_t *zfp, void *ptr, size_t size) in fatfs_read() argument
198 res = f_read(zfp->filep, ptr, size, &br); in fatfs_read()
[all …]
/Zephyr-latest/subsys/settings/src/
Dsettings_file.c205 static int settings_file_create_or_replace(struct fs_file_t *zfp, in settings_file_create_or_replace() argument
220 return fs_open(zfp, file_name, FS_O_CREATE | FS_O_RDWR); in settings_file_create_or_replace()
/Zephyr-latest/doc/releases/
Drelease-notes-2.5.rst1495 * :github:`29478` - fs: fs_open can corrupt fs_open_t object given via zfp parameter