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