mirror of
				https://github.com/eledio-devices/thirdparty-littlefs.git
				synced 2025-10-31 00:32:38 +01:00 
			
		
		
		
	Fixed missing definition of lfs_cache_drop in readonly mode
Interestingly this was introduced by two different PRs which were not tested together until pre-release testing: - Fix lfs_file_seek doesn't update cache properties correctly - Fix compiler warnings when LFS_READONLY defined
This commit is contained in:
		
							
								
								
									
										2
									
								
								lfs.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								lfs.c
									
									
									
									
									
								
							| @@ -12,14 +12,12 @@ | |||||||
|  |  | ||||||
| /// Caching block device operations /// | /// Caching block device operations /// | ||||||
|  |  | ||||||
| #ifndef LFS_READONLY |  | ||||||
| static inline void lfs_cache_drop(lfs_t *lfs, lfs_cache_t *rcache) { | static inline void lfs_cache_drop(lfs_t *lfs, lfs_cache_t *rcache) { | ||||||
|     // do not zero, cheaper if cache is readonly or only going to be |     // do not zero, cheaper if cache is readonly or only going to be | ||||||
|     // written with identical data (during relocates) |     // written with identical data (during relocates) | ||||||
|     (void)lfs; |     (void)lfs; | ||||||
|     rcache->block = LFS_BLOCK_NULL; |     rcache->block = LFS_BLOCK_NULL; | ||||||
| } | } | ||||||
| #endif |  | ||||||
|  |  | ||||||
| static inline void lfs_cache_zero(lfs_t *lfs, lfs_cache_t *pcache) { | static inline void lfs_cache_zero(lfs_t *lfs, lfs_cache_t *pcache) { | ||||||
|     // zero to avoid information leak |     // zero to avoid information leak | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user