summaryrefslogtreecommitdiff
path: root/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
diff options
context:
space:
mode:
authorQiu Shumin <shumin.qiu@intel.com>2015-05-06 02:41:37 +0000
committershenshushi <shenshushi@Edk2>2015-05-06 02:41:37 +0000
commit7795c8f942333779adb812d492c3a92684daf3b5 (patch)
tree2065eb334d81da380872903015a211c9b2c8967a /MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
parent362c355cc43d325a8da56af343251a2d484c41ba (diff)
downloadedk2-platforms-7795c8f942333779adb812d492c3a92684daf3b5.tar.xz
MdePkg: Add bluetooth devicepath handling in device path library.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Yao Jiewen <jiewen.yao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17312 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/UefiDevicePathLib/DevicePathToText.c')
-rw-r--r--MdePkg/Library/UefiDevicePathLib/DevicePathToText.c39
1 files changed, 38 insertions, 1 deletions
diff --git a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
index 2dbbddaf09..af1a6d675e 100644
--- a/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
+++ b/MdePkg/Library/UefiDevicePathLib/DevicePathToText.c
@@ -1,7 +1,7 @@
/** @file
DevicePathToText protocol as defined in the UEFI 2.0 specification.
-Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -1495,6 +1495,42 @@ DevPathToTextVlan (
}
/**
+ Converts a Bluetooth 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
+DevPathToTextBluetooth (
+ IN OUT POOL_PRINT *Str,
+ IN VOID *DevPath,
+ IN BOOLEAN DisplayOnly,
+ IN BOOLEAN AllowShortcuts
+ )
+{
+ BLUETOOTH_DEVICE_PATH *Bluetooth;
+
+ Bluetooth = DevPath;
+ UefiDevicePathLibCatPrint (
+ Str,
+ L"Bluetooth(%02x:%02x:%02x:%02x:%02x:%02x)",
+ Bluetooth->BD_ADDR.Address[5],
+ Bluetooth->BD_ADDR.Address[4],
+ Bluetooth->BD_ADDR.Address[3],
+ Bluetooth->BD_ADDR.Address[2],
+ Bluetooth->BD_ADDR.Address[1],
+ Bluetooth->BD_ADDR.Address[0]
+ );
+}
+
+/**
Converts a Hard drive device path structure to its string representative.
@param Str The string representative of input device.
@@ -1912,6 +1948,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED const DEVICE_PATH_TO_TEXT_TABLE mUefiDevicePathLib
{MESSAGING_DEVICE_PATH, MSG_VENDOR_DP, DevPathToTextVendor },
{MESSAGING_DEVICE_PATH, MSG_ISCSI_DP, DevPathToTextiSCSI },
{MESSAGING_DEVICE_PATH, MSG_VLAN_DP, DevPathToTextVlan },
+ {MESSAGING_DEVICE_PATH, MSG_BLUETOOTH_DP, DevPathToTextBluetooth },
{MEDIA_DEVICE_PATH, MEDIA_HARDDRIVE_DP, DevPathToTextHardDrive },
{MEDIA_DEVICE_PATH, MEDIA_CDROM_DP, DevPathToTextCDROM },
{MEDIA_DEVICE_PATH, MEDIA_VENDOR_DP, DevPathToTextVendor },