Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/stand/efiboot Fixup EFIBOT_DEBUG output for non-_LP64 case



details:   https://anonhg.NetBSD.org/src/rev/fb3f50eb82fa
branches:  trunk
changeset: 998210:fb3f50eb82fa
user:      skrll <skrll%NetBSD.org@localhost>
date:      Wed Apr 10 19:11:42 2019 +0000

description:
Fixup EFIBOT_DEBUG output for non-_LP64 case

diffstat:

 sys/stand/efiboot/efiboot.c |  18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diffs (39 lines):

diff -r 51498e4e1650 -r fb3f50eb82fa sys/stand/efiboot/efiboot.c
--- a/sys/stand/efiboot/efiboot.c       Wed Apr 10 18:49:04 2019 +0000
+++ b/sys/stand/efiboot/efiboot.c       Wed Apr 10 19:11:42 2019 +0000
@@ -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 <jmcneill%invisible.ca@localhost>
@@ -42,6 +42,14 @@
 
 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_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
 



Home | Main Index | Thread Index | Old Index