Skip to content

Commit 5fa0a5e

Browse files
committed
extmod/vfs_lfsx: Allow overriding the LFS2 on-disk version format.
Useful for compatibility with older LFS versions. Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
1 parent 79abdad commit 5fa0a5e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

extmod/vfs_lfsx.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ static void MP_VFS_LFSx(init_config)(MP_OBJ_VFS_LFSx * self, mp_obj_t bdev, size
104104
config->read_buffer = m_new(uint8_t, config->cache_size);
105105
config->prog_buffer = m_new(uint8_t, config->cache_size);
106106
config->lookahead_buffer = m_new(uint8_t, config->lookahead_size);
107+
#ifdef LFS2_MULTIVERSION
108+
// This can be set to override the on-disk lfs version.
109+
// eg. for compat with lfs2 < v2.6 add the following to make:
110+
// CFLAGS += '-DLFS2_MULTIVERSION=0x00020000'
111+
config->disk_version = LFS2_MULTIVERSION;
112+
#endif
107113
#endif
108114
}
109115

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy