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

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