Module Name:    src
Committed By:   skrll
Date:           Fri Jan  3 14:14:56 UTC 2020

Modified Files:
        src/sys/stand/efiboot: efifdt.c

Log Message:
Fix EFIBOOT_DEBUG build on arm


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/stand/efiboot/efifdt.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/stand/efiboot/efifdt.c
diff -u src/sys/stand/efiboot/efifdt.c:1.20 src/sys/stand/efiboot/efifdt.c:1.21
--- src/sys/stand/efiboot/efifdt.c:1.20	Wed Dec 18 21:46:03 2019
+++ src/sys/stand/efiboot/efifdt.c	Fri Jan  3 14:14:56 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: efifdt.c,v 1.20 2019/12/18 21:46:03 riastradh Exp $ */
+/* $NetBSD: efifdt.c,v 1.21 2020/01/03 14:14:56 skrll Exp $ */
 
 /*-
  * Copyright (c) 2019 Jason R. Thorpe
@@ -47,6 +47,13 @@ static EFI_GUID FdtTableGuid = FDT_TABLE
 	 (_md)->Type == EfiBootServicesCode || (_md)->Type == EfiBootServicesData || \
 	 (_md)->Type == EfiConventionalMemory)
 
+#ifdef _LP64
+#define PRIdUINTN "ld"
+#define PRIxUINTN "lx"
+#else
+#define PRIdUINTN "d"
+#define PRIxUINTN "x"
+#endif
 static void *fdt_data = NULL;
 
 int
@@ -275,7 +282,7 @@ efi_fdt_gop(void)
 			continue;
 
 #ifdef EFIBOOT_DEBUG
-		printf("GOP: FB @ 0x%lx size 0x%lx\n", mode->FrameBufferBase, mode->FrameBufferSize);
+		printf("GOP: FB @ 0x%" PRIx64 " size 0x%" PRIxUINTN "\n", mode->FrameBufferBase, mode->FrameBufferSize);
 		printf("GOP: Version %d\n", mode->Info->Version);
 		printf("GOP: HRes %d VRes %d\n", mode->Info->HorizontalResolution, mode->Info->VerticalResolution);
 		printf("GOP: PixelFormat %d\n", mode->Info->PixelFormat);

Reply via email to