fs/littlefs: VFS wrapper improvement: (1) Support block device interface, (2) support ioctl, stat and sync file operation, (3) support forceformat and autoformat option, (4) update file->f_pos and dir->fd_position, (5)remote the internal struct from dir, and (6) emove mtd byte read/write requirement.

This commit is contained in:
Xiang Xiao
2019-01-27 12:31:28 -06:00
committed by Gregory Nutt
parent c511ff7ea2
commit af5e479fb5
5 changed files with 966 additions and 652 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ config FS_LITTLEFS
default n
select FS_READABLE
select FS_WRITABLE
depends on !DISABLE_MOUNTPOINT && MTD_BYTE_WRITE && EXPERIMENTAL
depends on !DISABLE_MOUNTPOINT
---help---
Build the LITTLEFS file system. https://github.com/ARMmbed/littlefs.
+1 -1
View File
@@ -1,6 +1,6 @@
## usage
depends on !DISABLE_MOUNTPOINT && MTD_BYTE_WRITE
depends on !DISABLE_MOUNTPOINT
1. register_mtddriver("/dev/w25", mtd, 0755, NULL);
2. mount("/dev/w25", "/w25", "littlefs", 0, NULL);
+956 -625
View File
File diff suppressed because it is too large Load Diff
+7 -1
View File
@@ -72,7 +72,7 @@
*/
#if defined(CONFIG_FS_FAT) || defined(CONFIG_FS_ROMFS) || \
defined(CONFIG_FS_SMARTFS)
defined(CONFIG_FS_SMARTFS) || defined(CONFIG_FS_LITTLEFS)
# define BDFS_SUPPORT 1
#endif
@@ -117,6 +117,9 @@ extern const struct mountpt_operations romfs_operations;
#ifdef CONFIG_FS_SMARTFS
extern const struct mountpt_operations smartfs_operations;
#endif
#ifdef CONFIG_FS_LITTLEFS
extern const struct mountpt_operations littlefs_operations;
#endif
static const struct fsmap_t g_bdfsmap[] =
{
@@ -128,6 +131,9 @@ static const struct fsmap_t g_bdfsmap[] =
#endif
#ifdef CONFIG_FS_SMARTFS
{ "smartfs", &smartfs_operations },
#endif
#ifdef CONFIG_FS_LITTLEFS
{ "littlefs", &littlefs_operations },
#endif
{ NULL, NULL },
};