Module Name:    src
Committed By:   skrll
Date:           Wed Apr 10 19:11:42 UTC 2019

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

Log Message:
Fixup EFIBOT_DEBUG output for non-_LP64 case


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/stand/efiboot/efiboot.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/efiboot.c
diff -u src/sys/stand/efiboot/efiboot.c:1.13 src/sys/stand/efiboot/efiboot.c:1.14
--- src/sys/stand/efiboot/efiboot.c:1.13	Sat Mar 30 12:47:53 2019
+++ src/sys/stand/efiboot/efiboot.c	Wed Apr 10 19:11:42 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: efiboot.c,v 1.13 2019/03/30 12:47:53 jmcneill Exp $ */
+/* $NetBSD: efiboot.c,v 1.14 2019/04/10 19:11:42 skrll Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill <jmcne...@invisible.ca>
@@ -42,6 +42,14 @@ EFI_LOADED_IMAGE *efi_li;
 
 int howto = 0;
 
+#ifdef _LP64
+#define PRIxEFIPTR "lX"
+#define PRIxEFISIZE "lX"
+#else
+#define PRIxEFIPTR "X"
+#define PRIxEFISIZE "X"
+#endif
+
 static EFI_PHYSICAL_ADDRESS heap_start;
 static UINTN heap_size = 8 * 1024 * 1024;
 static EFI_EVENT delay_ev = 0;
@@ -75,10 +83,10 @@ efi_main(EFI_HANDLE imageHandle, EFI_SYS
 		efi_bootdp = NULL;
 
 #ifdef EFIBOOT_DEBUG
-	Print(L"Loaded image      : 0x%lX\n", efi_li);
-	Print(L"FilePath          : 0x%lX\n", efi_li->FilePath);
-	Print(L"ImageBase         : 0x%lX\n", efi_li->ImageBase);
-	Print(L"ImageSize         : 0x%lX\n", efi_li->ImageSize);
+	Print(L"Loaded image      : 0x%" PRIxEFIPTR "\n", efi_li);
+	Print(L"FilePath          : 0x%" PRIxEFIPTR "\n", efi_li->FilePath);
+	Print(L"ImageBase         : 0x%" PRIxEFIPTR "\n", efi_li->ImageBase);
+	Print(L"ImageSize         : 0x%" PRIxEFISIZE "\n", efi_li->ImageSize);
 	Print(L"Image file        : %s\n", DevicePathToStr(efi_li->FilePath));
 #endif
 

Reply via email to