Blame SOURCES/0019-Add-D-to-print-device-paths.patch

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