mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-02 06:23:18 +02:00
printf: Use inttype.h macros for format strings
DJGPP for compiling DOS has other sizes for the normal int types and therefore throwing errors when using %i %d or %x with uint32_t. Fix these warnings by using the macros created for it and provided in inttypes.h. Change-Id: Ia75b6df981ce60c891161fe553c7ceab8570178d Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/73040 Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:

committed by
Anastasia Klimchuk

parent
ba6acffc69
commit
90286fe643
@ -313,7 +313,7 @@ int erase_write(struct flashctx *const flashctx, chipoff_t region_start, chipoff
|
||||
|
||||
if (region.write_prot) {
|
||||
msg_gdbg("%s: cannot erase inside %s "
|
||||
"region (%#08x..%#08x), skipping range (%#08x..%#08x).\n",
|
||||
"region (%#08"PRIx32"..%#08"PRIx32"), skipping range (%#08x..%#08x).\n",
|
||||
__func__, region.name,
|
||||
region.start, region.end - 1,
|
||||
addr, addr + len - 1);
|
||||
@ -321,7 +321,7 @@ int erase_write(struct flashctx *const flashctx, chipoff_t region_start, chipoff
|
||||
continue;
|
||||
}
|
||||
|
||||
msg_gdbg("%s: %s region (%#08x..%#08x) is "
|
||||
msg_gdbg("%s: %s region (%#08"PRIx32"..%#08"PRIx32") is "
|
||||
"writable, erasing range (%#08x..%#08x).\n",
|
||||
__func__, region.name,
|
||||
region.start, region.end - 1,
|
||||
@ -339,7 +339,7 @@ int erase_write(struct flashctx *const flashctx, chipoff_t region_start, chipoff
|
||||
ret = erasefn(flashctx, start_addr, block_len);
|
||||
if (ret) {
|
||||
msg_cerr("Failed to execute erase command "
|
||||
"for offset %#x to %#x.\n",
|
||||
"for offset %#"PRIx32" to %#"PRIx32".\n",
|
||||
start_addr, start_addr + block_len);
|
||||
ret = -1;
|
||||
goto _end;
|
||||
@ -349,11 +349,11 @@ int erase_write(struct flashctx *const flashctx, chipoff_t region_start, chipoff
|
||||
memset(curcontents+start_addr, erased_value, block_len);
|
||||
// after erase make it unselected again
|
||||
erase_layout[i].layout_list[j].selected = false;
|
||||
msg_cdbg("E(%x:%x)", start_addr, start_addr + block_len - 1);
|
||||
msg_cdbg("E(%"PRIx32":%"PRIx32")", start_addr, start_addr + block_len - 1);
|
||||
// verify erase
|
||||
ret = check_erased_range(flashctx, start_addr, block_len);
|
||||
if (ret) {
|
||||
msg_cerr("Verifying flash. Erase failed for range %#x : %#x, Abort.\n",
|
||||
msg_cerr("Verifying flash. Erase failed for range %#"PRIx32" : %#"PRIx32", Abort.\n",
|
||||
start_addr, start_addr + block_len - 1);
|
||||
goto _end;
|
||||
}
|
||||
@ -381,14 +381,14 @@ int erase_write(struct flashctx *const flashctx, chipoff_t region_start, chipoff
|
||||
// adjust curcontents
|
||||
memcpy(curcontents + region_start + start_here,
|
||||
newcontents + region_start + start_here, len_here);
|
||||
msg_cdbg("W(%x:%x)", region_start + start_here, region_start + start_here + len_here - 1);
|
||||
msg_cdbg("W(%"PRIx32":%"PRIx32")", region_start + start_here, region_start + start_here + len_here - 1);
|
||||
|
||||
*all_skipped = false;
|
||||
}
|
||||
// verify write
|
||||
ret = verify_range(flashctx, newcontents + region_start, region_start, region_end - region_start);
|
||||
if (ret) {
|
||||
msg_cerr("Verifying flash. Write failed for range %#x : %#x, Abort.\n",
|
||||
msg_cerr("Verifying flash. Write failed for range %#"PRIx32" : %#"PRIx32", Abort.\n",
|
||||
region_start, region_end);
|
||||
goto _end;
|
||||
}
|
||||
@ -400,6 +400,6 @@ _end:
|
||||
free(old_start_buf);
|
||||
free(old_end_buf);
|
||||
|
||||
msg_cinfo("Erase/write done from %x to %x\n", region_start, region_end);
|
||||
msg_cinfo("Erase/write done from %"PRIx32" to %"PRIx32"\n", region_start, region_end);
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user