Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18346
6f19259b-4bc3-4df7-8a09-
765794883524
);\r
\r
Index = sizeof (BLUETOOTH_ADDRESS) - 1;\r
);\r
\r
Index = sizeof (BLUETOOTH_ADDRESS) - 1;\r
- while (!IS_NULL(BluetoothStr) && Index >= 0) {\r
- Walker = SplitStr (&BluetoothStr, L':');\r
- TempBufferSize = StrSize (Walker) + StrLen (L"0x") * sizeof (CHAR16);\r
+ Walker = BluetoothStr;\r
+ while (!IS_NULL(*Walker) && Index >= 0) {\r
+ TempBufferSize = 2 * sizeof(CHAR16) + StrSize(L"0x");\r
TempNumBuffer = AllocateZeroPool (TempBufferSize);\r
if (TempNumBuffer == NULL) {\r
break;\r
}\r
StrCpyS (TempNumBuffer, TempBufferSize / sizeof (CHAR16), L"0x");\r
TempNumBuffer = AllocateZeroPool (TempBufferSize);\r
if (TempNumBuffer == NULL) {\r
break;\r
}\r
StrCpyS (TempNumBuffer, TempBufferSize / sizeof (CHAR16), L"0x");\r
- StrCatS (TempNumBuffer, TempBufferSize / sizeof (CHAR16), Walker);\r
+ StrnCatS (TempNumBuffer, TempBufferSize / sizeof (CHAR16), Walker, 2);\r
BluetoothDp->BD_ADDR.Address[Index] = (UINT8)Strtoi (TempNumBuffer);\r
FreePool (TempNumBuffer);\r
BluetoothDp->BD_ADDR.Address[Index] = (UINT8)Strtoi (TempNumBuffer);\r
FreePool (TempNumBuffer);\r
Bluetooth = DevPath;\r
UefiDevicePathLibCatPrint (\r
Str,\r
Bluetooth = DevPath;\r
UefiDevicePathLibCatPrint (\r
Str,\r
- L"Bluetooth(%02x:%02x:%02x:%02x:%02x:%02x)",\r
+ L"Bluetooth(%02x%02x%02x%02x%02x%02x)",\r
Bluetooth->BD_ADDR.Address[5],\r
Bluetooth->BD_ADDR.Address[4],\r
Bluetooth->BD_ADDR.Address[3],\r
Bluetooth->BD_ADDR.Address[5],\r
Bluetooth->BD_ADDR.Address[4],\r
Bluetooth->BD_ADDR.Address[3],\r