summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMate Kukri <kukri.mate@gmail.com>2024-03-17 18:26:28 +0000
committerNico Huber <nico.h@gmx.de>2024-03-17 19:08:48 +0000
commit5c769ab711b8a25150ecf8d612f69d1cae63c2ee (patch)
treea8b14ed9db255a52ab9f0e2af85a95fd41398f4f
parente079379576faf707c04684787830aad8650e0133 (diff)
util/intelmetool: Print the address in `map_physical` errors in hex
Previously the incorrect 'd' format specifier was used despite the '0x' prefix implying hex to the user. Change-Id: Ib97bd86ee0e0c8fe8c3785e22a4d9f6def3cae61 Signed-off-by: Mate Kukri <kukri.mate@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/81191 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
-rw-r--r--util/intelmetool/mmap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/util/intelmetool/mmap.c b/util/intelmetool/mmap.c
index 6200dcbc51..988085ecd3 100644
--- a/util/intelmetool/mmap.c
+++ b/util/intelmetool/mmap.c
@@ -18,8 +18,8 @@ void *map_physical_exact(off_t phys_addr, void *mapto, size_t len)
if (virt_addr == MAP_FAILED) {
err = errno;
- printf("Error mapping physical memory 0x%016jd [0x%zx] ERRNO=%d %s\n",
- (intmax_t)phys_addr, len, err, strerror(err));
+ printf("Error mapping physical memory 0x%016jx [0x%zx] ERRNO=%d %s\n",
+ (uintmax_t)phys_addr, len, err, strerror(err));
return NULL;
}
@@ -35,8 +35,8 @@ void *map_physical(off_t phys_addr, size_t len)
if (virt_addr == MAP_FAILED) {
err = errno;
- printf("Error mapping physical memory 0x%016jd [0x%zx] ERRNO=%d %s\n",
- (intmax_t)phys_addr, len, err, strerror(err));
+ printf("Error mapping physical memory 0x%016jx [0x%zx] ERRNO=%d %s\n",
+ (uintmax_t)phys_addr, len, err, strerror(err));
return NULL;
}