rdonly: Fixed various LFS3_RDONLY compile errors
This just fell out-of-sync a bit during the gbmap work. Note we _do_
support LFS3_RDONLY + LFS3_GBMAP, as fetching the gbmap is necessary for
CKMETA to check all metadata. Fortunately this is relatively cheap:
code stack ctx
rdonly: 10716 896 532
rdonly+gbmap: 10988 (+2.5%) 896 (+0.0%) 680 (+27.8%)
Though this does highlight that a sort of LFS3_NO_TRV mode could remove
quite a bit of code.
This commit is contained in:
@@ -192,11 +192,11 @@ enum lfs3_type {
|
||||
|
||||
#define LFS3_F_CKMETA 0x00001000 // Check metadata checksums
|
||||
#define LFS3_F_CKDATA 0x00002000 // Check metadata + data checksums
|
||||
#endif
|
||||
|
||||
#ifdef LFS3_GBMAP
|
||||
#define LFS3_F_GBMAP 0x01000000 // Use the global on-disk block-map
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Filesystem mount flags
|
||||
#define LFS3_M_MODE 1 // Mount's access mode
|
||||
@@ -1488,7 +1488,7 @@ int lfs3_fs_grow(lfs3_t *lfs3, lfs3_size_t block_count);
|
||||
//
|
||||
// Returns a negative error code on failure. Does nothing if a gbmap
|
||||
// already exists.
|
||||
#if !defined(LFs3_RDONLY) && defined(LFS3_GBMAP) && !defined(LFS3_YES_GBMAP)
|
||||
#if !defined(LFS3_RDONLY) && defined(LFS3_GBMAP) && !defined(LFS3_YES_GBMAP)
|
||||
int lfs3_fs_mkgbmap(lfs3_t *lfs3);
|
||||
#endif
|
||||
|
||||
@@ -1496,7 +1496,7 @@ int lfs3_fs_mkgbmap(lfs3_t *lfs3);
|
||||
//
|
||||
// Returns a negative error code on failure. Does nothing if no gbmap
|
||||
// is found.
|
||||
#if !defined(LFs3_RDONLY) && defined(LFS3_GBMAP) && !defined(LFS3_YES_GBMAP)
|
||||
#if !defined(LFS3_RDONLY) && defined(LFS3_GBMAP) && !defined(LFS3_YES_GBMAP)
|
||||
int lfs3_fs_rmgbmap(lfs3_t *lfs3);
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user