mirror of
https://github.com/littlefs-project/littlefs.git
synced 2025-11-16 04:24:35 +00:00
Added LFS_MULTIVERSION, made lfs2.0 support a compile-time option
The code-cost wasn't that bad: 16556 B -> 16754 B (+1.2%) But moving write support of older versions behind a compile-time flag allows us to be a bit more liberal with what gets added to support older versions, since the cost won't hit most users.
This commit is contained in:
2
lfs.h
2
lfs.h
@@ -264,11 +264,13 @@ struct lfs_config {
|
||||
// Defaults to block_size when zero.
|
||||
lfs_size_t metadata_max;
|
||||
|
||||
#ifdef LFS_MULTIVERSION
|
||||
// On-disk version to use when writing in the form of 16-bit major version
|
||||
// + 16-bit minor version. This limiting metadata to what is supported by
|
||||
// older minor versions. Note that some features will be lost. Defaults to
|
||||
// to the most recent minor version when zero.
|
||||
uint32_t disk_version;
|
||||
#endif
|
||||
};
|
||||
|
||||
// File info structure
|
||||
|
||||
Reference in New Issue
Block a user