gnu-efi/0041-Implement-Print-L-p-ptr.patch
Peter Jones 90e6999a07 Update to 3.0.11 and add some fixes and enhancements.
- Update to the stuff in master to fix the issue at:
  https://bodhi.fedoraproject.org/updates/FEDORA-2020-050993b283#comment-1208958
- Update to 3.0.11 (via patches generated from git)
- Plus newer upstream fixes (also via patches generated from git)
- Fix shell exit failures in make
- Fix .reloc section generation
- Fix CHAR8 definition
- Fix "make DESTDIR=..."
- Change the installed .a/.o layout
- Provide makefiles for consumers to use.
- Make the -devel noarch since it's just headers.
- Add a bunch of compatibility symlinks for our older packages.
  These will go away once we've migrated everything using them in fedora
  to use the newer make system...

Signed-off-by: Peter Jones <pjones@redhat.com>
2020-01-28 13:34:07 -05:00

39 lines
1.2 KiB
Diff

From a39c7b9bbbacc6554bba79a7ab8eeb37f88d8c15 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Mon, 18 Nov 2019 13:06:23 -0500
Subject: [PATCH 41/46] Implement Print(L"%p", ptr);
Signed-off-by: Peter Jones <pjones@redhat.com>
---
lib/print.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/lib/print.c b/lib/print.c
index 0b823481347..8fdba6ee166 100644
--- a/lib/print.c
+++ b/lib/print.c
@@ -1181,6 +1181,20 @@ Returns:
PSETATTR(ps, ps->AttrNorm);
break;
+ case 'p':
+ Item.Width = sizeof(void *) == (8 ? 16 : 8) + 2;
+ Item.Pad = '0';
+ Item.Scratch[0] = ' ';
+ Item.Scratch[1] = ' ';
+ ValueToHex (
+ Item.Scratch+2,
+ Item.Long ? va_arg(ps->args, UINT64) : va_arg(ps->args, UINT32)
+ );
+ Item.Scratch[0] = '0';
+ Item.Scratch[1] = 'x';
+ Item.Item.pw = Item.Scratch;
+ break;
+
case 'r':
StatusToString (Item.Scratch, va_arg(ps->args, EFI_STATUS));
Item.Item.pw = Item.Scratch;
--
2.24.1