Add %D to print device paths

Add %D to print device paths.

Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Nigel Croxon <ncroxon@redhat.com>
This commit is contained in:
Peter Jones 2018-03-13 15:20:29 -04:00 committed by Nigel Croxon
parent 9485c65f6d
commit 28793041d7
1 changed files with 13 additions and 0 deletions

View File

@ -1005,6 +1005,7 @@ Routine Description:
t - EFI time structure
g - Pointer to GUID
r - EFI status code (result code)
D - pointer to Device Path with normal ending.
N - Set output attribute to normal
H - Set output attribute to highlight
@ -1167,6 +1168,18 @@ Returns:
Item.Item.pw = Item.Scratch;
break;
case 'D':
{
EFI_DEVICE_PATH *dp = va_arg(ps->args, EFI_DEVICE_PATH *);
CHAR16 *dpstr = DevicePathToStr(dp);
StrnCpy(Item.Scratch, dpstr, PRINT_ITEM_BUFFER_LEN);
Item.Scratch[PRINT_ITEM_BUFFER_LEN-1] = L'\0';
FreePool(dpstr);
Item.Item.pw = Item.Scratch;
break;
}
case 'f':
FloatToString (
Item.Scratch,