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>
This commit is contained in:
Mate Kukri
2024-03-17 18:26:28 +00:00
committed by Nico Huber
parent e079379576
commit 5c769ab711

View File

@ -18,8 +18,8 @@ void *map_physical_exact(off_t phys_addr, void *mapto, size_t len)
if (virt_addr == MAP_FAILED) { if (virt_addr == MAP_FAILED) {
err = errno; err = errno;
printf("Error mapping physical memory 0x%016jd [0x%zx] ERRNO=%d %s\n", printf("Error mapping physical memory 0x%016jx [0x%zx] ERRNO=%d %s\n",
(intmax_t)phys_addr, len, err, strerror(err)); (uintmax_t)phys_addr, len, err, strerror(err));
return NULL; return NULL;
} }
@ -35,8 +35,8 @@ void *map_physical(off_t phys_addr, size_t len)
if (virt_addr == MAP_FAILED) { if (virt_addr == MAP_FAILED) {
err = errno; err = errno;
printf("Error mapping physical memory 0x%016jd [0x%zx] ERRNO=%d %s\n", printf("Error mapping physical memory 0x%016jx [0x%zx] ERRNO=%d %s\n",
(intmax_t)phys_addr, len, err, strerror(err)); (uintmax_t)phys_addr, len, err, strerror(err));
return NULL; return NULL;
} }