mirror of
				https://github.com/eledio-devices/thirdparty-littlefs.git
				synced 2025-10-31 00:32:38 +01:00 
			
		
		
		
	Use lfs_file_rawsize to calculate LFS_SEEK_END position
This commit is contained in:
		
				
					committed by
					
						 Christopher Haster
						Christopher Haster
					
				
			
			
				
	
			
			
			
						parent
						
							6bb4043154
						
					
				
				
					commit
					3216b07c3b
				
			
							
								
								
									
										2
									
								
								lfs.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								lfs.c
									
									
									
									
									
								
							| @@ -3055,7 +3055,7 @@ static lfs_soff_t lfs_file_rawseek(lfs_t *lfs, lfs_file_t *file, | |||||||
|     } else if (whence == LFS_SEEK_CUR) { |     } else if (whence == LFS_SEEK_CUR) { | ||||||
|         npos = file->pos + off; |         npos = file->pos + off; | ||||||
|     } else if (whence == LFS_SEEK_END) { |     } else if (whence == LFS_SEEK_END) { | ||||||
|         npos = file->ctz.size + off; |         npos = lfs_file_rawsize(lfs, file) + off; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     if (npos > lfs->file_max) { |     if (npos > lfs->file_max) { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user