mirror of
				https://github.com/eledio-devices/thirdparty-littlefs.git
				synced 2025-10-31 00:32:38 +01:00 
			
		
		
		
	Squash of CR changes
- nit: Moving brace to end of if statement line for consistency - mount: add more debug info per CR - Fix compiler error from extra parentheses - Fix superblock typo
This commit is contained in:
		
				
					committed by
					
						 Christopher Haster
						Christopher Haster
					
				
			
			
				
	
			
			
			
						parent
						
							487df12dde
						
					
				
				
					commit
					cf274e6ec6
				
			
							
								
								
									
										15
									
								
								lfs.c
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								lfs.c
									
									
									
									
									
								
							| @@ -3762,10 +3762,17 @@ static int lfs_rawmount(lfs_t *lfs, const struct lfs_config *cfg) { | ||||
|                 lfs->attr_max = superblock.attr_max; | ||||
|             } | ||||
|  | ||||
|             if ((superblock.block_count != lfs->cfg->block_count) || | ||||
|                 (superblock.block_size != lfs->cfg->block_size)) | ||||
|             { | ||||
|                 err = LFS_ERR_CORRUPT; | ||||
|             if (superblock.block_count != lfs->cfg->block_count) { | ||||
|                 LFS_ERROR("Invalid block count (%"PRIu32" != %"PRIu32")", | ||||
|                         superblock.block_count, lfs->cfg->block_count); | ||||
|                 err = LFS_ERR_INVAL; | ||||
|                 goto cleanup; | ||||
|             } | ||||
|  | ||||
|             if (superblock.block_size != lfs->cfg->block_size) { | ||||
|                 LFS_ERROR("Invalid block size (%"PRIu32" != %"PRIu32")", | ||||
|                         superblock.block_count, lfs->cfg->block_count); | ||||
|                 err = LFS_ERR_INVAL; | ||||
|                 goto cleanup; | ||||
|             } | ||||
|         } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user