diff options
author | Peter Jones <pjones@redhat.com> | 2018-03-13 15:20:29 -0400 |
---|---|---|
committer | Nigel Croxon <ncroxon@redhat.com> | 2018-03-14 14:50:23 -0400 |
commit | 28793041d7f26a6771837967c495f3ae7ba1134a (patch) | |
tree | 72072b4c7c78e986fae2d02ab3723d747de30255 /lib/print.c | |
parent | 9485c65f6d28b71ff697849c1c8d47fd077ccd07 (diff) | |
download | gnu-efi-28793041d7f26a6771837967c495f3ae7ba1134a.tar.gz |
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>
Diffstat (limited to 'lib/print.c')
-rw-r--r-- | lib/print.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/print.c b/lib/print.c index ed79c43..35e43c0 100644 --- a/lib/print.c +++ b/lib/print.c @@ -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, |