From 14843112b84f37738cc365c31a0ea65c32ce5550 Mon Sep 17 00:00:00 2001 From: Justin Hibbits Date: Sun, 6 Jan 2019 05:07:52 +0000 Subject: [PATCH] dtsec: Fix formatting of addresses in translation error messages Don't clamp addresses to 8 hex digits, particularly since this is primarily used now on a 64-bit platform. MFC after: 1 week --- sys/contrib/ncsw/user/env/xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/contrib/ncsw/user/env/xx.c b/sys/contrib/ncsw/user/env/xx.c index d422942d1daa..515e5f115ff8 100644 --- a/sys/contrib/ncsw/user/env/xx.c +++ b/sys/contrib/ncsw/user/env/xx.c @@ -704,7 +704,7 @@ XX_VirtToPhys(void *addr) paddr = pmap_kextract((vm_offset_t)addr); if (paddr == 0) printf("NetCommSW: " - "Unable to translate virtual address 0x%08X!\n", addr); + "Unable to translate virtual address %p!\n", addr); else pmap_track_page(kernel_pmap, (vm_offset_t)addr); @@ -758,7 +758,7 @@ XX_PhysToVirt(physAddress_t addr) return ((void *)(pv->pv_va + ((vm_offset_t)addr & PAGE_MASK))); printf("NetCommSW: " - "Unable to translate physical address 0x%08llX!\n", addr); + "Unable to translate physical address 0x%09jx!\n", (uintmax_t)addr); return (NULL); }