mirror of
				https://github.com/eledio-devices/thirdparty-littlefs.git
				synced 2025-10-31 08:42:40 +01:00 
			
		
		
		
	Generated v2 prefixes
This commit is contained in:
		
							
								
								
									
										4
									
								
								lfs2.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								lfs2.c
									
									
									
									
									
								
							| @@ -2864,6 +2864,10 @@ int lfs2_file_truncate(lfs2_t *lfs2, lfs2_file_t *file, lfs2_off_t size) { | ||||
|         return LFS2_ERR_BADF; | ||||
|     } | ||||
|  | ||||
|     if (size > LFS2_FILE_MAX) { | ||||
|         return LFS2_ERR_INVAL; | ||||
|     } | ||||
|  | ||||
|     lfs2_off_t oldsize = lfs2_file_size(lfs2, file); | ||||
|     if (size < oldsize) { | ||||
|         // need to flush since directly changing metadata | ||||
|   | ||||
		Reference in New Issue
	
	Block a user