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

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