33#ifndef __VSF_ESPIDF_ESP_VFS_H__
34#define __VSF_ESPIDF_ESP_VFS_H__
58#ifndef ESP_VFS_PATH_MAX
59# define ESP_VFS_PATH_MAX 15
62#define MAX_FDS FD_SETSIZE
64#define ESP_VFS_FLAG_DEFAULT (1 << 0)
65#define ESP_VFS_FLAG_CONTEXT_PTR (1 << 1)
66#define ESP_VFS_FLAG_READONLY_FS (1 << 2)
67#define ESP_VFS_FLAG_STATIC (1 << 3)
88 ssize_t (*read_p) (
void *ctx,
int fd,
void *dst,
size_t size);
100 int (*open_p) (
void *ctx,
const char *path,
int flags,
int mode);
101 int (*
open) (
const char *path,
int flags,
int mode);
104 int (*close_p)(
void *ctx,
int fd);
108 int (*fstat_p)(
void *ctx,
int fd,
struct stat *st);
112 int (*stat_p) (
void *ctx,
const char *path,
struct stat *st);
116 int (*link_p) (
void *ctx,
const char *n1,
const char *n2);
117 int (*
link) (
const char *n1,
const char *n2);
120 int (*unlink_p)(
void *ctx,
const char *path);
124 int (*rename_p)(
void *ctx,
const char *src,
const char *dst);
125 int (*
rename) (
const char *src,
const char *dst);
128 DIR * (*opendir_p) (
void *ctx,
const char *name);
129 DIR * (*opendir) (
const char *name);
132 struct dirent * (*readdir_p) (
void *ctx,
DIR *pdir);
136 int (*readdir_r_p)(
void *ctx,
DIR *pdir,
struct dirent *entry,
142 long (*telldir_p)(
void *ctx,
DIR *pdir);
150 int (*closedir_p)(
void *ctx,
DIR *pdir);
154 int (*mkdir_p)(
void *ctx,
const char *name,
mode_t mode);
158 int (*rmdir_p)(
void *ctx,
const char *name);
162 int (*fcntl_p)(
void *ctx,
int fd,
int cmd,
int arg);
163 int (*
fcntl) (
int fd,
int cmd,
int arg);
166 int (*ioctl_p)(
void *ctx,
int fd,
int cmd, va_list args);
167 int (*
ioctl) (
int fd,
int cmd, va_list args);
170 int (*fsync_p)(
void *ctx,
int fd);
174 int (*access_p)(
void *ctx,
const char *path,
int amode);
175 int (*
access) (
const char *path,
int amode);
186 int (*utime_p)(
void *ctx,
const char *path,
const struct utimbuf *
times);
200 int min_fd,
int max_fd);
214 int local_fd,
bool permanent,
225 void *dst,
size_t size);
227 int flags,
int mode);
251 struct dirent **out_dirent);
Definition vsf_linux_fs.h:115
#define readdir_r
Definition dirent.h:21
#define seekdir
Definition dirent.h:25
#define telldir
Definition dirent.h:24
#define closedir
Definition dirent.h:26
int esp_err_t
Definition esp_err.h:41
int esp_vfs_stat(struct _reent *r, const char *path, struct stat *st)
Definition esp_vfs_port.c:530
int esp_vfs_utime(const char *path, const struct utimbuf *times)
Definition esp_vfs_port.c:534
esp_err_t esp_vfs_unregister(const char *base_path)
Definition esp_vfs_port.c:513
ssize_t esp_vfs_pread(int fd, void *dst, size_t size, off_t offset)
Definition esp_vfs_port.c:553
int esp_vfs_select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *timeout)
Definition esp_vfs_port.c:550
void esp_vfs_dump_registered_paths(FILE *fp)
Definition esp_vfs_port.c:556
void esp_vfs_dump_fds(FILE *fp)
Definition esp_vfs_port.c:555
ssize_t esp_vfs_write(struct _reent *r, int fd, const void *data, size_t size)
Definition esp_vfs_port.c:524
DIR * esp_vfs_opendir(const char *name)
Definition esp_vfs_port.c:543
off_t esp_vfs_lseek(struct _reent *r, int fd, off_t size, int mode)
Definition esp_vfs_port.c:525
int esp_vfs_mkdir(const char *name, mode_t mode)
Definition esp_vfs_port.c:542
int esp_vfs_open(struct _reent *r, const char *path, int flags, int mode)
Definition esp_vfs_port.c:527
int esp_vfs_link(struct _reent *r, const char *n1, const char *n2)
Definition esp_vfs_port.c:531
void esp_vfs_select_triggered_isr(esp_vfs_select_sem_t sem, int *woken)
Definition esp_vfs_port.c:552
esp_err_t esp_vfs_register_fd_range(const esp_vfs_t *vfs, void *ctx, int min_fd, int max_fd)
Definition esp_vfs_port.c:514
int esp_vfs_rmdir(const char *name)
Definition esp_vfs_port.c:541
esp_err_t esp_vfs_register(const char *base_path, const esp_vfs_t *vfs, void *ctx)
Definition esp_vfs_port.c:495
int esp_vfs_fstat(struct _reent *r, int fd, struct stat *st)
Definition esp_vfs_port.c:529
int esp_vfs_ioctl(int fd, int cmd,...)
Definition esp_vfs_port.c:537
esp_err_t esp_vfs_register_with_id(const esp_vfs_t *vfs, void *ctx, esp_vfs_id_t *vfs_id)
Definition esp_vfs_port.c:517
ssize_t esp_vfs_read(struct _reent *r, int fd, void *dst, size_t size)
Definition esp_vfs_port.c:526
esp_err_t esp_vfs_unregister_fd(esp_vfs_id_t vfs_id, int fd)
Definition esp_vfs_port.c:521
ssize_t esp_vfs_pwrite(int fd, const void *src, size_t size, off_t offset)
Definition esp_vfs_port.c:554
esp_err_t esp_vfs_unregister_with_id(esp_vfs_id_t vfs_id)
Definition esp_vfs_port.c:518
int esp_vfs_closedir(DIR *pdir)
Definition esp_vfs_port.c:544
long esp_vfs_telldir(DIR *pdir)
Definition esp_vfs_port.c:547
int esp_vfs_readdir_r(DIR *pdir, struct dirent *entry, struct dirent **out_dirent)
Definition esp_vfs_port.c:545
esp_err_t esp_vfs_register_fd_with_local_fd(esp_vfs_id_t vfs_id, int local_fd, bool permanent, int *fd)
Definition esp_vfs_port.c:520
int esp_vfs_rename(struct _reent *r, const char *src, const char *dst)
Definition esp_vfs_port.c:533
int esp_vfs_truncate(const char *path, off_t length)
Definition esp_vfs_port.c:538
struct dirent * esp_vfs_readdir(DIR *pdir)
Definition esp_vfs_port.c:546
int esp_vfs_ftruncate(int fd, off_t length)
Definition esp_vfs_port.c:539
void esp_vfs_select_triggered(esp_vfs_select_sem_t sem)
Definition esp_vfs_port.c:551
void esp_vfs_rewinddir(DIR *pdir)
Definition esp_vfs_port.c:549
int esp_vfs_fsync(int fd)
Definition esp_vfs_port.c:535
int esp_vfs_access(const char *path, int amode)
Definition esp_vfs_port.c:540
int esp_vfs_fcntl_r(struct _reent *r, int fd, int cmd, int arg)
Definition esp_vfs_port.c:536
int esp_vfs_unlink(struct _reent *r, const char *path)
Definition esp_vfs_port.c:532
int esp_vfs_close(struct _reent *r, int fd)
Definition esp_vfs_port.c:528
esp_err_t esp_vfs_register_fd(esp_vfs_id_t vfs_id, int *fd)
Definition esp_vfs_port.c:519
void esp_vfs_seekdir(DIR *pdir, long loc)
Definition esp_vfs_port.c:548
int esp_vfs_id_t
Definition esp_vfs_ops.h:54
#define open
Definition fcntl.h:20
#define fcntl
Definition fcntl.h:18
struct ieee80211_ext_chansw_ie data
Definition ieee80211.h:80
__le16 timeout
Definition ieee80211.h:94
unsigned int mode_t
Definition types.h:115
int ssize_t
Definition types.h:91
long off_t
Definition types.h:123
#define mkdir
Definition stat.h:31
#define fstat
Definition stat.h:24
Definition esp_vfs_ops.h:60
int flags
Definition esp_vfs.h:78
int ioctl(int fd, unsigned long request,...)
Definition vsf_linux_fs.c:2050
#define rename
Definition stdio.h:86
#define times
Definition times.h:18
#define link
Definition unistd.h:120
#define lseek
Definition unistd.h:124
#define unlink
Definition unistd.h:118
#define access
Definition unistd.h:117
#define pwrite
Definition unistd.h:130
#define pread
Definition unistd.h:129
#define truncate
Definition unistd.h:100
#define read
Definition unistd.h:125
#define rmdir
Definition unistd.h:122
#define ftruncate
Definition unistd.h:99
#define close
Definition unistd.h:123
#define write
Definition unistd.h:126
#define fsync
Definition unistd.h:136
#define utime(__file, __time)
Definition utime.h:22
uint64_t offset
Definition vsf_memfs.h:49
uint32_t size
Definition vsf_memfs.h:50
uint_fast8_t length
Definition vsf_pbuf.c:38