mirror of
				https://review.coreboot.org/flashrom.git
				synced 2025-11-04 07:00:39 +01:00 
			
		
		
		
	fmap: Fix length calculation in error message
Change-Id: Ie0f448970de6a7829f304448e0835eaeb7d103a3 Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: https://review.coreboot.org/c/30152 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: David Hendricks <david.hendricks@gmail.com>
This commit is contained in:
		
							
								
								
									
										2
									
								
								fmap.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								fmap.c
									
									
									
									
									
								
							@@ -243,7 +243,7 @@ static int fmap_bsearch_rom(struct fmap **fmap_out, struct flashctx *const flash
 | 
				
			|||||||
			if (flashctx->chip->read(flashctx, (uint8_t *)fmap + sig_len,
 | 
								if (flashctx->chip->read(flashctx, (uint8_t *)fmap + sig_len,
 | 
				
			||||||
						offset + sig_len, sizeof(*fmap) - sig_len)) {
 | 
											offset + sig_len, sizeof(*fmap) - sig_len)) {
 | 
				
			||||||
				msg_cerr("Cannot read %zu bytes at offset %06zx\n",
 | 
									msg_cerr("Cannot read %zu bytes at offset %06zx\n",
 | 
				
			||||||
						sizeof(*fmap) + sig_len, offset + sig_len);
 | 
											sizeof(*fmap) - sig_len, offset + sig_len);
 | 
				
			||||||
				continue;
 | 
									continue;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user