mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'contrib/github_pr_10987_v5.1' into 'release/v5.1'
Allow to config the maximum number of VFS entries. (GitHub PR) (v5.1) See merge request espressif/esp-idf!23871
This commit is contained in:
commit
87b960121a
@ -71,6 +71,14 @@ menu "Virtual file system"
|
||||
help
|
||||
Disabling this option can save memory when the support for termios.h is not required.
|
||||
|
||||
config VFS_MAX_COUNT
|
||||
int "Maximum Number of Virtual Filesystems"
|
||||
default 8
|
||||
range 1 20
|
||||
depends on VFS_SUPPORT_IO
|
||||
help
|
||||
Define maximum number of virtual filesystems that can be registered.
|
||||
|
||||
|
||||
menu "Host File System I/O (Semihosting)"
|
||||
depends on VFS_SUPPORT_IO
|
||||
|
@ -33,7 +33,16 @@
|
||||
|
||||
static const char *TAG = "vfs";
|
||||
|
||||
#define VFS_MAX_COUNT 8 /* max number of VFS entries (registered filesystems) */
|
||||
/* Max number of VFS entries (registered filesystems) */
|
||||
#ifdef CONFIG_VFS_MAX_COUNT
|
||||
#define VFS_MAX_COUNT CONFIG_VFS_MAX_COUNT
|
||||
#else
|
||||
/* If IO support is disabled, keep this defined to 1 to avoid compiler warnings in this file.
|
||||
* The s_vfs array and the functions defined here will be removed by the linker, anyway.
|
||||
*/
|
||||
#define VFS_MAX_COUNT 1
|
||||
#endif
|
||||
|
||||
#define LEN_PATH_PREFIX_IGNORED SIZE_MAX /* special length value for VFS which is never recognised by open() */
|
||||
#define FD_TABLE_ENTRY_UNUSED (fd_table_t) { .permanent = false, .has_pending_close = false, .has_pending_select = false, .vfs_index = -1, .local_fd = -1 }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user