mirror of
				https://github.com/eledio-devices/thirdparty-littlefs.git
				synced 2025-10-31 00:32:38 +01:00 
			
		
		
		
	Changed how we write out superblock to use append
Making the superblock look like "just another entry" allows us to treat the superblock like "just another entry" and reuse a decent amount of logic that would otherwise only be used a format and mount time. In this case we can use append to write out the superblock like it was creating a new entry on the filesystem.
This commit is contained in:
		
							
								
								
									
										5
									
								
								lfs.h
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								lfs.h
									
									
									
									
									
								
							| @@ -257,15 +257,10 @@ typedef struct lfs_dir { | ||||
|  | ||||
| typedef struct lfs_superblock { | ||||
|     struct lfs_disk_superblock { | ||||
|         uint8_t type; | ||||
|         uint8_t elen; | ||||
|         uint8_t alen; | ||||
|         uint8_t nlen; | ||||
|         lfs_block_t root[2]; | ||||
|         uint32_t block_size; | ||||
|         uint32_t block_count; | ||||
|         uint32_t version; | ||||
|         char magic[8]; | ||||
|     } d; | ||||
| } lfs_superblock_t; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user