From 09e156131de5b788dc64d965260a99d4b6dd2b7f Mon Sep 17 00:00:00 2001 From: qhuang8 Date: Wed, 19 Aug 2009 13:43:13 +0000 Subject: [PATCH] Add a missing worker function to convert MEDIA_RELATIVE_OFFSET_RANGE_DP to text git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9139 6f19259b-4bc3-4df7-8a09-765794883524 --- .../DevicePathDxe/DevicePathToText.c | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/MdeModulePkg/Universal/DevicePathDxe/DevicePathToText.c b/MdeModulePkg/Universal/DevicePathDxe/DevicePathToText.c index 7e2749da92..fec342f113 100644 --- a/MdeModulePkg/Universal/DevicePathDxe/DevicePathToText.c +++ b/MdeModulePkg/Universal/DevicePathDxe/DevicePathToText.c @@ -1509,6 +1509,38 @@ DevPathToTextFvFile ( CatPrint (Str, L"FvFile(%g)", &FvFile->FvFileName); } +/** + Converts a Relative Offset device path structure to its string representative. + + @param Str The string representative of input device. + @param DevPath The input device path structure. + @param DisplayOnly If DisplayOnly is TRUE, then the shorter text representation + of the display node is used, where applicable. If DisplayOnly + is FALSE, then the longer text representation of the display node + is used. + @param AllowShortcuts If AllowShortcuts is TRUE, then the shortcut forms of text + representation for a device node can be used, where applicable. + +**/ +VOID +DevPathRelativeOffsetRange ( + IN OUT POOL_PRINT *Str, + IN VOID *DevPath, + IN BOOLEAN DisplayOnly, + IN BOOLEAN AllowShortcuts + ) +{ + MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH *Offset; + + Offset = DevPath; + CatPrint ( + Str, + L"Offset(%lx,%lx)", + Offset->StartingOffset, + Offset->EndingOffset + ); +} + /** Converts a BIOS Boot Specification device path structure to its string representative. @@ -1659,6 +1691,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED const DEVICE_PATH_TO_TEXT_TABLE DevPathToTextTable {MEDIA_DEVICE_PATH, MEDIA_FILEPATH_DP, DevPathToTextFilePath}, {MEDIA_DEVICE_PATH, MEDIA_PIWG_FW_VOL_DP, DevPathToTextFv}, {MEDIA_DEVICE_PATH, MEDIA_PIWG_FW_FILE_DP, DevPathToTextFvFile}, + {MEDIA_DEVICE_PATH, MEDIA_RELATIVE_OFFSET_RANGE_DP, DevPathRelativeOffsetRange}, {BBS_DEVICE_PATH, BBS_BBS_DP, DevPathToTextBBS}, {END_DEVICE_PATH_TYPE, END_INSTANCE_DEVICE_PATH_SUBTYPE, DevPathToTextEndInstance}, {0, 0, NULL}