|
|
67650e |
From 28793041d7f26a6771837967c495f3ae7ba1134a Mon Sep 17 00:00:00 2001
|
|
|
67650e |
From: Peter Jones <pjones@redhat.com>
|
|
|
67650e |
Date: Tue, 13 Mar 2018 15:20:29 -0400
|
|
|
67650e |
Subject: [PATCH 19/25] Add %D to print device paths
|
|
|
67650e |
|
|
|
67650e |
Add %D to print device paths.
|
|
|
67650e |
|
|
|
67650e |
Signed-off-by: Peter Jones <pjones@redhat.com>
|
|
|
67650e |
Signed-off-by: Nigel Croxon <ncroxon@redhat.com>
|
|
|
67650e |
---
|
|
|
67650e |
lib/print.c | 13 +++++++++++++
|
|
|
67650e |
1 file changed, 13 insertions(+)
|
|
|
67650e |
|
|
|
67650e |
diff --git a/lib/print.c b/lib/print.c
|
|
|
67650e |
index ed79c43825b..35e43c03db5 100644
|
|
|
67650e |
--- a/lib/print.c
|
|
|
67650e |
+++ b/lib/print.c
|
|
|
67650e |
@@ -1005,6 +1005,7 @@ Routine Description:
|
|
|
67650e |
t - EFI time structure
|
|
|
67650e |
g - Pointer to GUID
|
|
|
67650e |
r - EFI status code (result code)
|
|
|
67650e |
+ D - pointer to Device Path with normal ending.
|
|
|
67650e |
|
|
|
67650e |
N - Set output attribute to normal
|
|
|
67650e |
H - Set output attribute to highlight
|
|
|
67650e |
@@ -1167,6 +1168,18 @@ Returns:
|
|
|
67650e |
Item.Item.pw = Item.Scratch;
|
|
|
67650e |
break;
|
|
|
67650e |
|
|
|
67650e |
+ case 'D':
|
|
|
67650e |
+ {
|
|
|
67650e |
+ EFI_DEVICE_PATH *dp = va_arg(ps->args, EFI_DEVICE_PATH *);
|
|
|
67650e |
+ CHAR16 *dpstr = DevicePathToStr(dp);
|
|
|
67650e |
+ StrnCpy(Item.Scratch, dpstr, PRINT_ITEM_BUFFER_LEN);
|
|
|
67650e |
+ Item.Scratch[PRINT_ITEM_BUFFER_LEN-1] = L'\0';
|
|
|
67650e |
+ FreePool(dpstr);
|
|
|
67650e |
+
|
|
|
67650e |
+ Item.Item.pw = Item.Scratch;
|
|
|
67650e |
+ break;
|
|
|
67650e |
+ }
|
|
|
67650e |
+
|
|
|
67650e |
case 'f':
|
|
|
67650e |
FloatToString (
|
|
|
67650e |
Item.Scratch,
|
|
|
67650e |
--
|
|
|
67650e |
2.15.0
|
|
|
67650e |
|