diff --git a/components/vfs/include/esp_vfs.h b/components/vfs/include/esp_vfs.h index 5f9b2105091..c9b3a87c11a 100644 --- a/components/vfs/include/esp_vfs.h +++ b/components/vfs/include/esp_vfs.h @@ -104,145 +104,145 @@ typedef struct { int flags; /*!< ESP_VFS_FLAG_CONTEXT_PTR and/or ESP_VFS_FLAG_READONLY_FS or ESP_VFS_FLAG_DEFAULT */ union { - ssize_t (*write_p)(void* p, int fd, const void * data, size_t size) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< Write with context pointer */ - ssize_t (*write)(int fd, const void * data, size_t size); /*!< Write without context pointer */ + ssize_t (*write_p)(void* p, int fd, const void * data, size_t size); /*!< Write with context pointer */ + ssize_t (*write)(int fd, const void * data, size_t size) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< Write without context pointer */ }; union { - off_t (*lseek_p)(void* p, int fd, off_t size, int mode) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< Seek with context pointer */ - off_t (*lseek)(int fd, off_t size, int mode); /*!< Seek without context pointer */ + off_t (*lseek_p)(void* p, int fd, off_t size, int mode); /*!< Seek with context pointer */ + off_t (*lseek)(int fd, off_t size, int mode) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< Seek without context pointer */ }; union { - ssize_t (*read_p)(void* ctx, int fd, void * dst, size_t size) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< Read with context pointer */ - ssize_t (*read)(int fd, void * dst, size_t size); /*!< Read without context pointer */ + ssize_t (*read_p)(void* ctx, int fd, void * dst, size_t size); /*!< Read with context pointer */ + ssize_t (*read)(int fd, void * dst, size_t size) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< Read without context pointer */ }; union { - ssize_t (*pread_p)(void *ctx, int fd, void * dst, size_t size, off_t offset) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< pread with context pointer */ - ssize_t (*pread)(int fd, void * dst, size_t size, off_t offset); /*!< pread without context pointer */ + ssize_t (*pread_p)(void *ctx, int fd, void * dst, size_t size, off_t offset); /*!< pread with context pointer */ + ssize_t (*pread)(int fd, void * dst, size_t size, off_t offset) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< pread without context pointer */ }; union { - ssize_t (*pwrite_p)(void *ctx, int fd, const void *src, size_t size, off_t offset) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< pwrite with context pointer */ - ssize_t (*pwrite)(int fd, const void *src, size_t size, off_t offset); /*!< pwrite without context pointer */ + ssize_t (*pwrite_p)(void *ctx, int fd, const void *src, size_t size, off_t offset); /*!< pwrite with context pointer */ + ssize_t (*pwrite)(int fd, const void *src, size_t size, off_t offset) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< pwrite without context pointer */ }; union { - int (*open_p)(void* ctx, const char * path, int flags, int mode) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< open with context pointer */ - int (*open)(const char * path, int flags, int mode); /*!< open without context pointer */ + int (*open_p)(void* ctx, const char * path, int flags, int mode); /*!< open with context pointer */ + int (*open)(const char * path, int flags, int mode) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< open without context pointer */ }; union { - int (*close_p)(void* ctx, int fd) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< close with context pointer */ - int (*close)(int fd); /*!< close without context pointer */ + int (*close_p)(void* ctx, int fd); /*!< close with context pointer */ + int (*close)(int fd) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< close without context pointer */ }; union { - int (*fstat_p)(void* ctx, int fd, struct stat * st) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< fstat with context pointer */ - int (*fstat)(int fd, struct stat * st); /*!< fstat without context pointer */ + int (*fstat_p)(void* ctx, int fd, struct stat * st); /*!< fstat with context pointer */ + int (*fstat)(int fd, struct stat * st) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< fstat without context pointer */ }; #ifdef CONFIG_VFS_SUPPORT_DIR union { - int (*stat_p)(void* ctx, const char * path, struct stat * st) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< stat with context pointer */ - int (*stat)(const char * path, struct stat * st); /*!< stat without context pointer */ + int (*stat_p)(void* ctx, const char * path, struct stat * st); /*!< stat with context pointer */ + int (*stat)(const char * path, struct stat * st) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< stat without context pointer */ }; union { - int (*link_p)(void* ctx, const char* n1, const char* n2) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< link with context pointer */ - int (*link)(const char* n1, const char* n2); /*!< link without context pointer */ + int (*link_p)(void* ctx, const char* n1, const char* n2); /*!< link with context pointer */ + int (*link)(const char* n1, const char* n2) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< link without context pointer */ }; union { - int (*unlink_p)(void* ctx, const char *path) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< unlink with context pointer */ - int (*unlink)(const char *path); /*!< unlink without context pointer */ + int (*unlink_p)(void* ctx, const char *path); /*!< unlink with context pointer */ + int (*unlink)(const char *path) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< unlink without context pointer */ }; union { - int (*rename_p)(void* ctx, const char *src, const char *dst) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< rename with context pointer */ - int (*rename)(const char *src, const char *dst); /*!< rename without context pointer */ + int (*rename_p)(void* ctx, const char *src, const char *dst); /*!< rename with context pointer */ + int (*rename)(const char *src, const char *dst) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< rename without context pointer */ }; union { - DIR* (*opendir_p)(void* ctx, const char* name) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< opendir with context pointer */ - DIR* (*opendir)(const char* name); /*!< opendir without context pointer */ + DIR* (*opendir_p)(void* ctx, const char* name); /*!< opendir with context pointer */ + DIR* (*opendir)(const char* name) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< opendir without context pointer */ }; union { - struct dirent* (*readdir_p)(void* ctx, DIR* pdir) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< readdir with context pointer */ - struct dirent* (*readdir)(DIR* pdir); /*!< readdir without context pointer */ + struct dirent* (*readdir_p)(void* ctx, DIR* pdir); /*!< readdir with context pointer */ + struct dirent* (*readdir)(DIR* pdir) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< readdir without context pointer */ }; union { - int (*readdir_r_p)(void* ctx, DIR* pdir, struct dirent* entry, struct dirent** out_dirent) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< readdir_r with context pointer */ - int (*readdir_r)(DIR* pdir, struct dirent* entry, struct dirent** out_dirent); /*!< readdir_r without context pointer */ + int (*readdir_r_p)(void* ctx, DIR* pdir, struct dirent* entry, struct dirent** out_dirent); /*!< readdir_r with context pointer */ + int (*readdir_r)(DIR* pdir, struct dirent* entry, struct dirent** out_dirent) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< readdir_r without context pointer */ }; union { - long (*telldir_p)(void* ctx, DIR* pdir) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< telldir with context pointer */ - long (*telldir)(DIR* pdir); /*!< telldir without context pointer */ + long (*telldir_p)(void* ctx, DIR* pdir); /*!< telldir with context pointer */ + long (*telldir)(DIR* pdir) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< telldir without context pointer */ }; union { - void (*seekdir_p)(void* ctx, DIR* pdir, long offset) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< seekdir with context pointer */ - void (*seekdir)(DIR* pdir, long offset); /*!< seekdir without context pointer */ + void (*seekdir_p)(void* ctx, DIR* pdir, long offset); /*!< seekdir with context pointer */ + void (*seekdir)(DIR* pdir, long offset) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< seekdir without context pointer */ }; union { - int (*closedir_p)(void* ctx, DIR* pdir) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< closedir with context pointer */ - int (*closedir)(DIR* pdir); /*!< closedir without context pointer */ + int (*closedir_p)(void* ctx, DIR* pdir); /*!< closedir with context pointer */ + int (*closedir)(DIR* pdir) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< closedir without context pointer */ }; union { - int (*mkdir_p)(void* ctx, const char* name, mode_t mode) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< mkdir with context pointer */ - int (*mkdir)(const char* name, mode_t mode); /*!< mkdir without context pointer */ + int (*mkdir_p)(void* ctx, const char* name, mode_t mode); /*!< mkdir with context pointer */ + int (*mkdir)(const char* name, mode_t mode) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< mkdir without context pointer */ }; union { - int (*rmdir_p)(void* ctx, const char* name) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< rmdir with context pointer */ - int (*rmdir)(const char* name); /*!< rmdir without context pointer */ + int (*rmdir_p)(void* ctx, const char* name); /*!< rmdir with context pointer */ + int (*rmdir)(const char* name) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< rmdir without context pointer */ }; #endif // CONFIG_VFS_SUPPORT_DIR union { - int (*fcntl_p)(void* ctx, int fd, int cmd, int arg) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< fcntl with context pointer */ - int (*fcntl)(int fd, int cmd, int arg); /*!< fcntl without context pointer */ + int (*fcntl_p)(void* ctx, int fd, int cmd, int arg); /*!< fcntl with context pointer */ + int (*fcntl)(int fd, int cmd, int arg) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< fcntl without context pointer */ }; union { - int (*ioctl_p)(void* ctx, int fd, int cmd, va_list args) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< ioctl with context pointer */ - int (*ioctl)(int fd, int cmd, va_list args); /*!< ioctl without context pointer */ + int (*ioctl_p)(void* ctx, int fd, int cmd, va_list args); /*!< ioctl with context pointer */ + int (*ioctl)(int fd, int cmd, va_list args) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< ioctl without context pointer */ }; union { - int (*fsync_p)(void* ctx, int fd) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< fsync with context pointer */ - int (*fsync)(int fd); /*!< fsync without context pointer */ + int (*fsync_p)(void* ctx, int fd); /*!< fsync with context pointer */ + int (*fsync)(int fd) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< fsync without context pointer */ }; #ifdef CONFIG_VFS_SUPPORT_DIR union { - int (*access_p)(void* ctx, const char *path, int amode) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< access with context pointer */ - int (*access)(const char *path, int amode); /*!< access without context pointer */ + int (*access_p)(void* ctx, const char *path, int amode); /*!< access with context pointer */ + int (*access)(const char *path, int amode) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< access without context pointer */ }; union { - int (*truncate_p)(void* ctx, const char *path, off_t length) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< truncate with context pointer */ - int (*truncate)(const char *path, off_t length); /*!< truncate without context pointer */ + int (*truncate_p)(void* ctx, const char *path, off_t length); /*!< truncate with context pointer */ + int (*truncate)(const char *path, off_t length) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< truncate without context pointer */ }; union { - int (*ftruncate_p)(void* ctx, int fd, off_t length) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< ftruncate with context pointer */ - int (*ftruncate)(int fd, off_t length); /*!< ftruncate without context pointer */ + int (*ftruncate_p)(void* ctx, int fd, off_t length); /*!< ftruncate with context pointer */ + int (*ftruncate)(int fd, off_t length) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< ftruncate without context pointer */ }; union { - int (*utime_p)(void* ctx, const char *path, const struct utimbuf *times) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< utime with context pointer */ - int (*utime)(const char *path, const struct utimbuf *times); /*!< utime without context pointer */ + int (*utime_p)(void* ctx, const char *path, const struct utimbuf *times); /*!< utime with context pointer */ + int (*utime)(const char *path, const struct utimbuf *times) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< utime without context pointer */ }; #endif // CONFIG_VFS_SUPPORT_DIR #ifdef CONFIG_VFS_SUPPORT_TERMIOS union { - int (*tcsetattr_p)(void *ctx, int fd, int optional_actions, const struct termios *p) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< tcsetattr with context pointer */ - int (*tcsetattr)(int fd, int optional_actions, const struct termios *p); /*!< tcsetattr without context pointer */ + int (*tcsetattr_p)(void *ctx, int fd, int optional_actions, const struct termios *p); /*!< tcsetattr with context pointer */ + int (*tcsetattr)(int fd, int optional_actions, const struct termios *p) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< tcsetattr without context pointer */ }; union { - int (*tcgetattr_p)(void *ctx, int fd, struct termios *p) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< tcgetattr with context pointer */ - int (*tcgetattr)(int fd, struct termios *p); /*!< tcgetattr without context pointer */ + int (*tcgetattr_p)(void *ctx, int fd, struct termios *p); /*!< tcgetattr with context pointer */ + int (*tcgetattr)(int fd, struct termios *p) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< tcgetattr without context pointer */ }; union { - int (*tcdrain_p)(void *ctx, int fd) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< tcdrain with context pointer */ - int (*tcdrain)(int fd); /*!< tcdrain without context pointer */ + int (*tcdrain_p)(void *ctx, int fd); /*!< tcdrain with context pointer */ + int (*tcdrain)(int fd) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< tcdrain without context pointer */ }; union { - int (*tcflush_p)(void *ctx, int fd, int select) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< tcflush with context pointer */ - int (*tcflush)(int fd, int select); /*!< tcflush without context pointer */ + int (*tcflush_p)(void *ctx, int fd, int select); /*!< tcflush with context pointer */ + int (*tcflush)(int fd, int select) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< tcflush without context pointer */ }; union { - int (*tcflow_p)(void *ctx, int fd, int action) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< tcflow with context pointer */ - int (*tcflow)(int fd, int action); /*!< tcflow without context pointer */ + int (*tcflow_p)(void *ctx, int fd, int action); /*!< tcflow with context pointer */ + int (*tcflow)(int fd, int action) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< tcflow without context pointer */ }; union { - pid_t (*tcgetsid_p)(void *ctx, int fd) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< tcgetsid with context pointer */ - pid_t (*tcgetsid)(int fd); /*!< tcgetsid without context pointer */ + pid_t (*tcgetsid_p)(void *ctx, int fd); /*!< tcgetsid with context pointer */ + pid_t (*tcgetsid)(int fd) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< tcgetsid without context pointer */ }; union { - int (*tcsendbreak_p)(void *ctx, int fd, int duration) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< tcsendbreak with context pointer */ - int (*tcsendbreak)(int fd, int duration); /*!< tcsendbreak without context pointer */ + int (*tcsendbreak_p)(void *ctx, int fd, int duration); /*!< tcsendbreak with context pointer */ + int (*tcsendbreak)(int fd, int duration) __attribute__((deprecated("Context pointer-less API is deprecated"))); /*!< tcsendbreak without context pointer */ }; #endif // CONFIG_VFS_SUPPORT_TERMIOS #if CONFIG_VFS_SUPPORT_SELECT || defined __DOXYGEN__